From 79d0d6839a2ccd8cb4c6782e420c9e82ec908947 Mon Sep 17 00:00:00 2001 From: Elias Bonauer Date: Fri, 14 Jun 2024 09:21:40 +0200 Subject: [PATCH] Revert changes made to BOM creation in #480 --- fabrication.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fabrication.py b/fabrication.py index bc1aaa6..9d4e3b7 100644 --- a/fabrication.py +++ b/fabrication.py @@ -278,6 +278,7 @@ def generate_cpl(self): ) self.logger.info("Finished generating CPL file %s", os.path.join(self.outputdir, cplname)) + def generate_bom(self): """Generate BOM file.""" bomname = f"BOM-{Path(self.filename).stem}.csv" @@ -289,12 +290,7 @@ def generate_bom(self): ) as csvfile: writer = csv.writer(csvfile, delimiter=",") writer.writerow(["Comment", "Designator", "Footprint", "LCSC"]) - footprints = sorted(self.board.Footprints(), key = lambda x: x.GetReference()) - for fp in footprints: - # for part in self.parent.store.read_bom_parts(): - part = self.parent.store.get_part(fp.GetReference()) - if part[5] == 1: # Exclude from BOM - continue + for part in self.parent.store.read_bom_parts(): if not add_without_lcsc and not part[3]: continue writer.writerow(part)