summaryrefslogtreecommitdiff
path: root/gerbonara/layer_rules.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2024-11-06 14:49:50 +0100
committerjaseg <git@jaseg.de>2024-11-06 14:49:50 +0100
commitbe8371c7bc21abe12db49f9dd38dac4513a64886 (patch)
tree2cf9d84d17f60666b2466b162c632ea1e325b25f /gerbonara/layer_rules.py
parent1a854b1812400867117584f6bbde7bd1c75bb118 (diff)
downloadgerbonara-be8371c7bc21abe12db49f9dd38dac4513a64886.tar.gz
gerbonara-be8371c7bc21abe12db49f9dd38dac4513a64886.tar.bz2
gerbonara-be8371c7bc21abe12db49f9dd38dac4513a64886.zip
Improve allegro/orcad import
Diffstat (limited to 'gerbonara/layer_rules.py')
-rw-r--r--gerbonara/layer_rules.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/gerbonara/layer_rules.py b/gerbonara/layer_rules.py
index aae52ae..eb3e0e5 100644
--- a/gerbonara/layer_rules.py
+++ b/gerbonara/layer_rules.py
@@ -82,6 +82,7 @@ MATCH_RULES = {
'bottom paste': r'.*_boardoutline\.\w+', # FIXME verify this
'drill plated': r'.*\.(drl)', # diptrace has unplated drills on the outline layer
'other netlist': r'.*\.ipc', # default rule due to lack of tool-specific examples
+ 'header regex': [['sufficient', r'top .*|bottom .*', r'G04 DipTrace [.-0-9a-z]*\*']],
},
'target': {
@@ -151,22 +152,25 @@ MATCH_RULES = {
'allegro': {
# Allegro doesn't have any widespread convention, so we rely heavily on the layer name auto-guesser here.
- 'drill mech': r'.*\.(drl|rou)',
- 'generic gerber': r'.*\.art',
+ 'drill plated': r'.*\.(drl)',
+ 'drill nonplated': r'.*\.(rou)',
+ 'other unknown': r'.*(place|assembly|keep.?in|keep.?out).*\.art',
+ 'autoguess': r'.*\.art',
'excellon params': r'nc_param\.txt|ncdrill\.log|ncroute\.log',
'other netlist': r'.*\.ipc', # default rule due to lack of tool-specific examples
+ 'header regex': [['required,sufficient', r'.*\.art', r'G04 File Origin:\s+Cadence Allegro [0-9]+\.[0-9]+[-a-zA-Z0-9]*']],
},
'pads': {
# Pads also does not seem to have a factory-default naming schema. Or it has one but everyone ignores it.
- 'generic gerber': r'.*\.pho',
- 'drill mech': r'.*\.drl',
+ 'autoguess': r'.*\.pho',
+ 'drill plated': r'.*\.drl',
},
'zuken': {
- 'generic gerber': r'.*\.fph',
+ 'autoguess': r'.*\.fph',
'gerber params': r'.*\.fpl',
- 'drill mech': r'.*\.fdr',
+ 'drill unknown': r'.*\.fdr',
'excellon params': r'.*\.fdl',
'other netlist': r'.*\.ipc',
'ipc-2581': r'.*\.xml',