Update to rev v1_0

- Add relay and relay control port to header
- Not compatible with Kirdy rev0_3
- Update 3D model path & silkscreen markings
This commit is contained in:
2025-07-25 12:54:43 +08:00
parent b02037a175
commit 75018f7649
24 changed files with 99135 additions and 27486 deletions

25
flake.lock generated
View File

@@ -1,40 +1,23 @@
{
"nodes": {
"kicad_bom_generator": {
"flake": false,
"locked": {
"lastModified": 1702353729,
"narHash": "sha256-NIM/GLC71VdGdMletBBv9lSPuHpgD9zzeGiVQLEAULA=",
"ref": "refs/heads/main",
"rev": "72686f5556785c9aa13678dc42757dddfb7d7c23",
"revCount": 2,
"type": "git",
"url": "https://git.m-labs.hk/M-Labs/KiCAD_BOM_Generator.git"
},
"original": {
"type": "git",
"url": "https://git.m-labs.hk/M-Labs/KiCAD_BOM_Generator.git"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703467016,
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
"lastModified": 1753345091,
"narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
"rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"kicad_bom_generator": "kicad_bom_generator",
"nixpkgs": "nixpkgs"
}
}

View File

@@ -1,87 +1,48 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
inputs.kicad_bom_generator = {
url = "git+https://git.m-labs.hk/M-Labs/KiCAD_BOM_Generator.git";
flake = false;
};
outputs = { self, nixpkgs, kicad_bom_generator }:
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
outputs = {
nixpkgs,
...
}:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
kicad-project-name = "kirdy";
kicad-variant = "kirdy_HC";
kicad-main-version = 9;
adapter_production_files = variant: pkgs.stdenv.mkDerivation {
name = "production-files";
name = "adapter_production_output";
src = ./kirdy_LD_adapter_${variant};
nativeBuildInputs = [ pkgs.kicad pkgs.zip pkgs.python3 ];
buildPhase = ''
# kicad-cli requires the use of $HOME
TMP_DIR="$(mktemp --tmpdir -d kicad-kirdy.XXXXXXX)"
export HOME=$TMP_DIR
SCH=kirdy_LD_adapter_${variant}.kicad_sch
PCB=kirdy_LD_adapter_${variant}.kicad_pcb
# Get Revision Number from the Title Block in KiCAD Top Schematics
REV=$(cat $SCH | grep rev | cut -d'"' -f 2)
PREFIX=kirdy_LD_adapter_${variant}_$REV
kicad-cli sch export python-bom $SCH -o $PREFIX"_bom".xml
export PYTHONPATH=${pkgs.kicad.base}/share/kicad/plugins
python ${kicad_bom_generator}/generate_bom_from_xml.py $PREFIX"_bom".xml $PREFIX"_bom".csv
kicad-cli sch export pdf $SCH -o $PREFIX.pdf
kicad-cli pcb export pos $PCB --format csv --units mm -o $PREFIX"_pos".csv
export KICAD7_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
kicad-cli pcb export step $PCB --subst-models --force -o $PREFIX.step
mkdir -p $PREFIX"_gerber_drill"
kicad-cli pcb export gerbers $PCB -l 'F.Cu,B.Cu,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,F.Mask,B.Mask,Edge.Cuts' --no-x2 --subtract-soldermask -o ./$PREFIX"_gerber_drill"
# The additional trailing slash is due to a bug in the kicad-cli tool. https://gitlab.com/kicad/code/kicad/-/issues/14438
kicad-cli pcb export drill $PCB -u mm --generate-map --map-format gerberx2 -o ./$PREFIX"_gerber_drill"/
zip -r -j $PREFIX"_gerber_drill" $PREFIX"_gerber_drill"
'';
nativeBuildInputs = [ pkgs.kicad ];
installPhase = ''
mkdir -p $out/production_files
cp $PREFIX"_bom".csv $out/production_files/$PREFIX"_bom".csv
cp $PREFIX.pdf $out/production_files/$PREFIX.pdf
cp $PREFIX"_pos".csv $out/production_files/$PREFIX"_pos.csv"
cp $PREFIX.step $out/production_files/$PREFIX.step
cp $PREFIX"_gerber_drill".zip $out/production_files/$PREFIX"_gerber_drill".zip
# fix "/homeless-shelter cannot be created" error
# see https://github.com/NixOS/nix/issues/670#issuecomment-1211700127
export HOME=$(pwd)
export KICAD${builtins.toString kicad-main-version}_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
cp $PREFIX.step $out/production_files/$PREFIX.step
mkdir -p $out
kicad-cli jobset run ./kirdy_LD_adapter_${variant}.kicad_pro -f ./kirdy_LD_adapter_${variant}.kicad_jobset
cp -r ./result/* $out
'';
};
copper_plate_production_files = pkgs.stdenv.mkDerivation {
name = "production-files";
name = "panel-output";
src = ./kirdy_LD_adapter_copper_plate;
nativeBuildInputs = [ pkgs.kicad pkgs.python3 ];
buildPhase = ''
# kicad-cli requires the use of $HOME
TMP_DIR="$(mktemp --tmpdir -d kicad-kirdy.XXXXXXX)"
export HOME=$TMP_DIR
PCB=kirdy_LD_adapter_copper_plate.kicad_pcb
# Get Revision Number from the Title Block in KiCAD PCB
REV=$(cat $PCB | grep rev | cut -d'"' -f 2)
PREFIX=kirdy_LD_adapter_copper_plate_$REV
export KICAD7_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
kicad-cli pcb export step $PCB --subst-models --force -o $PREFIX.step
'';
nativeBuildInputs = [ pkgs.kicad ];
installPhase = ''
mkdir -p $out/production_files
cp $PREFIX.step $out/production_files/$PREFIX.step
# fix "/homeless-shelter cannot be created" error
# see https://github.com/NixOS/nix/issues/670#issuecomment-1211700127
export HOME=$(pwd)
export KICAD${builtins.toString kicad-main-version}_3DMODEL_DIR=${pkgs.kicad.libraries.packages3d}/share/kicad/3dmodels
mkdir -p $out
kicad-cli jobset run ./kirdy_LD_adapter_copper_plate.kicad_pro -f ./kirdy_LD_adapter_copper_plate.kicad_jobset
ls
cp -r ./result/* $out
'';
};

View File

@@ -0,0 +1,53 @@
{
"jobs": [
{
"description": "",
"id": "d3411486-4073-447f-b7fd-4011a77a45d7",
"settings": {
"board_only": false,
"board_outlines_chaining_epsilon": 0.01,
"cut_vias_in_body": false,
"description": "",
"export_board_body": true,
"export_components": true,
"export_inner_copper": false,
"export_pads": false,
"export_silkscreen": false,
"export_soldermask": false,
"export_tracks": false,
"export_zones": false,
"fill_all_vias": false,
"format": "step",
"fuse_shapes": false,
"include_dnp": true,
"include_unspecified": true,
"occt_format": 0,
"optimize_step": true,
"output_filename": "kirdy_LD_adapter_copper_plate.step",
"overwrite": false,
"subst_models": true,
"use_drill_origin": false,
"use_grid_origin": false,
"user_origin.x": 42.5,
"user_origin.y": 25.0,
"vrml_model_dir": "",
"vrml_relative_paths": false
},
"type": "pcb_export_3d"
}
],
"meta": {
"version": 1
},
"outputs": [
{
"description": "Result",
"id": "ca3c1d2d-86fa-4844-be4c-388f55a58366",
"only": [],
"settings": {
"output_path": "${KIPRJMOD}/result/"
},
"type": "folder"
}
]
}

View File

@@ -3,14 +3,17 @@
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.1,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
@@ -21,7 +24,7 @@
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
@@ -60,15 +63,20 @@
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_near_hole": "error",
"hole_to_hole": "error",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
@@ -78,9 +86,11 @@
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
@@ -92,10 +102,13 @@
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
@@ -108,17 +121,18 @@
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.0,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.09999999999999999,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
@@ -127,48 +141,86 @@
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onviapad": true
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
@@ -176,13 +228,233 @@
"cvpcb": {
"equivalence_files": []
},
"erc": {
"erc_exclusions": [],
"meta": {
"version": 0
},
"pin_map": [
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
2
],
[
0,
1,
0,
0,
0,
0,
1,
1,
2,
1,
1,
2
],
[
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2
],
[
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
2
],
[
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
2
],
[
0,
2,
1,
2,
0,
0,
1,
0,
2,
2,
2,
2
],
[
0,
2,
0,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
0,
2,
1,
1,
0,
0,
1,
0,
2,
0,
0,
2
],
[
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
]
],
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
"no_connect_dangling": "warning",
"pin_not_connected": "error",
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
}
},
"libraries": {
"pinned_footprint_libs": [],
"pinned_symbol_libs": []
},
"meta": {
"filename": "kirdy_LD_adapter_copper_plate.kicad_pro",
"version": 1
"version": 3
},
"net_settings": {
"classes": [
@@ -197,6 +469,7 @@
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
@@ -205,7 +478,7 @@
}
],
"meta": {
"version": 3
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
@@ -216,15 +489,127 @@
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"pos_files": "",
"specctra_dsn": "",
"step": "kirdy_LD_adapter_copper_plate.step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": true,
"label": "Exclude from BOM",
"name": "${EXCLUDE_FROM_BOM}",
"show": true
},
{
"group_by": true,
"label": "Exclude from Board",
"name": "${EXCLUDE_FROM_BOARD}",
"show": true
},
{
"group_by": true,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": true,
"name": "Default Editing",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
"intersheets_ref_own_page": false,
"intersheets_ref_prefix": "",
"intersheets_ref_short": false,
"intersheets_ref_show": false,
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
"legacy_lib_dir": "",
"legacy_lib_list": []
"legacy_lib_list": [],
"meta": {
"version": 1
},
"net_format_name": "",
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
"sheets": [],
"text_variables": {}

View File

@@ -0,0 +1,248 @@
{
"jobs": [
{
"description": "",
"id": "9bab8154-0bf4-48eb-808b-9f5bae31f7d9",
"settings": {
"board_only": false,
"board_outlines_chaining_epsilon": 0.01,
"cut_vias_in_body": false,
"description": "",
"export_board_body": true,
"export_components": true,
"export_inner_copper": false,
"export_pads": false,
"export_silkscreen": false,
"export_soldermask": false,
"export_tracks": false,
"export_zones": false,
"fill_all_vias": false,
"format": "step",
"fuse_shapes": false,
"include_dnp": false,
"include_unspecified": false,
"occt_format": 0,
"optimize_step": true,
"output_filename": "kirdy_LD_adapter_type_1.step",
"overwrite": false,
"subst_models": true,
"use_drill_origin": false,
"use_grid_origin": false,
"user_origin.x": 0.0,
"user_origin.y": 9.9132,
"vrml_model_dir": "",
"vrml_relative_paths": false
},
"type": "pcb_export_3d"
},
{
"description": "",
"id": "c86ba8e6-33ed-4543-baba-d4061a67b24b",
"settings": {
"black_and_white": true,
"create_gerber_job_file": true,
"crossout_dnp_footprints_on_fab_layers": true,
"description": "",
"disable_aperture_macros": false,
"drawing_sheet": "",
"drill_shape": 2,
"hide_dnp_footprints_on_fab_layers": false,
"include_netlist_attributes": true,
"layers": [
"B.Cu",
"B.Mask",
"B.Paste",
"B.SilkS",
"B.Adhes",
"B.Fab",
"In30.Cu",
"In29.Cu",
"In28.Cu",
"In27.Cu",
"In26.Cu",
"In25.Cu",
"In24.Cu",
"In23.Cu",
"In22.Cu",
"In21.Cu",
"In20.Cu",
"In19.Cu",
"In18.Cu",
"In17.Cu",
"In16.Cu",
"In15.Cu",
"In14.Cu",
"In13.Cu",
"In12.Cu",
"In11.Cu",
"In10.Cu",
"In9.Cu",
"In8.Cu",
"In7.Cu",
"In6.Cu",
"In5.Cu",
"In4.Cu",
"In3.Cu",
"In2.Cu",
"In1.Cu",
"F.Cu",
"F.Mask",
"F.Paste",
"F.SilkS",
"F.Adhes",
"F.Fab",
"Edge.Cuts"
],
"layers_to_include_on_all_layers": [],
"mirror": false,
"negative": false,
"output_filename": "./Gerber_Drill",
"plot_drawing_sheet": false,
"plot_footprint_values": true,
"plot_pad_numbers": false,
"plot_ref_des": true,
"precision": 5,
"sketch_dnp_footprints_on_fab_layers": true,
"sketch_pads_on_fab_layers": false,
"subtract_solder_mask_from_silk": false,
"use_drill_origin": false,
"use_protel_file_extension": true,
"use_x2_format": true
},
"type": "pcb_export_gerbers"
},
{
"description": "",
"id": "982b8cc1-d1a6-4d21-9618-6de09261b39e",
"settings": {
"description": "",
"drill_origin": "abs",
"excellon.combine_pth_npth": true,
"excellon.minimal_header": false,
"excellon.mirror_y": false,
"excellon.oval_drill_route": false,
"format": "excellon",
"generate_map": true,
"gerber_precision": 5,
"map_format": "gerberx2",
"output_dir": "./Gerber_Drill",
"units": "in",
"zero_format": "decimal"
},
"type": "pcb_export_drill"
},
{
"description": "",
"id": "1400171f-9276-4f56-a189-5943bb41821e",
"settings": {
"black_and_white": false,
"color_theme": "KiCad Classic",
"description": "",
"drawing_sheet": "",
"format": "pdf",
"hpgl_page_size": "default",
"hpgl_pen_size": 1.016,
"hpgl_plot_origin": "A3",
"min_pen_width": 847,
"output_dir": "",
"page_size": "auto",
"pdf_hierarchical_links": true,
"pdf_metadata": true,
"pdf_property_popups": true,
"plot_all": true,
"plot_drawing_sheet": true,
"use_background_color": true
},
"type": "sch_export_plot_pdf"
},
{
"description": "",
"id": "d5401057-67af-4092-bc81-c4e474297ae2",
"settings": {
"bom_format_preset_name": "CSV",
"bom_preset_name": "",
"description": "",
"exclude_dnp": true,
"field_delimiter": ",",
"fields_group_by": [
"Value",
"Footprint",
"MFR_PN",
"MFR_PN_ALT"
],
"fields_labels": [
"Reference",
"Value",
"Footprint",
"Datasheet",
"Description",
"Qty",
"#",
"Comment",
"MFN_PN_ALT",
"MFR_PN",
"MFR_PN_ALT",
"STORE_NAME"
],
"fields_ordered": [
"Reference",
"Value",
"Footprint",
"__Datasheet",
"__Description",
"${QUANTITY}",
"__${ITEM_NUMBER}",
"__Comment",
"__MFN_PN_ALT",
"MFR_PN",
"MFR_PN_ALT",
"__STORE_NAME"
],
"filter_string": "",
"include_excluded_from_bom": false,
"keep_line_breaks": false,
"keep_tabs": false,
"output_filename": "kirdy_LD_adapter_type_1_BOM.csv",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"sort_asc": true,
"sort_field": "Reference",
"string_delimiter": "\""
},
"type": "sch_export_bom"
},
{
"description": "",
"id": "4470f6fe-9d45-4548-a934-6be3a500d83a",
"settings": {
"description": "",
"exclude_dnp": false,
"exclude_footprints_with_th": false,
"format": "ascii",
"gerber_board_edge": true,
"negate_bottom_x": false,
"output_filename": "kirdy_LD_adapter_type_1_pos",
"side": "both",
"single_file": false,
"smd_only": false,
"units": "mm",
"use_drill_place_file_origin": true
},
"type": "pcb_export_pos"
}
],
"meta": {
"version": 1
},
"outputs": [
{
"description": "Result",
"id": "d6b3396d-dbd2-4e2f-8a8f-65181e082a29",
"only": [],
"settings": {
"output_path": "${KIPRJMOD}/result/"
},
"type": "folder"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,39 @@
{
"board": {
"3dviewports": [],
"3dviewports": [
{
"name": "Bottom",
"ww": 1.0,
"wx": -0.007228970993310213,
"wy": 1.4908688068389893,
"wz": -10.950886726379395,
"xw": 0.0,
"xx": -0.9999879002571106,
"xy": -0.004864359740167856,
"xz": -0.0010255645029246807,
"yw": 0.0,
"yx": -0.004848218522965908,
"yy": 0.999873697757721,
"yz": -0.015205543488264084,
"zw": 0.0,
"zx": 0.0010995195480063558,
"zy": -0.015200416557490826,
"zz": -0.9998838305473328
}
],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.1,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
@@ -21,7 +44,7 @@
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
@@ -67,15 +90,20 @@
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"hole_to_hole": "error",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
@@ -85,9 +113,11 @@
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
@@ -99,10 +129,13 @@
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
@@ -114,21 +147,22 @@
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.127,
"min_clearance": 0.2,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.19999999999999998,
"min_via_annular_width": 0.049999999999999996,
"min_via_diameter": 0.39999999999999997,
"min_track_width": 0.2,
"min_via_annular_width": 0.05,
"min_via_diameter": 0.4,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
@@ -136,40 +170,44 @@
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onviapad": true
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
@@ -177,12 +215,38 @@
"track_widths": [
0.0,
0.2,
0.2921,
0.3493,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
@@ -196,6 +260,14 @@
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"ipc2581": {
"dist": "",
"distpn": "",
"internal_id": "",
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
@@ -390,10 +462,15 @@
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
@@ -406,9 +483,14 @@
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
@@ -420,7 +502,7 @@
},
"meta": {
"filename": "kirdy_LD_adapter_type_1.kicad_pro",
"version": 1
"version": 3
},
"net_settings": {
"classes": [
@@ -435,6 +517,7 @@
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
@@ -443,7 +526,7 @@
}
],
"meta": {
"version": 3
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
@@ -454,14 +537,77 @@
"gencad": "",
"idf": "",
"netlist": "",
"plot": "./Gerber_Drill",
"pos_files": "",
"specctra_dsn": "",
"step": "../../../kirdy/kirdy.pretty/Kirdy_LD_Adapter.step",
"step": ".step",
"svg": "",
"vrml": ""
},
"page_layout_descr_file": ""
},
"schematic": {
"annotate_start_num": 0,
"bom_export_filename": "",
"bom_fmt_presets": [],
"bom_fmt_settings": {
"field_delimiter": ",",
"keep_line_breaks": false,
"keep_tabs": false,
"name": "CSV",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"string_delimiter": "\""
},
"bom_presets": [],
"bom_settings": {
"exclude_dnp": false,
"fields_ordered": [
{
"group_by": false,
"label": "Reference",
"name": "Reference",
"show": true
},
{
"group_by": true,
"label": "Value",
"name": "Value",
"show": true
},
{
"group_by": false,
"label": "Datasheet",
"name": "Datasheet",
"show": true
},
{
"group_by": false,
"label": "Footprint",
"name": "Footprint",
"show": true
},
{
"group_by": false,
"label": "Qty",
"name": "${QUANTITY}",
"show": true
},
{
"group_by": true,
"label": "DNP",
"name": "${DNP}",
"show": true
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": false,
"name": "Grouped By Value",
"sort_asc": true,
"sort_field": "Reference"
},
"connection_grid_size": 50.0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
@@ -475,6 +621,11 @@
"intersheets_ref_suffix": "",
"junction_size_choice": 3,
"label_size_ratio": 0.375,
"operating_point_overlay_i_precision": 3,
"operating_point_overlay_i_range": "~A",
"operating_point_overlay_v_precision": 3,
"operating_point_overlay_v_range": "~V",
"overbar_offset_ratio": 1.23,
"pin_symbol_size": 25.0,
"text_offset_ratio": 0.15
},
@@ -495,11 +646,13 @@
},
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_adjust_passive_values": false,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_dissipations": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
@@ -507,7 +660,7 @@
"sheets": [
[
"96b73a3e-7f6b-4c8b-ab88-a7f05b40ca65",
""
"Root"
]
],
"text_variables": {}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
(module "14620423" (layer F.Cu)
(descr "1462042-3-3")
(tags "Relay or Contactor")
(attr smd)
(fp_text reference K** (at 0.000 0.525) (layer F.SilkS)
(effects (font (size 1.27 1.27) (thickness 0.254)))
)
(fp_text user %R (at 0.000 0.525) (layer F.Fab)
(effects (font (size 1.27 1.27) (thickness 0.254)))
)
(fp_text value "14620423" (at 0.000 0.525) (layer F.SilkS) hide
(effects (font (size 1.27 1.27) (thickness 0.254)))
)
(fp_line (start -5 3) (end 5 3) (layer F.Fab) (width 0.2))
(fp_line (start 5 3) (end 5 -3) (layer F.Fab) (width 0.2))
(fp_line (start 5 -3) (end -5 -3) (layer F.Fab) (width 0.2))
(fp_line (start -5 -3) (end -5 3) (layer F.Fab) (width 0.2))
(fp_line (start -5 -3) (end -5 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -5 -3) (end -5 3) (layer F.SilkS) (width 0.1))
(fp_line (start -5 3) (end -5 3) (layer F.SilkS) (width 0.1))
(fp_line (start -5 3) (end -5 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -2.8 3) (end 0.45 3) (layer F.SilkS) (width 0.1))
(fp_line (start 0.45 3) (end 0.45 3) (layer F.SilkS) (width 0.1))
(fp_line (start 0.45 3) (end -2.8 3) (layer F.SilkS) (width 0.1))
(fp_line (start -2.8 3) (end -2.8 3) (layer F.SilkS) (width 0.1))
(fp_line (start 2.7 3) (end 5 3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 3) (end 5 3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 3) (end 2.7 3) (layer F.SilkS) (width 0.1))
(fp_line (start 2.7 3) (end 2.7 3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 3) (end 5 3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 3) (end 5 -3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 -3) (end 5 -3) (layer F.SilkS) (width 0.1))
(fp_line (start 5 -3) (end 5 3) (layer F.SilkS) (width 0.1))
(fp_line (start 2.45 -3) (end 0.7 -3) (layer F.SilkS) (width 0.1))
(fp_line (start 0.7 -3) (end 0.7 -3) (layer F.SilkS) (width 0.1))
(fp_line (start 0.7 -3) (end 2.45 -3) (layer F.SilkS) (width 0.1))
(fp_line (start 2.45 -3) (end 2.45 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -1.55 -3) (end -2.8 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -2.8 -3) (end -2.8 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -2.8 -3) (end -1.55 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -1.55 -3) (end -1.55 -3) (layer F.SilkS) (width 0.1))
(fp_line (start -6 -5) (end 6 -5) (layer F.CrtYd) (width 0.1))
(fp_line (start 6 -5) (end 6 6.05) (layer F.CrtYd) (width 0.1))
(fp_line (start 6 6.05) (end -6 6.05) (layer F.CrtYd) (width 0.1))
(fp_line (start -6 6.05) (end -6 -5) (layer F.CrtYd) (width 0.1))
(fp_line (start -3.9 5) (end -3.9 5) (layer F.SilkS) (width 0.2))
(fp_line (start -3.8 5) (end -3.8 5) (layer F.SilkS) (width 0.2))
(fp_line (start -3.9 5) (end -3.9 5) (layer F.SilkS) (width 0.2))
(fp_arc (start -3.85 5) (end -3.900 5) (angle -180) (layer F.SilkS) (width 0.2))
(fp_arc (start -3.85 5) (end -3.800 5) (angle -180) (layer F.SilkS) (width 0.2))
(fp_arc (start -3.85 5) (end -3.900 5) (angle -180) (layer F.SilkS) (width 0.2))
(pad 1 smd rect (at -3.800 3 0) (size 0.700 2.000) (layers F.Cu F.Paste F.Mask))
(pad 3 smd rect (at 1.600 3 0) (size 0.700 2.000) (layers F.Cu F.Paste F.Mask))
(pad 5 smd rect (at 3.800 -3 0) (size 0.700 2.000) (layers F.Cu F.Paste F.Mask))
(pad 7 smd rect (at -0.600 -3 0) (size 0.700 2.000) (layers F.Cu F.Paste F.Mask))
(pad 8 smd rect (at -3.800 -3 0) (size 0.700 2.000) (layers F.Cu F.Paste F.Mask))
(model 1462042-3.stp
(at (xyz 0 -0.00039370077860168 0.039370078740157))
(scale (xyz 1 1 1))
(rotate (xyz -180 0 0))
)
)

View File

@@ -0,0 +1,296 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION (( 'STEP AP214' ),
'1' );
FILE_NAME ('9774010151R (rev1).STEP',
'2025-05-08T10:05:50',
( '' ),
( '' ),
'SwSTEP 2.0',
'SolidWorks 2024',
'' );
FILE_SCHEMA (( 'AUTOMOTIVE_DESIGN' ));
ENDSEC;
DATA;
#1 = EDGE_CURVE ( 'NONE', #137, #72, #188, .T. ) ;
#2 = LINE ( 'NONE', #170, #107 ) ;
#3 = ORIENTED_EDGE ( 'NONE', *, *, #63, .F. ) ;
#4 = CARTESIAN_POINT ( 'NONE', ( 1.006499999999998174, 1.232607003341811047E-16, -6.601315675591959753 ) ) ;
#5 = ORIENTED_EDGE ( 'NONE', *, *, #112, .T. ) ;
#6 = EDGE_CURVE ( 'NONE', #177, #48, #7, .T. ) ;
#7 = CIRCLE ( 'NONE', #14, 1.750000000000000000 ) ;
#8 = ORIENTED_EDGE ( 'NONE', *, *, #63, .T. ) ;
#9 = ORIENTED_EDGE ( 'NONE', *, *, #6, .F. ) ;
#10 = EDGE_LOOP ( 'NONE', ( #140, #26, #27, #68 ) ) ;
#11 = CARTESIAN_POINT ( 'NONE', ( -2.549999999999998046, 3.122849337825750419E-16, 1.000000000000000666 ) ) ;
#12 = LINE ( 'NONE', #248, #146 ) ;
#13 = ADVANCED_FACE ( 'NONE', ( #181 ), #268, .T. ) ;
#14 = AXIS2_PLACEMENT_3D ( 'NONE', #123, #34, #17 ) ;
#15 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#16 = STYLED_ITEM ( 'NONE', ( #80 ), #74 ) ;
#17 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.478176394252581634E-16 ) ) ;
#18 = ADVANCED_FACE ( 'NONE', ( #78 ), #145, .F. ) ;
#19 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.397752598981100734E-16 ) ) ;
#20 = CARTESIAN_POINT ( 'NONE', ( 1.006499999999999506, 1.232607003341811047E-16, -1.400000000000000355 ) ) ;
#21 = FACE_OUTER_BOUND ( 'NONE', #239, .T. ) ;
#22 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799995E-15, 0.000000000000000000, 1.000000000000000000 ) ) ;
#23 = CARTESIAN_POINT ( 'NONE', ( 2.550000000000001599, 0.000000000000000000, 0.9999999999999986677 ) ) ;
#24 = CARTESIAN_POINT ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#25 = EDGE_CURVE ( 'NONE', #240, #258, #96, .T. ) ;
#26 = ORIENTED_EDGE ( 'NONE', *, *, #167, .F. ) ;
#27 = ORIENTED_EDGE ( 'NONE', *, *, #196, .T. ) ;
#28 = AXIS2_PLACEMENT_3D ( 'NONE', #143, #227, #104 ) ;
#29 = AXIS2_PLACEMENT_3D ( 'NONE', #67, #213, #39 ) ;
#30 = EDGE_LOOP ( 'NONE', ( #119, #262, #134, #53 ) ) ;
#31 = ORIENTED_EDGE ( 'NONE', *, *, #55, .F. ) ;
#32 = EDGE_CURVE ( 'NONE', #240, #224, #12, .T. ) ;
#33 = ORIENTED_EDGE ( 'NONE', *, *, #93, .T. ) ;
#34 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#35 = EDGE_CURVE ( 'NONE', #224, #222, #249, .T. ) ;
#36 = CARTESIAN_POINT ( 'NONE', ( -1.715881290328599963E-15, 0.000000000000000000, -6.601315675591959753 ) ) ;
#37 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#38 = LINE ( 'NONE', #231, #269 ) ;
#39 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.154400740159969136E-16 ) ) ;
#40 = FACE_BOUND ( 'NONE', #263, .T. ) ;
#41 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#42 = CLOSED_SHELL ( 'NONE', ( #225, #18, #13, #135, #115, #252, #83, #144, #261 ) ) ;
#43 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.397752598981100241E-16 ) ) ;
#44 = EDGE_CURVE ( 'NONE', #175, #120, #246, .T. ) ;
#45 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#46 =( NAMED_UNIT ( * ) SI_UNIT ( $, .STERADIAN. ) SOLID_ANGLE_UNIT ( ) );
#47 = ORIENTED_EDGE ( 'NONE', *, *, #163, .F. ) ;
#48 = VERTEX_POINT ( 'NONE', #207 ) ;
#49 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#50 = UNCERTAINTY_MEASURE_WITH_UNIT (LENGTH_MEASURE( 1.000000000000000082E-05 ), #237, 'distance_accuracy_value', 'NONE');
#51 = ORIENTED_EDGE ( 'NONE', *, *, #275, .F. ) ;
#52 = ORIENTED_EDGE ( 'NONE', *, *, #1, .F. ) ;
#53 = ORIENTED_EDGE ( 'NONE', *, *, #44, .F. ) ;
#54 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, 0.000000000000000000, -1.000000000000000000 ) ) ;
#55 = EDGE_CURVE ( 'NONE', #137, #120, #38, .T. ) ;
#56 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.397752598981100734E-16 ) ) ;
#57 =( LENGTH_UNIT ( ) NAMED_UNIT ( * ) SI_UNIT ( .MILLI., .METRE. ) );
#58 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#59 = SURFACE_STYLE_USAGE ( .BOTH. , #244 ) ;
#60 = AXIS2_PLACEMENT_3D ( 'NONE', #194, #125, #19 ) ;
#61 = CARTESIAN_POINT ( 'NONE', ( -1.749999999999998224, 2.143131898507868297E-16, 1.000000000000000444 ) ) ;
#62 = CYLINDRICAL_SURFACE ( 'NONE', #255, 1.006499999999999950 ) ;
#63 = EDGE_CURVE ( 'NONE', #258, #240, #142, .T. ) ;
#64 = CYLINDRICAL_SURFACE ( 'NONE', #164, 1.750000000000000000 ) ;
#65 = VECTOR ( 'NONE', #108, 1000.000000000000000 ) ;
#66 = CARTESIAN_POINT ( 'NONE', ( -2.549999999999998046, 3.122849337825750419E-16, 1.000000000000000000 ) ) ;
#67 = CARTESIAN_POINT ( 'NONE', ( -4.687344724014240493E-16, 0.000000000000000000, -1.400000000000000133 ) ) ;
#68 = ORIENTED_EDGE ( 'NONE', *, *, #182, .F. ) ;
#69 = AXIS2_PLACEMENT_3D ( 'NONE', #171, #45, #233 ) ;
#70 = SHAPE_DEFINITION_REPRESENTATION ( #111, #127 ) ;
#71 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.478176394252581634E-16 ) ) ;
#72 = VERTEX_POINT ( 'NONE', #102 ) ;
#73 = ORIENTED_EDGE ( 'NONE', *, *, #210, .T. ) ;
#74 = MANIFOLD_SOLID_BREP ( '1', #42 ) ;
#75 = VERTEX_POINT ( 'NONE', #99 ) ;
#76 = CARTESIAN_POINT ( 'NONE', ( -1.750000000000000000, 0.000000000000000000, -1.298199481808869906E-16 ) ) ;
#77 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.154400740159969136E-16 ) ) ;
#78 = FACE_OUTER_BOUND ( 'NONE', #157, .T. ) ;
#79 = CIRCLE ( 'NONE', #121, 1.750000000000000000 ) ;
#80 = PRESENTATION_STYLE_ASSIGNMENT (( #59 ) ) ;
#81 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#82 = PLANE ( 'NONE', #265 ) ;
#83 = ADVANCED_FACE ( 'NONE', ( #180, #100 ), #266, .T. ) ;
#84 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.397752598981100241E-16 ) ) ;
#85 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#86 = CARTESIAN_POINT ( 'NONE', ( 2.919011142329400218E-16, 0.000000000000000000, -1.399999999999999911 ) ) ;
#87 = VERTEX_POINT ( 'NONE', #206 ) ;
#88 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#89 = ORIENTED_EDGE ( 'NONE', *, *, #25, .F. ) ;
#90 = AXIS2_PLACEMENT_3D ( 'NONE', #122, #229, #77 ) ;
#91 = UNCERTAINTY_MEASURE_WITH_UNIT (LENGTH_MEASURE( 1.000000000000000082E-05 ), #57, 'distance_accuracy_value', 'NONE');
#92 = ORIENTED_EDGE ( 'NONE', *, *, #35, .F. ) ;
#93 = EDGE_CURVE ( 'NONE', #72, #175, #183, .T. ) ;
#94 = ORIENTED_EDGE ( 'NONE', *, *, #35, .T. ) ;
#95 = ORIENTED_EDGE ( 'NONE', *, *, #1, .T. ) ;
#96 = CIRCLE ( 'NONE', #151, 1.006499999999999950 ) ;
#97 = AXIS2_PLACEMENT_3D ( 'NONE', #76, #54, #141 ) ;
#98 = APPLICATION_CONTEXT ( 'automotive_design' ) ;
#99 = CARTESIAN_POINT ( 'NONE', ( -1.749999999999998446, 2.143131898507868297E-16, -1.407416417250921291E-17 ) ) ;
#100 = FACE_OUTER_BOUND ( 'NONE', #156, .T. ) ;
#101 = FILL_AREA_STYLE ('',( #162 ) ) ;
#102 = CARTESIAN_POINT ( 'NONE', ( -2.549999999999998490, 3.122849337825750419E-16, -3.909439075112214081E-17 ) ) ;
#103 = CIRCLE ( 'NONE', #60, 2.549999999999999822 ) ;
#104 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.478176394252581634E-16 ) ) ;
#105 = CARTESIAN_POINT ( 'NONE', ( 1.159262852221335779E-15, 0.000000000000000000, -1.400000000000000577 ) ) ;
#106 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.478176394252581634E-16 ) ) ;
#107 = VECTOR ( 'NONE', #251, 1000.000000000000000 ) ;
#108 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#109 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.551063935260010491E-16 ) ) ;
#110 = FACE_BOUND ( 'NONE', #198, .T. ) ;
#111 = PRODUCT_DEFINITION_SHAPE ( 'NONE', 'NONE', #241 ) ;
#112 = EDGE_CURVE ( 'NONE', #120, #175, #250, .T. ) ;
#113 = EDGE_LOOP ( 'NONE', ( #9, #176, #199, #242 ) ) ;
#114 = ORIENTED_EDGE ( 'NONE', *, *, #44, .T. ) ;
#115 = ADVANCED_FACE ( 'NONE', ( #168 ), #152, .T. ) ;
#116 = AXIS2_PLACEMENT_3D ( 'NONE', #185, #161, #228 ) ;
#117 = AXIS2_PLACEMENT_3D ( 'NONE', #247, #267, #272 ) ;
#118 =( NAMED_UNIT ( * ) PLANE_ANGLE_UNIT ( ) SI_UNIT ( $, .RADIAN. ) );
#119 = ORIENTED_EDGE ( 'NONE', *, *, #93, .F. ) ;
#120 = VERTEX_POINT ( 'NONE', #23 ) ;
#121 = AXIS2_PLACEMENT_3D ( 'NONE', #105, #81, #106 ) ;
#122 = CARTESIAN_POINT ( 'NONE', ( -4.687344724014240493E-16, 0.000000000000000000, -1.400000000000000133 ) ) ;
#123 = CARTESIAN_POINT ( 'NONE', ( 1.159262852221335779E-15, 0.000000000000000000, -1.400000000000000577 ) ) ;
#124 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#125 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#126 = CARTESIAN_POINT ( 'NONE', ( 1.494948216078689872E-15, 0.000000000000000000, -4.336808689942017736E-16 ) ) ;
#127 = ADVANCED_BREP_SHAPE_REPRESENTATION ( '9774010151R (rev1)', ( #74, #169 ), #190 ) ;
#128 = FACE_OUTER_BOUND ( 'NONE', #160, .T. ) ;
#129 = VECTOR ( 'NONE', #149, 1000.000000000000000 ) ;
#130 = PLANE ( 'NONE', #205 ) ;
#131 = FACE_OUTER_BOUND ( 'NONE', #10, .T. ) ;
#132 = AXIS2_PLACEMENT_3D ( 'NONE', #174, #153, #109 ) ;
#133 = LINE ( 'NONE', #4, #203 ) ;
#134 = ORIENTED_EDGE ( 'NONE', *, *, #55, .T. ) ;
#135 = ADVANCED_FACE ( 'NONE', ( #21, #110 ), #82, .T. ) ;
#136 = ORIENTED_EDGE ( 'NONE', *, *, #112, .F. ) ;
#137 = VERTEX_POINT ( 'NONE', #232 ) ;
#138 = PRODUCT_CONTEXT ( 'NONE', #98, 'mechanical' ) ;
#139 = ORIENTED_EDGE ( 'NONE', *, *, #192, .F. ) ;
#140 = ORIENTED_EDGE ( 'NONE', *, *, #214, .F. ) ;
#141 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.397752598981100241E-16 ) ) ;
#142 = CIRCLE ( 'NONE', #117, 1.006499999999999950 ) ;
#143 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799995E-15, 0.000000000000000000, 1.000000000000000000 ) ) ;
#144 = ADVANCED_FACE ( 'NONE', ( #128, #40 ), #130, .T. ) ;
#145 = CYLINDRICAL_SURFACE ( 'NONE', #201, 1.006499999999999950 ) ;
#146 = VECTOR ( 'NONE', #58, 1000.000000000000000 ) ;
#147 =( NAMED_UNIT ( * ) SI_UNIT ( $, .STERADIAN. ) SOLID_ANGLE_UNIT ( ) );
#148 = AXIS2_PLACEMENT_3D ( 'NONE', #274, #212, #84 ) ;
#149 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#150 = CARTESIAN_POINT ( 'NONE', ( -1.715881290328599963E-15, 0.000000000000000000, -6.601315675591959753 ) ) ;
#151 = AXIS2_PLACEMENT_3D ( 'NONE', #209, #166, #273 ) ;
#152 = CYLINDRICAL_SURFACE ( 'NONE', #132, 2.549999999999999822 ) ;
#153 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#154 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, 0.000000000000000000, -1.000000000000000000 ) ) ;
#155 = EDGE_LOOP ( 'NONE', ( #95, #33, #136, #31 ) ) ;
#156 = EDGE_LOOP ( 'NONE', ( #52, #47 ) ) ;
#157 = EDGE_LOOP ( 'NONE', ( #3, #264, #92, #202 ) ) ;
#158 = AXIS2_PLACEMENT_3D ( 'NONE', #245, #186, #56 ) ;
#159 = APPLICATION_CONTEXT ( 'automotive_design' ) ;
#160 = EDGE_LOOP ( 'NONE', ( #179, #221 ) ) ;
#161 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#162 = FILL_AREA_STYLE_COLOUR ( '', #208 ) ;
#163 = EDGE_CURVE ( 'NONE', #72, #137, #103, .T. ) ;
#164 = AXIS2_PLACEMENT_3D ( 'NONE', #22, #216, #71 ) ;
#165 = SURFACE_STYLE_FILL_AREA ( #101 ) ;
#166 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#167 = EDGE_CURVE ( 'NONE', #48, #177, #79, .T. ) ;
#168 = FACE_OUTER_BOUND ( 'NONE', #30, .T. ) ;
#169 = AXIS2_PLACEMENT_3D ( 'NONE', #24, #49, #218 ) ;
#170 = CARTESIAN_POINT ( 'NONE', ( 1.750000000000001776, 0.000000000000000000, 0.9999999999999995559 ) ) ;
#171 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799995E-15, 0.000000000000000000, 1.000000000000000000 ) ) ;
#172 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, -0.000000000000000000, 1.000000000000000000 ) ) ;
#173 = AXIS2_PLACEMENT_3D ( 'NONE', #234, #85, #187 ) ;
#174 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799995E-15, 0.000000000000000000, 1.000000000000000000 ) ) ;
#175 = VERTEX_POINT ( 'NONE', #66 ) ;
#176 = ORIENTED_EDGE ( 'NONE', *, *, #214, .T. ) ;
#177 = VERTEX_POINT ( 'NONE', #257 ) ;
#178 = ORIENTED_EDGE ( 'NONE', *, *, #25, .T. ) ;
#179 = ORIENTED_EDGE ( 'NONE', *, *, #167, .T. ) ;
#180 = FACE_BOUND ( 'NONE', #223, .T. ) ;
#181 = FACE_OUTER_BOUND ( 'NONE', #113, .T. ) ;
#182 = EDGE_CURVE ( 'NONE', #75, #87, #217, .T. ) ;
#183 = LINE ( 'NONE', #11, #129 ) ;
#184 = CIRCLE ( 'NONE', #148, 1.750000000000000000 ) ;
#185 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799797E-15, 0.000000000000000000, 0.9999999999999993339 ) ) ;
#186 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#187 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.551063935260010491E-16 ) ) ;
#188 = CIRCLE ( 'NONE', #158, 2.549999999999999822 ) ;
#189 = LINE ( 'NONE', #61, #65 ) ;
#190 =( GEOMETRIC_REPRESENTATION_CONTEXT ( 3 ) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT ( ( #50 ) ) GLOBAL_UNIT_ASSIGNED_CONTEXT ( ( #237, #118, #46 ) ) REPRESENTATION_CONTEXT ( 'NONE', 'WORKASPACE' ) );
#191 = FACE_OUTER_BOUND ( 'NONE', #155, .T. ) ;
#192 = EDGE_CURVE ( 'NONE', #222, #224, #235, .T. ) ;
#193 = CARTESIAN_POINT ( 'NONE', ( -1.006499999999999950, 0.000000000000000000, 1.000000000000000222 ) ) ;
#194 = CARTESIAN_POINT ( 'NONE', ( 1.494948216078689872E-15, 0.000000000000000000, -6.505213034913026604E-16 ) ) ;
#195 = PRODUCT ( '9774010151R (rev1)', '9774010151R (rev1)', '', ( #138 ) ) ;
#196 = EDGE_CURVE ( 'NONE', #48, #87, #2, .T. ) ;
#197 = APPLICATION_PROTOCOL_DEFINITION ( 'draft international standard', 'automotive_design', 1998, #98 ) ;
#198 = EDGE_LOOP ( 'NONE', ( #178, #8 ) ) ;
#199 = ORIENTED_EDGE ( 'NONE', *, *, #210, .F. ) ;
#200 = APPLICATION_PROTOCOL_DEFINITION ( 'draft international standard', 'automotive_design', 1998, #159 ) ;
#201 = AXIS2_PLACEMENT_3D ( 'NONE', #36, #15, #124 ) ;
#202 = ORIENTED_EDGE ( 'NONE', *, *, #32, .F. ) ;
#203 = VECTOR ( 'NONE', #88, 1000.000000000000000 ) ;
#204 = ORIENTED_EDGE ( 'NONE', *, *, #192, .T. ) ;
#205 = AXIS2_PLACEMENT_3D ( 'NONE', #86, #154, #256 ) ;
#206 = CARTESIAN_POINT ( 'NONE', ( 1.750000000000001776, 0.000000000000000000, -8.532875738158943898E-16 ) ) ;
#207 = CARTESIAN_POINT ( 'NONE', ( 1.750000000000001110, 0.000000000000000000, -1.400000000000001021 ) ) ;
#208 = COLOUR_RGB ( '',0.6431372549019607199, 0.6784313725490196401, 0.6980392156862744724 ) ;
#209 = CARTESIAN_POINT ( 'NONE', ( 1.067261513540399199E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#210 = EDGE_CURVE ( 'NONE', #87, #75, #184, .T. ) ;
#211 = CARTESIAN_POINT ( 'NONE', ( -2.549999999999999822, 0.000000000000000000, 1.000000000000000000 ) ) ;
#212 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#213 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#214 = EDGE_CURVE ( 'NONE', #177, #75, #189, .T. ) ;
#215 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#216 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#217 = CIRCLE ( 'NONE', #238, 1.750000000000000000 ) ;
#218 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#219 = PRODUCT_DEFINITION_CONTEXT ( 'detailed design', #159, 'design' ) ;
#220 = ORIENTED_EDGE ( 'NONE', *, *, #32, .T. ) ;
#221 = ORIENTED_EDGE ( 'NONE', *, *, #6, .T. ) ;
#222 = VERTEX_POINT ( 'NONE', #20 ) ;
#223 = EDGE_LOOP ( 'NONE', ( #73, #243 ) ) ;
#224 = VERTEX_POINT ( 'NONE', #277 ) ;
#225 = ADVANCED_FACE ( 'NONE', ( #191 ), #253, .T. ) ;
#226 =( NAMED_UNIT ( * ) PLANE_ANGLE_UNIT ( ) SI_UNIT ( $, .RADIAN. ) );
#227 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#228 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.551063935260010491E-16 ) ) ;
#229 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#230 = PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE ( 'ANY', '', #195, .NOT_KNOWN. ) ;
#231 = CARTESIAN_POINT ( 'NONE', ( 2.550000000000001599, 0.000000000000000000, 0.9999999999999993339 ) ) ;
#232 = CARTESIAN_POINT ( 'NONE', ( 2.550000000000001155, 0.000000000000000000, -1.261948216231483316E-15 ) ) ;
#233 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.551063935260010491E-16 ) ) ;
#234 = CARTESIAN_POINT ( 'NONE', ( 1.734723475976799797E-15, 0.000000000000000000, 0.9999999999999993339 ) ) ;
#235 = CIRCLE ( 'NONE', #29, 1.006499999999999950 ) ;
#236 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -2.397752598981100241E-16 ) ) ;
#237 =( LENGTH_UNIT ( ) NAMED_UNIT ( * ) SI_UNIT ( .MILLI., .METRE. ) );
#238 = AXIS2_PLACEMENT_3D ( 'NONE', #126, #215, #236 ) ;
#239 = EDGE_LOOP ( 'NONE', ( #5, #114 ) ) ;
#240 = VERTEX_POINT ( 'NONE', #193 ) ;
#241 = PRODUCT_DEFINITION ( 'UNKNOWN', '', #230, #219 ) ;
#242 = ORIENTED_EDGE ( 'NONE', *, *, #196, .F. ) ;
#243 = ORIENTED_EDGE ( 'NONE', *, *, #182, .T. ) ;
#244 = SURFACE_SIDE_STYLE ('',( #165 ) ) ;
#245 = CARTESIAN_POINT ( 'NONE', ( 1.494948216078689872E-15, 0.000000000000000000, -6.505213034913026604E-16 ) ) ;
#246 = CIRCLE ( 'NONE', #116, 2.549999999999999822 ) ;
#247 = CARTESIAN_POINT ( 'NONE', ( 1.067261513540399199E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#248 = CARTESIAN_POINT ( 'NONE', ( -1.006500000000001727, 0.000000000000000000, -6.601315675591959753 ) ) ;
#249 = CIRCLE ( 'NONE', #90, 1.006499999999999950 ) ;
#250 = CIRCLE ( 'NONE', #173, 2.549999999999999822 ) ;
#251 = DIRECTION ( 'NONE', ( 2.397752598981100241E-16, 0.000000000000000000, 1.000000000000000000 ) ) ;
#252 = ADVANCED_FACE ( 'NONE', ( #279 ), #62, .F. ) ;
#253 = CYLINDRICAL_SURFACE ( 'NONE', #69, 2.549999999999999822 ) ;
#254 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#255 = AXIS2_PLACEMENT_3D ( 'NONE', #150, #254, #41 ) ;
#256 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.397752598981100241E-16 ) ) ;
#257 = CARTESIAN_POINT ( 'NONE', ( -1.749999999999999112, 2.143131898507868544E-16, -1.400000000000000133 ) ) ;
#258 = VERTEX_POINT ( 'NONE', #278 ) ;
#259 = PRESENTATION_LAYER_ASSIGNMENT ( '', '', ( #16 ) ) ;
#260 = EDGE_LOOP ( 'NONE', ( #51, #89, #220, #139 ) ) ;
#261 = ADVANCED_FACE ( 'NONE', ( #131 ), #64, .T. ) ;
#262 = ORIENTED_EDGE ( 'NONE', *, *, #163, .T. ) ;
#263 = EDGE_LOOP ( 'NONE', ( #94, #204 ) ) ;
#264 = ORIENTED_EDGE ( 'NONE', *, *, #275, .T. ) ;
#265 = AXIS2_PLACEMENT_3D ( 'NONE', #211, #172, #43 ) ;
#266 = PLANE ( 'NONE', #97 ) ;
#267 = DIRECTION ( 'NONE', ( -2.397752598981100241E-16, -0.000000000000000000, -1.000000000000000000 ) ) ;
#268 = CYLINDRICAL_SURFACE ( 'NONE', #28, 1.750000000000000000 ) ;
#269 = VECTOR ( 'NONE', #37, 1000.000000000000000 ) ;
#270 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION ( '', ( #16 ), #276 ) ;
#271 = PRODUCT_RELATED_PRODUCT_CATEGORY ( 'part', '', ( #195 ) ) ;
#272 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.154400740159969136E-16 ) ) ;
#273 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 2.154400740159969136E-16 ) ) ;
#274 = CARTESIAN_POINT ( 'NONE', ( 1.494948216078689872E-15, 0.000000000000000000, -4.336808689942017736E-16 ) ) ;
#275 = EDGE_CURVE ( 'NONE', #258, #222, #133, .T. ) ;
#276 =( GEOMETRIC_REPRESENTATION_CONTEXT ( 3 ) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT ( ( #91 ) ) GLOBAL_UNIT_ASSIGNED_CONTEXT ( ( #57, #226, #147 ) ) REPRESENTATION_CONTEXT ( 'NONE', 'WORKASPACE' ) );
#277 = CARTESIAN_POINT ( 'NONE', ( -1.006500000000000394, -2.465214006683622094E-16, -1.399999999999999911 ) ) ;
#278 = CARTESIAN_POINT ( 'NONE', ( 1.006499999999999950, 1.232607003341811294E-16, 0.9999999999999997780 ) ) ;
#279 = FACE_OUTER_BOUND ( 'NONE', #260, .T. ) ;
ENDSEC;
END-ISO-10303-21;

View File

@@ -1,49 +1,219 @@
(footprint "LD_Heat_Sink" (version 20221018) (generator pcbnew)
(layer "F.Cu")
(attr smd)
(fp_text reference "REF**" (at 2 -0.8 unlocked) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.1)))
(tstamp b03508c4-b870-4a6c-8081-4a3172acbcc5)
)
(fp_text value "LD_Heat_Sink" (at 0 1 unlocked) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp a0fa68b9-ef2c-4687-87d4-aebc85f361b1)
)
(fp_text user "${REFERENCE}" (at 0 2.5 unlocked) (layer "F.Fab")
(effects (font (size 1 1) (thickness 0.15)))
(tstamp ee47ee06-c924-4e15-a665-2f893aaca683)
)
(fp_line (start 0 0) (end 0 43.2)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp e1b2467a-849d-45b9-9f3c-2685c4dcd8ac))
(fp_line (start 0 43.2) (end 13.237 43.2)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp ec212cd5-00bf-4133-bc26-ccbe54309d25))
(fp_line (start 13.237 43.2) (end 13.237 50)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp f98ebb46-3a1d-48d5-ba63-983b16cc7581))
(fp_line (start 13.237 50) (end 85 50)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 66a57136-02b2-47f9-b55f-8e94953b2188))
(fp_line (start 20 0) (end 0 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 799c80cf-38f7-4367-8431-d21acddd9ca6))
(fp_line (start 20 38.8) (end 20 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 8ebe8182-cf22-4829-b4fb-e4da639edc80))
(fp_line (start 33.86 0) (end 33.86 38.8)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp c8334ace-8dc2-4a3a-9b5f-eb043a943919))
(fp_line (start 33.86 38.8) (end 20 38.8)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 93634a35-66a4-483e-9033-a37c80573ec6))
(fp_line (start 51.14 0) (end 33.86 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 3e107afb-3bce-4862-bdfe-43be8f99d27a))
(fp_line (start 51.14 38.8) (end 51.14 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 7d78005b-79e2-4ed1-8c95-c6e6377aade7))
(fp_line (start 65 0) (end 65 38.8)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 7e8e8b21-d486-454f-976e-c47119a42e6c))
(fp_line (start 65 38.8) (end 51.14 38.8)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp a4698f07-e62f-4085-9224-6e739071ad77))
(fp_line (start 85 0) (end 65 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp 632100a3-370a-4dd3-b967-0b46b613d56f))
(fp_line (start 85 50) (end 85 0)
(stroke (width 0.1) (type default)) (layer "F.Fab") (tstamp c4a85d4c-95f9-4ca5-9166-a7ed4eb818d5))
(model "${KIPRJMOD}/laserSocket.pretty/kirdy_LD_adapter_copper_plate.step"
(offset (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
(footprint "LD_Heat_Sink"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(property "Reference" "REF**"
(at 2 -0.8 0)
(unlocked yes)
(layer "F.SilkS")
(uuid "b03508c4-b870-4a6c-8081-4a3172acbcc5")
(effects
(font
(size 1 1)
(thickness 0.1)
)
)
)
(property "Value" "LD_Heat_Sink"
(at 0 1 0)
(unlocked yes)
(layer "F.Fab")
(uuid "a0fa68b9-ef2c-4687-87d4-aebc85f361b1")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "e94bbce7-bc71-47cc-b260-8f2228b56af4")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "5d29fae0-1beb-4417-ab62-c7ba2c130413")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr smd)
(fp_line
(start 0 0)
(end 0 43.2)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "e1b2467a-849d-45b9-9f3c-2685c4dcd8ac")
)
(fp_line
(start 0 43.2)
(end 13.237 43.2)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "ec212cd5-00bf-4133-bc26-ccbe54309d25")
)
(fp_line
(start 13.237 43.2)
(end 13.237 50)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "f98ebb46-3a1d-48d5-ba63-983b16cc7581")
)
(fp_line
(start 13.237 50)
(end 85 50)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "66a57136-02b2-47f9-b55f-8e94953b2188")
)
(fp_line
(start 20 0)
(end 0 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "799c80cf-38f7-4367-8431-d21acddd9ca6")
)
(fp_line
(start 20 38.8)
(end 20 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "8ebe8182-cf22-4829-b4fb-e4da639edc80")
)
(fp_line
(start 33.86 0)
(end 33.86 38.8)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "c8334ace-8dc2-4a3a-9b5f-eb043a943919")
)
(fp_line
(start 33.86 38.8)
(end 20 38.8)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "93634a35-66a4-483e-9033-a37c80573ec6")
)
(fp_line
(start 51.14 0)
(end 33.86 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "3e107afb-3bce-4862-bdfe-43be8f99d27a")
)
(fp_line
(start 51.14 38.8)
(end 51.14 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "7d78005b-79e2-4ed1-8c95-c6e6377aade7")
)
(fp_line
(start 65 0)
(end 65 38.8)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "7e8e8b21-d486-454f-976e-c47119a42e6c")
)
(fp_line
(start 65 38.8)
(end 51.14 38.8)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "a4698f07-e62f-4085-9224-6e739071ad77")
)
(fp_line
(start 85 0)
(end 65 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "632100a3-370a-4dd3-b967-0b46b613d56f")
)
(fp_line
(start 85 50)
(end 85 0)
(stroke
(width 0.1)
(type default)
)
(layer "F.Fab")
(uuid "c4a85d4c-95f9-4ca5-9166-a7ed4eb818d5")
)
(fp_text user "${REFERENCE}"
(at 0 2.5 0)
(unlocked yes)
(layer "F.Fab")
(uuid "ee47ee06-c924-4e15-a665-2f893aaca683")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(embedded_fonts no)
(model "${KIPRJMOD}/laserSocket.pretty/kirdy_LD_adapter_copper_plate.step"
(offset
(xyz 0 0 0)
)
(scale
(xyz 1 1 1)
)
(rotate
(xyz 0 0 0)
)
)
)

View File

@@ -1,63 +0,0 @@
# Modified from "bom_csv_grouped_by_value_with_fp.py" Example BOM Generation Script
"""
@package
Output: CSV (comma-separated)
The BOM does not include components with DNP or excluded from BOM field(s) checked.
Grouped By: Value, Footprint, MFR_PN, MFR_ALT
Sorted By: Ref
Fields: Ref, Value, MFR_PN, MFR_PN_ALT, Qnty, LibPart, Footprint, Comment
Command line:
python "pathToFile/generate_bom_from_xml.py" "%I" "%O.csv"
"""
import kicad_netlist_reader
import csv
import sys
import os
try:
if not os.path.isdir(os.path.dirname(sys.argv[2])):
os.makedirs(os.path.dirname(sys.argv[2]))
f = open(sys.argv[2], 'w', encoding='utf-8')
except IOError:
raise IOError("Can't open output file for writing: " + sys.argv[2])
# Custom Equal Operator for "groupComponents" method
def __eq__(self, other):
result = False
if self.getValue() == other.getValue():
if self.getFootprint() == other.getFootprint():
if self.getField("MFR_PN") == other.getField("MFR_PN"):
if self.getField("MFR_PN_ALT") == other.getField("MFR_PN_ALT"):
result = True
return result
kicad_netlist_reader.comp.__eq__ = __eq__
net = kicad_netlist_reader.netlist(sys.argv[1])
out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=csv.QUOTE_ALL)
out.writerow(['Source:', net.getSource()])
out.writerow(['Date:', net.getDate()])
out.writerow(['Tool:', net.getTool()])
out.writerow(['Ref', 'Value', 'MFR_PN', 'MFR_PN_ALT', 'Qnty', 'LibPart', 'Footprint', 'Comment'])
grouped = net.groupComponents(components=net.getInterestingComponents(excludeBOM=True, DNP=True))
for group in grouped:
refs = ""
for component in group:
if refs != "":
refs += ", "
refs += component.getRef()
c = component
out.writerow([refs,
c.getValue(),
c.getField("MFR_PN"),
c.getField("MFR_PN_ALT"),
len(group),
c.getLibName() + ":" + c.getPartName(),
c.getFootprint(),
c.getField("Comment")])

View File

@@ -1,109 +0,0 @@
import os
import argparse
__cmd_get_kicad_bin_path = "which kicad | xargs readlink | sed 's/$/-cli/' | xargs readlink"
def setup_env(prefix, sch, out_dir, dir_kicad_plugins, dir_3d_models):
# Get the path to "kicad_netlist_reader.py" script in NixOs
if dir_kicad_plugins is None:
dir_kicad_plugins = os.path.join(os.popen(__cmd_get_kicad_bin_path).read().replace("\n", ""),
"../../share/kicad/plugins")
# Setup the PYTHONPATH for "generate_bom_from_xml.py" to import "kicad_netlist_reader"
try:
pythonpath = os.environ['PYTHONPATH']
except KeyError:
pythonpath = ''
pathlist = [dir_kicad_plugins]
if pythonpath:
pathlist.extend(pythonpath.split(os.pathsep))
os.environ['PYTHONPATH'] = os.pathsep.join(pathlist)
# NIXOS installs KiCAD Built-in 3D models in a separated folder
if dir_3d_models is None:
model_3d_path = os.path.join("/nix/store", os.popen("ls /nix/store | grep kicad-packages3d | head -1").read().replace("\n", ""), "share/kicad/3dmodels")
# Setup the KICAD7_3DMODEL_DIR for step file to be generated with kicad-cli"
os.environ['KICAD7_3DMODEL_DIR'] = model_3d_path
# Generate the prefix from the title and revision fields in title block of the schematics top
if prefix is None:
with open (sch, "r") as f:
data = f.read().splitlines()
title_line = data[7][1:-1].split()
revision_line = data[9][1:-1].split()
if title_line[0].find("title") and revision_line[0].find("rev"):
ret_prefix = f"{title_line[1][1:-1]}_{revision_line[1][1:-1]}"
else:
raise ValueError("Prefix cannot be generated from schematic file.")
else:
ret_prefix = prefix
gerber_drill_dir = os.path.join(out_dir, f"{ret_prefix}_gerber_drill")
if not os.path.exists(out_dir):
os.makedirs(out_dir)
if not os.path.exists(gerber_drill_dir):
os.makedirs(gerber_drill_dir)
return ret_prefix
def generate_production_files(prefix, sch, pcb, out_dir):
out_path = os.path.join(out_dir, prefix)
bom_ret_code = os.system(f"kicad-cli sch export python-bom {sch} -o {out_path}_bom.xml")
bom_ret_code |= os.system(f"python -m scripts.generate_bom_from_xml {out_path}_bom.xml {out_path}_bom.csv")
os.system(f"rm {out_path}_bom.xml")
pdf_ret_code = os.system(f"kicad-cli sch export pdf {sch} -o {out_path}.pdf")
pos_ret_code = os.system(f"kicad-cli pcb export pos {pcb} --format csv --units mm -o {out_path}_pos.csv")
step_ret_code = os.system(f"kicad-cli pcb export step {pcb} --subst-models --force -o {out_path}.step")
out_path = os.path.join(out_dir, f"{prefix}_gerber_drill")
gerber_ret_code = os.system(f"kicad-cli pcb export gerbers {pcb} -l 'F.Cu,In1.Cu,In2.Cu,B.Cu,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,F.Mask,B.Mask,Edge.Cuts' --no-x2 --subtract-soldermask -o {out_path}")
# The additional trailing slash is due to a bug in the kicad-cli tool. https://gitlab.com/kicad/code/kicad/-/issues/14438
drill_ret_code = os.system(f"kicad-cli pcb export drill {pcb} -u mm --generate-map --map-format gerberx2 -o {out_path}/")
zip_ret_code = os.system(f"zip -r -j {out_path} {out_path}")
os.system(f"rm -r {out_path}")
print("=== File Generation Status === ")
print("Gerber: {}".format("Success" if gerber_ret_code == 0 else "Failed"))
print("Drill: {}".format("Success" if drill_ret_code == 0 else "Failed"))
print("Zip_Gerber_Drill: {}".format("Success" if zip_ret_code == 0 else "Failed"))
print("Bom: {}".format("Success" if bom_ret_code == 0 else "Failed"))
print("Pdf: {}".format("Success" if pdf_ret_code == 0 else "Failed"))
print("Pos: {}".format("Success" if pos_ret_code == 0 else "Failed"))
print("Step: {}".format("Success" if step_ret_code == 0 else "Failed"))
def main():
parser = argparse.ArgumentParser(
description="Python Script to Generate Production Files(Gerber, Drill, Drill Map, Bom, Component Placement, Schematics PDF, Step Files)")
parser.add_argument("-s", "--sch",
default="kirdy_LD_adapter_type_1.kicad_sch",
help="schematics top file. defaults to 'kirdy.kicad_sch' if omitted")
parser.add_argument("-p", "--pcb",
default="kirdy_LD_adapter_type_1.kicad_pcb",
help="pcb file. defaults to 'kirdy.kicad_pcb' if omitted")
parser.add_argument("-o", "--output",
default="./production",
help="output folder, defaults to './production' if omitted")
parser.add_argument("-pre", "--prefix",
default=None,
help="output filename prefix, attempts to generated from schematics top file if omitted")
parser.add_argument("-dir_plugins", "--dir_kicad_plugins",
default=None,
help="path to kicad_netlist_reader.py, attempts to find the required path in the system if omitted")
parser.add_argument("-dir_3d", "--dir_3d_models",
default=None,
help="path to kicad 3d models folder, attempts to find the required path in the system if omitted")
args = parser.parse_args()
prefix = setup_env(args.prefix, args.sch, args.output, args.dir_kicad_plugins, args.dir_3d_models)
generate_production_files(prefix, args.sch, args.pcb, args.output)
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,246 @@
{
"jobs": [
{
"description": "",
"id": "108db354-89cb-44df-ae2c-c42171c1c76a",
"settings": {
"board_only": false,
"board_outlines_chaining_epsilon": 0.01,
"cut_vias_in_body": false,
"description": "",
"export_board_body": true,
"export_components": true,
"export_inner_copper": false,
"export_pads": false,
"export_silkscreen": false,
"export_soldermask": false,
"export_tracks": false,
"export_zones": false,
"fill_all_vias": false,
"format": "step",
"fuse_shapes": false,
"include_dnp": true,
"include_unspecified": true,
"occt_format": 0,
"optimize_step": true,
"output_filename": ".step",
"overwrite": false,
"subst_models": true,
"use_drill_origin": false,
"use_grid_origin": false,
"user_origin.x": 0.0,
"user_origin.y": 9.9032,
"vrml_model_dir": "",
"vrml_relative_paths": false
},
"type": "pcb_export_3d"
},
{
"description": "",
"id": "a43b5753-f55f-419f-89ab-6bc48e597538",
"settings": {
"black_and_white": true,
"create_gerber_job_file": true,
"crossout_dnp_footprints_on_fab_layers": true,
"description": "",
"disable_aperture_macros": false,
"drawing_sheet": "",
"drill_shape": 2,
"hide_dnp_footprints_on_fab_layers": false,
"include_netlist_attributes": true,
"layers": [
"B.Cu",
"B.Mask",
"B.Paste",
"B.SilkS",
"B.Adhes",
"In30.Cu",
"In29.Cu",
"In28.Cu",
"In27.Cu",
"In26.Cu",
"In25.Cu",
"In24.Cu",
"In23.Cu",
"In22.Cu",
"In21.Cu",
"In20.Cu",
"In19.Cu",
"In18.Cu",
"In17.Cu",
"In16.Cu",
"In15.Cu",
"In14.Cu",
"In13.Cu",
"In12.Cu",
"In11.Cu",
"In10.Cu",
"In9.Cu",
"In8.Cu",
"In7.Cu",
"In6.Cu",
"In5.Cu",
"In4.Cu",
"In3.Cu",
"In2.Cu",
"In1.Cu",
"F.Cu",
"F.Mask",
"F.Paste",
"F.SilkS",
"F.Adhes",
"Edge.Cuts"
],
"layers_to_include_on_all_layers": [],
"mirror": false,
"negative": false,
"output_filename": "./Gerber_Drill",
"plot_drawing_sheet": false,
"plot_footprint_values": true,
"plot_pad_numbers": false,
"plot_ref_des": true,
"precision": 5,
"sketch_dnp_footprints_on_fab_layers": true,
"sketch_pads_on_fab_layers": false,
"subtract_solder_mask_from_silk": false,
"use_drill_origin": false,
"use_protel_file_extension": true,
"use_x2_format": true
},
"type": "pcb_export_gerbers"
},
{
"description": "",
"id": "9a784f09-1d18-4655-9cdd-df5e7ef30bdc",
"settings": {
"description": "",
"drill_origin": "abs",
"excellon.combine_pth_npth": true,
"excellon.minimal_header": false,
"excellon.mirror_y": false,
"excellon.oval_drill_route": false,
"format": "excellon",
"generate_map": true,
"gerber_precision": 5,
"map_format": "gerberx2",
"output_dir": "./Gerber_Drill",
"units": "in",
"zero_format": "decimal"
},
"type": "pcb_export_drill"
},
{
"description": "",
"id": "119b36d4-ffb4-48c8-86d2-1322ee8d24fb",
"settings": {
"black_and_white": false,
"color_theme": "KiCad Classic",
"description": "",
"drawing_sheet": "",
"format": "pdf",
"hpgl_page_size": "default",
"hpgl_pen_size": 1.016,
"hpgl_plot_origin": "A3",
"min_pen_width": 847,
"output_dir": "",
"page_size": "auto",
"pdf_hierarchical_links": true,
"pdf_metadata": true,
"pdf_property_popups": true,
"plot_all": true,
"plot_drawing_sheet": true,
"use_background_color": true
},
"type": "sch_export_plot_pdf"
},
{
"description": "",
"id": "18f9cda9-5763-4859-9420-3b3f616ec315",
"settings": {
"bom_format_preset_name": "CSV",
"bom_preset_name": "",
"description": "",
"exclude_dnp": true,
"field_delimiter": ",",
"fields_group_by": [
"Value",
"Footprint",
"MFR_PN",
"MFR_PN_ALT"
],
"fields_labels": [
"Reference",
"Value",
"Footprint",
"Datasheet",
"Description",
"Qty",
"#",
"Comment",
"MFN_PN_ALT",
"MFR_PN",
"MFR_PN_ALT",
"STORE_NAME"
],
"fields_ordered": [
"Reference",
"Value",
"Footprint",
"__Datasheet",
"__Description",
"${QUANTITY}",
"__${ITEM_NUMBER}",
"__Comment",
"__MFN_PN_ALT",
"MFR_PN",
"MFR_PN_ALT",
"__STORE_NAME"
],
"filter_string": "",
"include_excluded_from_bom": false,
"keep_line_breaks": false,
"keep_tabs": false,
"output_filename": "kirdy_LD_adapter_type_2_BOM.csv",
"ref_delimiter": ",",
"ref_range_delimiter": "",
"sort_asc": true,
"sort_field": "Reference",
"string_delimiter": "\""
},
"type": "sch_export_bom"
},
{
"description": "",
"id": "7d8b8168-2d08-493a-b053-1de2a89e887c",
"settings": {
"description": "",
"exclude_dnp": false,
"exclude_footprints_with_th": false,
"format": "ascii",
"gerber_board_edge": true,
"negate_bottom_x": false,
"output_filename": "kirdy_LD_adapter_type_2_pos",
"side": "both",
"single_file": false,
"smd_only": false,
"units": "mm",
"use_drill_place_file_origin": true
},
"type": "pcb_export_pos"
}
],
"meta": {
"version": 1
},
"outputs": [
{
"description": "Result",
"id": "4a93e2c8-dd12-4cbb-8511-1e31be28c943",
"only": [],
"settings": {
"output_path": "${KIPRJMOD}/result/"
},
"type": "folder"
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,14 +3,17 @@
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
"copper_line_width": 0.19999999999999998,
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.1,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.049999999999999996,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
@@ -21,7 +24,7 @@
"text_position": 0,
"units_format": 1
},
"fab_line_width": 0.09999999999999999,
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
@@ -46,7 +49,7 @@
"silk_text_upright": false,
"zones": {
"45_degree_only": true,
"min_clearance": 0.508
"min_clearance": 0.2
}
},
"diff_pair_dimensions": [
@@ -67,15 +70,20 @@
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "error",
"hole_clearance": "error",
"hole_near_hole": "error",
"hole_to_hole": "error",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
@@ -85,9 +93,11 @@
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "error",
"pth_inside_courtyard": "ignore",
@@ -99,10 +109,13 @@
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
@@ -114,21 +127,22 @@
"allow_blind_buried_vias": false,
"allow_microvias": false,
"max_error": 0.005,
"min_clearance": 0.19999999999999998,
"min_clearance": 0.2,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.19999999999999998,
"min_via_annular_width": 0.049999999999999996,
"min_via_diameter": 0.39999999999999997,
"min_track_width": 0.2,
"min_via_annular_width": 0.05,
"min_via_diameter": 0.4,
"solder_mask_clearance": 0.0,
"solder_mask_min_width": 0.0,
"solder_mask_to_copper_clearance": 0.0,
@@ -136,40 +150,44 @@
},
"teardrop_options": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 5,
"td_on_pad_in_zone": false,
"td_onpadsmd": true,
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onviapad": true
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_curve_segcount": 0,
"td_allow_use_two_tracks": true,
"td_curve_segcount": 1,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
@@ -177,12 +195,38 @@
"track_widths": [
0.0,
0.2,
0.2921,
0.3493,
0.5,
1.0,
1.5,
2.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
@@ -203,6 +247,7 @@
"mfg": "",
"mpn": ""
},
"layer_pairs": [],
"layer_presets": [],
"viewports": []
},
@@ -397,10 +442,15 @@
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"footprint_filter": "ignore",
"footprint_link_issues": "warning",
"four_way_junction": "ignore",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"label_multiple_wires": "warning",
"lib_symbol_issues": "warning",
"lib_symbol_mismatch": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
@@ -413,9 +463,14 @@
"pin_not_driven": "error",
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"same_local_global_label": "warning",
"similar_label_and_power": "warning",
"similar_labels": "warning",
"similar_power": "warning",
"simulation_model_issue": "ignore",
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
@@ -427,7 +482,7 @@
},
"meta": {
"filename": "kirdy_LD_adapter_type_2.kicad_pro",
"version": 1
"version": 3
},
"net_settings": {
"classes": [
@@ -442,6 +497,7 @@
"microvia_drill": 0.1,
"name": "Default",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.25,
"via_diameter": 0.8,
@@ -450,7 +506,7 @@
}
],
"meta": {
"version": 3
"version": 4
},
"net_colors": null,
"netclass_assignments": null,
@@ -461,10 +517,10 @@
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"plot": "./Gerber_Drill",
"pos_files": "",
"specctra_dsn": "",
"step": "../../../kirdy/kirdy.pretty/Kirdy_LD_Adapter.step",
"step": ".step",
"svg": "",
"vrml": ""
},
@@ -526,6 +582,7 @@
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": false,
"name": "Grouped By Value",
"sort_asc": true,
"sort_field": "Reference"
@@ -569,6 +626,7 @@
},
"page_layout_descr_file": "",
"plot_directory": "",
"space_save_all_events": true,
"spice_adjust_passive_values": false,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
@@ -582,7 +640,7 @@
"sheets": [
[
"96b73a3e-7f6b-4c8b-ab88-a7f05b40ca65",
""
"Root"
]
],
"text_variables": {}

File diff suppressed because it is too large Load Diff

View File

@@ -1,63 +0,0 @@
# Modified from "bom_csv_grouped_by_value_with_fp.py" Example BOM Generation Script
"""
@package
Output: CSV (comma-separated)
The BOM does not include components with DNP or excluded from BOM field(s) checked.
Grouped By: Value, Footprint, MFR_PN, MFR_ALT
Sorted By: Ref
Fields: Ref, Value, MFR_PN, MFR_PN_ALT, Qnty, LibPart, Footprint, Comment
Command line:
python "pathToFile/generate_bom_from_xml.py" "%I" "%O.csv"
"""
import kicad_netlist_reader
import csv
import sys
import os
try:
if not os.path.isdir(os.path.dirname(sys.argv[2])):
os.makedirs(os.path.dirname(sys.argv[2]))
f = open(sys.argv[2], 'w', encoding='utf-8')
except IOError:
raise IOError("Can't open output file for writing: " + sys.argv[2])
# Custom Equal Operator for "groupComponents" method
def __eq__(self, other):
result = False
if self.getValue() == other.getValue():
if self.getFootprint() == other.getFootprint():
if self.getField("MFR_PN") == other.getField("MFR_PN"):
if self.getField("MFR_PN_ALT") == other.getField("MFR_PN_ALT"):
result = True
return result
kicad_netlist_reader.comp.__eq__ = __eq__
net = kicad_netlist_reader.netlist(sys.argv[1])
out = csv.writer(f, lineterminator='\n', delimiter=',', quotechar='\"', quoting=csv.QUOTE_ALL)
out.writerow(['Source:', net.getSource()])
out.writerow(['Date:', net.getDate()])
out.writerow(['Tool:', net.getTool()])
out.writerow(['Ref', 'Value', 'MFR_PN', 'MFR_PN_ALT', 'Qnty', 'LibPart', 'Footprint', 'Comment'])
grouped = net.groupComponents(components=net.getInterestingComponents(excludeBOM=True, DNP=True))
for group in grouped:
refs = ""
for component in group:
if refs != "":
refs += ", "
refs += component.getRef()
c = component
out.writerow([refs,
c.getValue(),
c.getField("MFR_PN"),
c.getField("MFR_PN_ALT"),
len(group),
c.getLibName() + ":" + c.getPartName(),
c.getFootprint(),
c.getField("Comment")])

View File

@@ -1,109 +0,0 @@
import os
import argparse
__cmd_get_kicad_bin_path = "which kicad | xargs readlink | sed 's/$/-cli/' | xargs readlink"
def setup_env(prefix, sch, out_dir, dir_kicad_plugins, dir_3d_models):
# Get the path to "kicad_netlist_reader.py" script in NixOs
if dir_kicad_plugins is None:
dir_kicad_plugins = os.path.join(os.popen(__cmd_get_kicad_bin_path).read().replace("\n", ""),
"../../share/kicad/plugins")
# Setup the PYTHONPATH for "generate_bom_from_xml.py" to import "kicad_netlist_reader"
try:
pythonpath = os.environ['PYTHONPATH']
except KeyError:
pythonpath = ''
pathlist = [dir_kicad_plugins]
if pythonpath:
pathlist.extend(pythonpath.split(os.pathsep))
os.environ['PYTHONPATH'] = os.pathsep.join(pathlist)
# NIXOS installs KiCAD Built-in 3D models in a separated folder
if dir_3d_models is None:
model_3d_path = os.path.join("/nix/store", os.popen("ls /nix/store | grep kicad-packages3d | head -1").read().replace("\n", ""), "share/kicad/3dmodels")
# Setup the KICAD7_3DMODEL_DIR for step file to be generated with kicad-cli"
os.environ['KICAD7_3DMODEL_DIR'] = model_3d_path
# Generate the prefix from the title and revision fields in title block of the schematics top
if prefix is None:
with open (sch, "r") as f:
data = f.read().splitlines()
title_line = data[7][1:-1].split()
revision_line = data[9][1:-1].split()
if title_line[0].find("title") and revision_line[0].find("rev"):
ret_prefix = f"{title_line[1][1:-1]}_{revision_line[1][1:-1]}"
else:
raise ValueError("Prefix cannot be generated from schematic file.")
else:
ret_prefix = prefix
gerber_drill_dir = os.path.join(out_dir, f"{ret_prefix}_gerber_drill")
if not os.path.exists(out_dir):
os.makedirs(out_dir)
if not os.path.exists(gerber_drill_dir):
os.makedirs(gerber_drill_dir)
return ret_prefix
def generate_production_files(prefix, sch, pcb, out_dir):
out_path = os.path.join(out_dir, prefix)
bom_ret_code = os.system(f"kicad-cli sch export python-bom {sch} -o {out_path}_bom.xml")
bom_ret_code |= os.system(f"python -m scripts.generate_bom_from_xml {out_path}_bom.xml {out_path}_bom.csv")
os.system(f"rm {out_path}_bom.xml")
pdf_ret_code = os.system(f"kicad-cli sch export pdf {sch} -o {out_path}.pdf")
pos_ret_code = os.system(f"kicad-cli pcb export pos {pcb} --format csv --units mm -o {out_path}_pos.csv")
step_ret_code = os.system(f"kicad-cli pcb export step {pcb} --subst-models --force -o {out_path}.step")
out_path = os.path.join(out_dir, f"{prefix}_gerber_drill")
gerber_ret_code = os.system(f"kicad-cli pcb export gerbers {pcb} -l 'F.Cu,In1.Cu,In2.Cu,B.Cu,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,F.Mask,B.Mask,Edge.Cuts' --no-x2 --subtract-soldermask -o {out_path}")
# The additional trailing slash is due to a bug in the kicad-cli tool. https://gitlab.com/kicad/code/kicad/-/issues/14438
drill_ret_code = os.system(f"kicad-cli pcb export drill {pcb} -u mm --generate-map --map-format gerberx2 -o {out_path}/")
zip_ret_code = os.system(f"zip -r -j {out_path} {out_path}")
os.system(f"rm -r {out_path}")
print("=== File Generation Status === ")
print("Gerber: {}".format("Success" if gerber_ret_code == 0 else "Failed"))
print("Drill: {}".format("Success" if drill_ret_code == 0 else "Failed"))
print("Zip_Gerber_Drill: {}".format("Success" if zip_ret_code == 0 else "Failed"))
print("Bom: {}".format("Success" if bom_ret_code == 0 else "Failed"))
print("Pdf: {}".format("Success" if pdf_ret_code == 0 else "Failed"))
print("Pos: {}".format("Success" if pos_ret_code == 0 else "Failed"))
print("Step: {}".format("Success" if step_ret_code == 0 else "Failed"))
def main():
parser = argparse.ArgumentParser(
description="Python Script to Generate Production Files(Gerber, Drill, Drill Map, Bom, Component Placement, Schematics PDF, Step Files)")
parser.add_argument("-s", "--sch",
default="kirdy_LD_adapter_type_2.kicad_sch",
help="schematics top file. defaults to 'kirdy.kicad_sch' if omitted")
parser.add_argument("-p", "--pcb",
default="kirdy_LD_adapter_type_2.kicad_pcb",
help="pcb file. defaults to 'kirdy.kicad_pcb' if omitted")
parser.add_argument("-o", "--output",
default="./production",
help="output folder, defaults to './production' if omitted")
parser.add_argument("-pre", "--prefix",
default=None,
help="output filename prefix, attempts to generated from schematics top file if omitted")
parser.add_argument("-dir_plugins", "--dir_kicad_plugins",
default=None,
help="path to kicad_netlist_reader.py, attempts to find the required path in the system if omitted")
parser.add_argument("-dir_3d", "--dir_3d_models",
default=None,
help="path to kicad 3d models folder, attempts to find the required path in the system if omitted")
args = parser.parse_args()
prefix = setup_env(args.prefix, args.sch, args.output, args.dir_kicad_plugins, args.dir_3d_models)
generate_production_files(prefix, args.sch, args.pcb, args.output)
if __name__ == '__main__':
main()