@@ -124,6 +124,14 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
124
124
# Any PCB_TEXT containing any of these keywords will be copied into the ordering instructions
125
125
possibleExtras = ['clean' , 'Clean' , 'CLEAN' ]
126
126
127
+ # Permutations for Ordering Instructions
128
+ possibleOrderingInstructions = [
129
+ "Ordering_Instructions" ,
130
+ "ORDERING_INSTRUCTIONS" ,
131
+ "Ordering Instructions" ,
132
+ "ORDERING INSTRUCTIONS"
133
+ ]
134
+
127
135
sysExit = - 1 # -1 indicates sysExit has not (yet) been set. The code below will set this to 0, 1, 2.
128
136
report = "\n START: " + datetime .now ().isoformat () + "\n "
129
137
@@ -433,8 +441,9 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
433
441
newModules = []
434
442
prodIDs = []
435
443
for sourceModule in modules :
436
- if "Ordering_Instructions" in sourceModule .GetFPIDAsString ():
437
- orderingInstructionsSeen = True
444
+ for instruction in possibleOrderingInstructions :
445
+ if instruction in sourceModule .GetFPIDAsString ():
446
+ orderingInstructionsSeen = True
438
447
if "SparkFun_Logo" in sourceModule .GetFPIDAsString ():
439
448
sparkfunLogoSeen = True
440
449
if "SparkX_Logo" in sourceModule .GetFPIDAsString ():
@@ -520,26 +529,28 @@ def startPanelizer(self, args, board=None, ordering=None, logger=None):
520
529
for sourceDrawing in drawings :
521
530
if isinstance (sourceDrawing , pcbnew .PCB_TEXT ):
522
531
txt = sourceDrawing .GetShownText ()
523
- if "mask" in txt or "Mask" in txt or "MASK" in txt :
524
- solderMask = txt
525
- if "layers" in txt or "Layers" in txt or "LAYERS" in txt :
526
- if numLayers is None : # Should we trust the instructions or the tracks?!
527
- numLayers = txt
528
- if "impedance" in txt or "Impedance" in txt or "IMPEDANCE" in txt :
529
- controlledImpedance = txt
530
- if "finish" in txt or "Finish" in txt or "FINISH" in txt :
531
- finish = txt
532
- if "thickness" in txt or "Thickness" in txt or "THICKNESS" in txt :
533
- thickness = txt
534
- if "material" in txt or "Material" in txt or "MATERIAL" in txt :
535
- material = txt
536
- if "weight" in txt or "Weight" in txt or "WEIGHT" in txt or "oz" in txt or "Oz" in txt or "OZ" in txt :
537
- copperWeight = txt
538
- for extra in possibleExtras :
539
- if extra in txt :
540
- if orderingExtras is None :
541
- orderingExtras = ""
542
- orderingExtras += txt + "\n "
532
+ lines = txt .splitlines ()
533
+ for line in lines :
534
+ if "mask" in line or "Mask" in line or "MASK" in line :
535
+ solderMask = line
536
+ if "layers" in line or "Layers" in line or "LAYERS" in line :
537
+ if numLayers is None : # Should we trust the instructions or the tracks?!
538
+ numLayers = line
539
+ if "impedance" in line or "Impedance" in line or "IMPEDANCE" in line :
540
+ controlledImpedance = line
541
+ if "finish" in line or "Finish" in line or "FINISH" in line :
542
+ finish = line
543
+ if "thickness" in line or "Thickness" in line or "THICKNESS" in line :
544
+ thickness = line
545
+ if "material" in line or "Material" in line or "MATERIAL" in line :
546
+ material = line
547
+ if "weight" in line or "Weight" in line or "WEIGHT" in line or "oz" in line or "Oz" in line or "OZ" in line :
548
+ copperWeight = line
549
+ for extra in possibleExtras :
550
+ if extra in line :
551
+ if orderingExtras is None :
552
+ orderingExtras = ""
553
+ orderingExtras += line + "\n "
543
554
pos = sourceDrawing .GetPosition () # Check if drawing is outside the bounding box
544
555
if pos .x >= boardLeftEdge and pos .x <= boardRightEdge and \
545
556
pos .y >= boardTopEdge and pos .y <= boardBottomEdge :
0 commit comments