Skip to content

Commit

Permalink
Revert changes made to BOM creation in #480
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias Bonauer authored and Bouni committed Jun 19, 2024
1 parent 5d497a5 commit 79d0d68
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fabrication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 79d0d68

Please sign in to comment.