diff --git a/fabrication.py b/fabrication.py index 062475b..ba27370 100644 --- a/fabrication.py +++ b/fabrication.py @@ -309,6 +309,13 @@ def generate_bom(self): writer = csv.writer(csvfile, delimiter=",") writer.writerow(["Comment", "Designator", "Footprint", "LCSC"]) for part in self.parent.store.read_bom_parts(): + components = part[1].split(",") + for component in components: + for fp in self.board.Footprints(): + if fp.GetReference() == component and fp.IsDNP(): + components.remove(component) + part[1] = ','.join(components) + self.logger.info("Component %s has 'Do not placed' enabled: removing from BOM", component) if not add_without_lcsc and not part[3]: continue writer.writerow(part)