From bb8746237f777571d9ec30c89eb25be9a23fb748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mr=C3=A1zek?= Date: Wed, 21 Feb 2024 16:51:22 +0100 Subject: [PATCH] Fix handling of DNP in JLC PCB fab --- kikit/fab/jlcpcb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kikit/fab/jlcpcb.py b/kikit/fab/jlcpcb.py index bc9a1a3b..5fee1e7e 100644 --- a/kikit/fab/jlcpcb.py +++ b/kikit/fab/jlcpcb.py @@ -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}