Skip to content

Commit

Permalink
Issue Bouni#490, 'Do not place' attribute ignored when creating BOM file
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfredSteiner authored and gonzalop committed Jul 28, 2024
1 parent e8104d9 commit 24d1a87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fabrication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24d1a87

Please sign in to comment.