[Quick-Start] Recycled the templates for gerbers
- Now we use the internal templates for the Gerber examples
This commit is contained in:
parent
1ff0a48596
commit
d274ada385
|
|
@ -852,12 +852,9 @@ def generate_one_example(dest_dir, types):
|
||||||
glb = {'filters': fil}
|
glb = {'filters': fil}
|
||||||
yaml_dump(f, {'global': glb})
|
yaml_dump(f, {'global': glb})
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
# A helper for the JLCPCB stuff
|
# A helper for the internal templates
|
||||||
fil = {'name': 'only_jlc_parts'}
|
imports = [{'file': man} for man in ['Elecrow', 'FusionPCB', 'JLCPCB', 'PCBWay']]
|
||||||
fil['comment'] = 'Only parts with JLC (LCSC) code'
|
yaml_dump(f, {'import': imports})
|
||||||
fil['type'] = 'generic'
|
|
||||||
fil['include_only'] = [{'column': 'LCSC#', 'regex': r'^C\d+'}]
|
|
||||||
yaml_dump(f, {'filters': [fil]})
|
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
# A helper for KiCost demo
|
# A helper for KiCost demo
|
||||||
var = {'name': 'place_holder'}
|
var = {'name': 'place_holder'}
|
||||||
|
|
|
||||||
|
|
@ -123,30 +123,35 @@ class Gerber(AnyLayer):
|
||||||
useful = GS.get_useful_layers(USEFUL_LAYERS, layers, include_copper=True)
|
useful = GS.get_useful_layers(USEFUL_LAYERS, layers, include_copper=True)
|
||||||
tpl_layers = [AnyLayer.layer2dict(la) for la in useful]
|
tpl_layers = [AnyLayer.layer2dict(la) for la in useful]
|
||||||
# Add the list of layers to the templates
|
# Add the list of layers to the templates
|
||||||
skipped = []
|
|
||||||
for tpl in templates:
|
for tpl in templates:
|
||||||
|
outs_used = []
|
||||||
for out in tpl:
|
for out in tpl:
|
||||||
skip = False
|
skip = False
|
||||||
if out['type'] == 'gerber':
|
if out['type'] == 'gerber':
|
||||||
out['layers'] = tpl_layers
|
out['layers'] = tpl_layers
|
||||||
elif out['type'] == 'position':
|
elif out['type'] == 'position':
|
||||||
out['options']['variant'] = 'place_holder'
|
|
||||||
if not GS.sch:
|
if not GS.sch:
|
||||||
# We need the schematic for the variant
|
# We need the schematic for the variant
|
||||||
skip = True
|
skip = True
|
||||||
|
out['run_by_default'] = False
|
||||||
|
out['options'] = {'pre_transform': ['_kicost_rename', '_rot_footprint']}
|
||||||
if out['type'] == 'bom' and not GS.sch_file:
|
if out['type'] == 'bom' and not GS.sch_file:
|
||||||
skip = True
|
skip = True
|
||||||
|
out['run_by_default'] = False
|
||||||
if out['type'] == 'compress':
|
if out['type'] == 'compress':
|
||||||
out['dir'] = 'Manufacturers'
|
out['dir'] = 'Manufacturers'
|
||||||
|
# We must disable the template and create a new one
|
||||||
|
# If we don't do it the parent is configured and, in the JLCPCB case, it needs an schematic
|
||||||
|
out['disable_run_by_default'] = out['extends']
|
||||||
|
out['extends'] = ''
|
||||||
# Moving files makes the `navigate_results` less powerful
|
# Moving files makes the `navigate_results` less powerful
|
||||||
# out['options']['move_files'] = True
|
# out['options']['move_files'] = True
|
||||||
if skipped:
|
if outs_used:
|
||||||
# Compress only the ones we didn't skip
|
# Compress only the ones we didn't skip
|
||||||
out['options']['files'] = [f for f in out['options']['files'] if f['from_output'] not in skipped]
|
out['options'] = {'files': [{'from_output': f, 'dest': '/'} for f in outs_used]}
|
||||||
else:
|
else:
|
||||||
out['dir'] = os.path.join('Manufacturers', out['dir'])
|
out['dir'] = os.path.join('Manufacturers', out['dir'])
|
||||||
if skip:
|
|
||||||
skipped.append(out['name'])
|
|
||||||
else:
|
|
||||||
outs.append(out)
|
outs.append(out)
|
||||||
|
if not skip:
|
||||||
|
outs_used.append(out['name'])
|
||||||
return outs
|
return outs
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,29 @@
|
||||||
# Gerber and drill files for Elecrow, without stencil
|
# Gerber and drill files for Elecrow, without stencil
|
||||||
# URL: https://www.elecrow.com/
|
# This is just a template for the quick-start
|
||||||
# Based on setting used by Gerber Zipper (https://github.com/g200kg/kicad-gerberzipper)
|
|
||||||
kibot:
|
kibot:
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
|
import:
|
||||||
|
- file: Elecrow
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
- name: Elecrow_gerbers
|
- name: Elecrow_gerbers
|
||||||
comment: Gerbers compatible with Elecrow
|
comment: Gerbers compatible with Elecrow
|
||||||
type: gerber
|
type: gerber
|
||||||
dir: Elecrow
|
dir: Elecrow
|
||||||
options: &gerber_options
|
extends: _Elecrow_gerbers
|
||||||
exclude_edge_layer: true
|
disable_run_by_default: true
|
||||||
exclude_pads_from_silkscreen: true
|
|
||||||
plot_sheet_reference: false
|
|
||||||
plot_footprint_refs: true
|
|
||||||
plot_footprint_values: true
|
|
||||||
force_plot_invisible_refs_vals: false
|
|
||||||
tent_vias: true
|
|
||||||
use_protel_extensions: true
|
|
||||||
create_gerber_job_file: false
|
|
||||||
output: "%f.%x"
|
|
||||||
gerber_precision: 4.6
|
|
||||||
use_gerber_x2_attributes: false
|
|
||||||
use_gerber_net_attributes: false
|
|
||||||
disable_aperture_macros: true
|
|
||||||
line_width: 0.1
|
|
||||||
uppercase_extensions: true
|
|
||||||
subtract_mask_from_silk: true
|
|
||||||
inner_extension_pattern: '.g%n'
|
|
||||||
edge_cut_extension: '.gml'
|
|
||||||
layers:
|
|
||||||
- copper
|
|
||||||
- F.SilkS
|
|
||||||
- B.SilkS
|
|
||||||
- F.Mask
|
|
||||||
- B.Mask
|
|
||||||
- Edge.Cuts
|
|
||||||
|
|
||||||
- name: Elecrow_drill
|
- name: Elecrow_drill
|
||||||
comment: Drill files compatible with Elecrow
|
comment: Drill files compatible with Elecrow
|
||||||
type: excellon
|
type: excellon
|
||||||
dir: Elecrow
|
dir: Elecrow
|
||||||
options:
|
extends: _Elecrow_drill
|
||||||
pth_and_npth_single_file: false
|
disable_run_by_default: true
|
||||||
pth_id: ''
|
|
||||||
npth_id: '-NPTH'
|
|
||||||
output: "%f%i.TXT"
|
|
||||||
|
|
||||||
- name: Elecrow
|
- name: Elecrow
|
||||||
comment: ZIP file for Elecrow
|
comment: ZIP file for Elecrow
|
||||||
type: compress
|
type: compress
|
||||||
dir: Elecrow
|
dir: Elecrow
|
||||||
options:
|
extends: _Elecrow_compress
|
||||||
files:
|
disable_run_by_default: true
|
||||||
- from_output: Elecrow_gerbers
|
|
||||||
dest: /
|
|
||||||
- from_output: Elecrow_drill
|
|
||||||
dest: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,29 @@
|
||||||
# Gerber and drill files for FusionPCB, without stencil
|
# Gerber and drill files for FusionPCB, without stencil
|
||||||
# URL: https://www.seeedstudio.io/fusion.html
|
# This is just a template for the quick-start
|
||||||
# Based on setting used by Gerber Zipper (https://github.com/g200kg/kicad-gerberzipper)
|
|
||||||
kibot:
|
kibot:
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
|
import:
|
||||||
|
- file: FusionPCB
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
- name: FusionPCB_gerbers
|
- name: FusionPCB_gerbers
|
||||||
comment: Gerbers compatible with FusionPCB
|
comment: Gerbers compatible with FusionPCB
|
||||||
type: gerber
|
type: gerber
|
||||||
dir: FusionPCB
|
dir: FusionPCB
|
||||||
options: &gerber_options
|
extends: _FusionPCB_gerbers
|
||||||
exclude_edge_layer: true
|
disable_run_by_default: true
|
||||||
exclude_pads_from_silkscreen: true
|
|
||||||
plot_sheet_reference: false
|
|
||||||
plot_footprint_refs: true
|
|
||||||
plot_footprint_values: true
|
|
||||||
force_plot_invisible_refs_vals: false
|
|
||||||
tent_vias: true
|
|
||||||
use_protel_extensions: true
|
|
||||||
create_gerber_job_file: false
|
|
||||||
output: "%f.%x"
|
|
||||||
gerber_precision: 4.6
|
|
||||||
use_gerber_x2_attributes: false
|
|
||||||
use_gerber_net_attributes: false
|
|
||||||
disable_aperture_macros: true
|
|
||||||
line_width: 0.1
|
|
||||||
uppercase_extensions: true
|
|
||||||
subtract_mask_from_silk: false
|
|
||||||
use_aux_axis_as_origin: true
|
|
||||||
inner_extension_pattern: '.gl%N'
|
|
||||||
edge_cut_extension: '.gml'
|
|
||||||
layers:
|
|
||||||
- copper
|
|
||||||
- F.SilkS
|
|
||||||
- B.SilkS
|
|
||||||
- F.Mask
|
|
||||||
- B.Mask
|
|
||||||
- Edge.Cuts
|
|
||||||
|
|
||||||
- name: FusionPCB_drill
|
- name: FusionPCB_drill
|
||||||
comment: Drill files compatible with FusionPCB
|
comment: Drill files compatible with FusionPCB
|
||||||
type: excellon
|
type: excellon
|
||||||
dir: FusionPCB
|
dir: FusionPCB
|
||||||
options:
|
extends: _FusionPCB_drill
|
||||||
pth_and_npth_single_file: true
|
disable_run_by_default: true
|
||||||
use_aux_axis_as_origin: true
|
|
||||||
output: "%f.TXT"
|
|
||||||
|
|
||||||
- name: FusionPCB
|
- name: FusionPCB
|
||||||
comment: ZIP file for FusionPCB
|
comment: ZIP file for FusionPCB
|
||||||
type: compress
|
type: compress
|
||||||
dir: FusionPCB
|
dir: FusionPCB
|
||||||
options:
|
extends: _FusionPCB_compress
|
||||||
files:
|
disable_run_by_default: true
|
||||||
- from_output: FusionPCB_gerbers
|
|
||||||
dest: /
|
|
||||||
- from_output: FusionPCB_drill
|
|
||||||
dest: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,133 +1,43 @@
|
||||||
# Gerber and drill files for JLCPCB, without stencil
|
# Gerber and drill files for JLCPCB, without stencil
|
||||||
# URL: https://jlcpcb.com/
|
# This is just a template for the quick-start
|
||||||
# Based on setting used by Gerber Zipper (https://github.com/g200kg/kicad-gerberzipper)
|
|
||||||
kibot:
|
kibot:
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
filters:
|
import:
|
||||||
- name: only_jlc_parts
|
- file: JLCPCB
|
||||||
comment: 'Only parts with JLC (LCSC) code'
|
|
||||||
type: generic
|
|
||||||
include_only:
|
|
||||||
- column: 'LCSC#'
|
|
||||||
regex: '^C\d+'
|
|
||||||
|
|
||||||
variants:
|
|
||||||
- name: rotated
|
|
||||||
comment: 'Just a place holder for the rotation filter'
|
|
||||||
type: kibom
|
|
||||||
variant: rotated
|
|
||||||
pre_transform: _rot_footprint
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
- name: JLCPCB_gerbers
|
- name: JLCPCB_gerbers
|
||||||
comment: Gerbers compatible with JLCPCB
|
comment: Gerbers compatible with JLCPCB
|
||||||
type: gerber
|
type: gerber
|
||||||
dir: JLCPCB
|
dir: JLCPCB
|
||||||
options: &gerber_options
|
extends: _JLCPCB_gerbers
|
||||||
exclude_edge_layer: true
|
disable_run_by_default: true
|
||||||
exclude_pads_from_silkscreen: true
|
|
||||||
plot_sheet_reference: false
|
|
||||||
plot_footprint_refs: true
|
|
||||||
plot_footprint_values: false
|
|
||||||
force_plot_invisible_refs_vals: false
|
|
||||||
tent_vias: true
|
|
||||||
use_protel_extensions: true
|
|
||||||
create_gerber_job_file: false
|
|
||||||
disable_aperture_macros: true
|
|
||||||
gerber_precision: 4.6
|
|
||||||
use_gerber_x2_attributes: false
|
|
||||||
use_gerber_net_attributes: false
|
|
||||||
line_width: 0.1
|
|
||||||
subtract_mask_from_silk: true
|
|
||||||
inner_extension_pattern: '.g%n'
|
|
||||||
layers:
|
|
||||||
# Note: a more generic approach is to use 'copper' but then the filenames
|
|
||||||
# are slightly different.
|
|
||||||
- F.Cu
|
|
||||||
- B.Cu
|
|
||||||
- In1.Cu
|
|
||||||
- In2.Cu
|
|
||||||
- In3.Cu
|
|
||||||
- In4.Cu
|
|
||||||
- In5.Cu
|
|
||||||
- In6.Cu
|
|
||||||
- F.SilkS
|
|
||||||
- B.SilkS
|
|
||||||
- F.Mask
|
|
||||||
- B.Mask
|
|
||||||
- Edge.Cuts
|
|
||||||
|
|
||||||
- name: JLCPCB_drill
|
- name: JLCPCB_drill
|
||||||
comment: Drill files compatible with JLCPCB
|
comment: Drill files compatible with JLCPCB
|
||||||
type: excellon
|
type: excellon
|
||||||
dir: JLCPCB
|
dir: JLCPCB
|
||||||
options:
|
extends: _JLCPCB_drill
|
||||||
pth_and_npth_single_file: false
|
disable_run_by_default: true
|
||||||
pth_id: '-PTH'
|
|
||||||
npth_id: '-NPTH'
|
|
||||||
metric_units: true
|
|
||||||
map: gerber
|
|
||||||
route_mode_for_oval_holes: false
|
|
||||||
output: "%f%i.%x"
|
|
||||||
|
|
||||||
- name: 'JLCPCB_position'
|
- name: JLCPCB_position
|
||||||
comment: "Pick and place file, JLCPCB style"
|
comment: Pick and place file, JLCPCB style
|
||||||
type: position
|
type: position
|
||||||
dir: JLCPCB
|
dir: JLCPCB
|
||||||
options:
|
extends: _JLCPCB_position
|
||||||
variant: rotated
|
disable_run_by_default: true
|
||||||
output: '%f_cpl_jlc.%x'
|
|
||||||
format: CSV
|
|
||||||
units: millimeters
|
|
||||||
separate_files_for_front_and_back: false
|
|
||||||
only_smd: true
|
|
||||||
columns:
|
|
||||||
- id: Ref
|
|
||||||
name: Designator
|
|
||||||
- Val
|
|
||||||
- Package
|
|
||||||
- id: PosX
|
|
||||||
name: "Mid X"
|
|
||||||
- id: PosY
|
|
||||||
name: "Mid Y"
|
|
||||||
- id: Rot
|
|
||||||
name: Rotation
|
|
||||||
- id: Side
|
|
||||||
name: Layer
|
|
||||||
|
|
||||||
- name: 'JLCPCB_bom'
|
- name: JLCPCB_bom
|
||||||
comment: "BoM for JLCPCB"
|
comment: BoM for JLCPCB
|
||||||
type: bom
|
type: bom
|
||||||
dir: JLCPCB
|
dir: JLCPCB
|
||||||
options:
|
extends: _JLCPCB_bom
|
||||||
output: '%f_%i_jlc.%x'
|
disable_run_by_default: true
|
||||||
exclude_filter: 'only_jlc_parts'
|
|
||||||
ref_separator: ','
|
|
||||||
columns:
|
|
||||||
- field: Value
|
|
||||||
name: Comment
|
|
||||||
- field: References
|
|
||||||
name: Designator
|
|
||||||
- Footprint
|
|
||||||
- field: 'LCSC#'
|
|
||||||
name: 'LCSC Part #'
|
|
||||||
csv:
|
|
||||||
hide_pcb_info: true
|
|
||||||
hide_stats_info: true
|
|
||||||
quote_all: true
|
|
||||||
|
|
||||||
- name: JLCPCB
|
- name: JLCPCB
|
||||||
comment: ZIP file for JLCPCB
|
comment: ZIP file for JLCPCB
|
||||||
type: compress
|
type: compress
|
||||||
dir: JLCPCB
|
dir: JLCPCB
|
||||||
options:
|
extends: _JLCPCB_compress
|
||||||
files:
|
disable_run_by_default: true
|
||||||
- from_output: JLCPCB_gerbers
|
|
||||||
dest: /
|
|
||||||
- from_output: JLCPCB_drill
|
|
||||||
dest: /
|
|
||||||
- from_output: JLCPCB_position
|
|
||||||
dest: /
|
|
||||||
- from_output: JLCPCB_bom
|
|
||||||
dest: /
|
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,29 @@
|
||||||
# Gerber and drill files for PCBWay, with stencil (solder paste)
|
# Gerber and drill files for PCBWay, with stencil (solder paste)
|
||||||
# URL: https://www.pcbway.com
|
# This is just a template for the quick-start
|
||||||
# Based on setting used by Gerber Zipper (https://github.com/g200kg/kicad-gerberzipper)
|
|
||||||
kibot:
|
kibot:
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
|
import:
|
||||||
|
- file: PCBWay
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
- name: PCBWay_gerbers
|
- name: PCBWay_gerbers
|
||||||
comment: Gerbers compatible with PCBWay
|
comment: Gerbers compatible with PCBWay
|
||||||
type: gerber
|
type: gerber
|
||||||
dir: PCBWay
|
dir: PCBWay
|
||||||
options: &gerber_options
|
extends: _PCBWay_gerbers
|
||||||
exclude_edge_layer: true
|
disable_run_by_default: true
|
||||||
exclude_pads_from_silkscreen: true
|
|
||||||
plot_sheet_reference: false
|
|
||||||
plot_footprint_refs: true
|
|
||||||
plot_footprint_values: true
|
|
||||||
force_plot_invisible_refs_vals: false
|
|
||||||
tent_vias: true
|
|
||||||
use_protel_extensions: true
|
|
||||||
create_gerber_job_file: false
|
|
||||||
output: "%f.%x"
|
|
||||||
gerber_precision: 4.6
|
|
||||||
use_gerber_x2_attributes: false
|
|
||||||
use_gerber_net_attributes: false
|
|
||||||
disable_aperture_macros: true
|
|
||||||
line_width: 0.1
|
|
||||||
subtract_mask_from_silk: false
|
|
||||||
inner_extension_pattern: '.gl%N'
|
|
||||||
layers:
|
|
||||||
- copper
|
|
||||||
- F.SilkS
|
|
||||||
- B.SilkS
|
|
||||||
- F.Mask
|
|
||||||
- B.Mask
|
|
||||||
- F.Paste
|
|
||||||
- B.Paste
|
|
||||||
- Edge.Cuts
|
|
||||||
|
|
||||||
- name: PCBWay_drill
|
- name: PCBWay_drill
|
||||||
comment: Drill files compatible with PCBWay
|
comment: Drill files compatible with PCBWay
|
||||||
type: excellon
|
type: excellon
|
||||||
dir: PCBWay
|
dir: PCBWay
|
||||||
options:
|
extends: _PCBWay_drill
|
||||||
metric_units: false
|
disable_run_by_default: true
|
||||||
minimal_header: true
|
|
||||||
zeros_format: SUPPRESS_LEADING
|
|
||||||
# left_digits: 3
|
|
||||||
# right_digits: 3
|
|
||||||
# See https://github.com/INTI-CMNB/kicad-ci-test-spora/issues/1
|
|
||||||
# and https://docs.oshpark.com/design-tools/gerbv/fix-drill-format/
|
|
||||||
left_digits: 2
|
|
||||||
right_digits: 4
|
|
||||||
pth_and_npth_single_file: false
|
|
||||||
pth_id: ''
|
|
||||||
npth_id: '-NPTH'
|
|
||||||
output: "%f%i.drl"
|
|
||||||
|
|
||||||
- name: PCBWay
|
- name: PCBWay
|
||||||
comment: ZIP file for PCBWay
|
comment: ZIP file for PCBWay
|
||||||
type: compress
|
type: compress
|
||||||
dir: PCBWay
|
dir: PCBWay
|
||||||
options:
|
extends: _PCBWay_compress
|
||||||
format: ZIP
|
disable_run_by_default: true
|
||||||
files:
|
|
||||||
- from_output: PCBWay_gerbers
|
|
||||||
dest: /
|
|
||||||
- from_output: PCBWay_drill
|
|
||||||
dest: /
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue