Skip to content

Commit

Permalink
Fix handling of DNP in JLC PCB fab
Browse files Browse the repository at this point in the history
  • Loading branch information
yaqwsx committed Feb 21, 2024
1 parent 8855237 commit bb87462
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kikit/fab/jlcpcb.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ def exportJlcpcb(board, outputdir, assembly, schematic, ignore, field,
ordercodeFields = [x.strip() for x in field.split(",")]
bom = collectBom(components, ordercodeFields, refsToIgnore)

bom_refs = set(x for xs in bom.values() for x in xs)
bom_components = [c for c in components if getReference(c) in bom_refs]

posData = collectPosData(loadedBoard, correctionFields,
bom=components, posFilter=noFilter, correctionFile=correctionpatterns)
bom=bom_components, posFilter=noFilter, correctionFile=correctionpatterns)
boardReferences = set([x[0] for x in posData])
bom = {key: [v for v in val if v in boardReferences] for key, val in bom.items()}
bom = {key: val for key, val in bom.items() if len(val) > 0}
Expand Down

0 comments on commit bb87462

Please sign in to comment.