Skip to content

Commit

Permalink
Better BOM format
Browse files Browse the repository at this point in the history
  • Loading branch information
nophead committed Apr 2, 2012
1 parent b2ea9b1 commit d61dc7f
Show file tree
Hide file tree
Showing 50 changed files with 604 additions and 601 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.pyc
*.log
*.gcode
scad/conf/machine.scad
scad/stl.scad
dummy.csg
Expand Down
27 changes: 11 additions & 16 deletions bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,52 +34,47 @@ def make_name(self, ass):
return ass.replace("assembly", "assemblies")

def print_bom(self, breakdown, file = None):
print >> file, "Vitamins:"
if breakdown:
longest = 0
for ass in self.assemblies:
name = ass.replace("_assembly","")
longest = max(longest, len(name))
for i in range(longest):
print >> file, " " * 14,
for ass in sorted(self.assemblies):
name = ass.replace("_assembly","").replace("_"," ")
if longest - i > len(name):
name = ass.replace("_assembly","").replace("_"," ").capitalize()
index = i - (longest - len(name))
if index < 0:
print >> file, " ",
else:
print >> file, " %s" % name[i - (longest - len(name))],
print >> file, " %s" % name[index],
print >> file

print >> file, "Vitamins:"
for part in sorted(self.vitamins):
if ': ' in part:
part_no, description = part.split(': ')
else:
part_no, description = "", part
print >> file, "%3d %-10s" % (self.vitamins[part], part_no),
if breakdown:
for ass in sorted(self.assemblies):
bom = self.assemblies[ass]
if part in bom.vitamins:
print >> file, "%2d" % bom.vitamins[part],
file.write("%2d|" % bom.vitamins[part])
else:
print >> file, " ",

print >> file, description
file.write(" |")
print >> file, "%3d" % self.vitamins[part], description

print >> file
print >> file, "Printed:"
for part in sorted(self.printed):
print >> file, "%3d" % self.printed[part],
if breakdown:
print >> file, " " * 10,
for ass in sorted(self.assemblies):
bom = self.assemblies[ass]
if part in bom.printed:
print >> file, "%2d" % bom.printed[part],
file.write("%2d|" % bom.printed[part])
else:
print >> file, " ",

print >> file, part
file.write(" |")
print >> file, "%3d" % self.printed[part], part

print >> file
if self.assemblies:
Expand Down
20 changes: 10 additions & 10 deletions mendel/bom/D_connector_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
D_connector_assembly:
Vitamins:
2 CS03016 M3 cap screw x 16
2 CS03020 M3 cap screw x 20
2 CS03045 M3 cap screw x 45
1 DTYPEP9 9 way D plug
1 DTYPES9 9 way D socket
2 NUTM3 Nut M3
2 NYLOCM3 Nyloc nut M3
4 PSW0213 No2 pan wood screw x 13
4 WA2555 Washer M2.5 x 5 x 0.5
8 WA3075 Washer M3 x 7 x 0.5
2 M3 cap screw x 16mm
2 M3 cap screw x 20mm
2 M3 cap screw x 45mm
1 9 way D plug
1 9 way D socket
2 Nut M3
2 Nyloc nut M3
4 No2 pan wood screw x 13mm
4 Washer M2.5 x 5mm x 0.5mm
8 Washer M3 x 7mm x 0.5mm

Printed:
1 d_motor_bracket.stl
Expand Down
12 changes: 6 additions & 6 deletions mendel/bom/bed_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
bed_assembly:
Vitamins:
4 BD0019 19mm bulldog clip
1 BED214214 PCB bed 214 x 214
4 CS03010 M3 cap screw x 10
1 GL2214202 Glass sheet 214 x 202 x 2
4 HP0320 Hex pillar M3 x 20
2 WA3075 Washer M3 x 7 x 0.5
4 19mm bulldog clip
1 PCB bed 214mm x 214mm
4 M3 cap screw x 10mm
1 Glass sheet 214mm x 202mm x 2mm
4 Hex pillar M3 x 20mm
2 Washer M3 x 7mm x 0.5mm

Printed:

8 changes: 4 additions & 4 deletions mendel/bom/bed_fan_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bed_fan_assembly:
Vitamins:
4 CS04020 M4 cap screw x 20
1 FAN8038 Fan 80 x 38
4 NYLOCM4 Nyloc nut M4
4 WA4099 Washer M4 x 9 x 0.9
4 M4 cap screw x 20mm
1 Fan 80mm x 38mm
4 Nyloc nut M4
4 Washer M4 x 9mm x 0.9mm

Printed:
1 fan_guard.stl
Expand Down
248 changes: 124 additions & 124 deletions mendel/bom/bom.txt

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions mendel/bom/electronics_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
electronics_assembly:
Vitamins:
4 CS03010 M3 cap screw x 10
4 CS03016 M3 cap screw x 16
1 KY240W12L PSU e.g. KY240W12L
1 SANGUINOL Electronics e.g. Sanguinolou
8 WA3075 Washer M3 x 7 x 0.5
8 WS3075 Star washer M3 x 7 x 0.5
4 M3 cap screw x 10mm
4 M3 cap screw x 16mm
1 PSU e.g. KY240W12L
1 Electronics e.g. Sanguinolou
8 Washer M3 x 7mm x 0.5mm
8 Star washer M3 x 7mm x 0.5mm

Printed:
4 pcb_spacer.stl
Expand Down
18 changes: 9 additions & 9 deletions mendel/bom/frame_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
frame_assembly:
Vitamins:
1 AC10468432 Acrylic sheet 468 x 432 x 10
2 AC6170324 Acrylic sheet 170 x 324 x 6
1 AC6468324 Acrylic sheet 468 x 324 x 6
1 PP527320 Polypropylene strip 320mm x 27mm x 0.5mm
1 PP529275 Polypropylene strip 275mm x 29mm x 0.5mm
28 PS04012 M4 pan screw x 12
11 PS04016 M4 pan screw x 16
39 WA4099 Washer M4 x 9 x 0.9
30 WS4099 Star washer M4 x 9 x 0.9
1 Acrylic sheet 468mm x 432mm x 10mm
2 Acrylic sheet 170mm x 324mm x 6mm
1 Acrylic sheet 468mm x 324mm x 6mm
1 Polypropylene strip 320mm x 27mm x 0.5mm
1 Polypropylene strip 275mm x 29mm x 0.5mm
28 M4 pan screw x 12mm
11 M4 pan screw x 16mm
39 Washer M4 x 9mm x 0.9mm
30 Star washer M4 x 9mm x 0.9mm

Printed:
2 cable_clip_AB.stl
Expand Down
36 changes: 18 additions & 18 deletions mendel/bom/wades_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
wades_assembly:
Vitamins:
3 BB608 Ball bearing 608 8 x 22 x 7
2 CS03030 M3 cap screw x 30
1 GB0306 M3 grub screw x 6
2 HX04020 M4 hex screw x 20
2 HX04050 M4 hex screw x 50
1 HX08060 M8 hex screw x 60
1 NEMA17475 NEMA17 x 47.5 stepper motor
1 NUTM3 Nut M3
2 NUTM4 Nut M4
1 NUTM8 Nut M8
3 PS0308 M3 pan screw x 8
1 RD822 Smooth rod 8 x 22
1 SPR127510 Spring 12 x 0.75 x 10
2 SPR710010 Spring 7 x 1 x 10
3 WA3075 Washer M3 x 7 x 0.5
2 WA4099 Washer M4 x 9 x 0.9
1 WA801615 Washer M8 x 16 x 1.5
3 WS3075 Star washer M3 x 7 x 0.5
3 Ball bearing 608 8mm x 22mm x 7mm
2 M3 cap screw x 30mm
1 M3 grub screw x 6mm
2 M4 hex screw x 20mm
2 M4 hex screw x 50mm
1 M8 hex screw x 60mm
1 NEMA17 x 47.5mm stepper motor
1 Nut M3
2 Nut M4
1 Nut M8
3 M3 pan screw x 8mm
1 Smooth rod 8mm x 22mm
1 Spring 12mm OD x 0.75mm gauge x 10mm length
2 Spring 7mm OD x 1mm gauge x 10mm length
3 Washer M3 x 7mm x 0.5mm
2 Washer M4 x 9mm x 0.9mm
1 Washer M8 x 16mm x 1.5mm
3 Star washer M3 x 7mm x 0.5mm

Printed:
1 wades_big_gear.stl
Expand Down
6 changes: 3 additions & 3 deletions mendel/bom/x_axis_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
x_axis_assembly:
Vitamins:
1 BT56866 Belt T5 x 6 x 866
1 PP517402 Polypropylene strip 402mm x 17mm x 0.5mm
2 RD8382 Smooth rod 8 x 382
1 Belt T5 x 6mm x 866mm
1 Polypropylene strip 402mm x 17mm x 0.5mm
2 Smooth rod 8mm x 382mm

Printed:

Expand Down
16 changes: 8 additions & 8 deletions mendel/bom/x_carriage_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
x_carriage_assembly:
Vitamins:
1 CS03020 M3 cap screw x 20
2 CS03025 M3 cap screw x 25
3 LM8UU LM8UU linear bearing
1 NUTM3 Nut M3
2 NYLOCM3 Nyloc nut M3
2 WA3075 Washer M3 x 7 x 0.5
2 WING04 Wingnut M4
3 ZT0087 Ziptie 87
1 M3 cap screw x 20mm
2 M3 cap screw x 25mm
3 LM8UU linear bearing
1 Nut M3
2 Nyloc nut M3
2 Washer M3 x 7mm x 0.5mm
2 Wingnut M4
3 Ziptie 87mm min length

Printed:
1 x_belt_clamp.stl
Expand Down
20 changes: 10 additions & 10 deletions mendel/bom/x_idler_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
x_idler_assembly:
Vitamins:
1 BB624 Ball bearing 624 4 x 13 x 5
1 CS04040 M4 cap screw x 40
2 HX03016 M3 hex screw x 16
2 LM8UU LM8UU linear bearing
1 NUTM8 Nut M8
2 NYLOCM3 Nyloc nut M3
1 NYLOCM4 Nyloc nut M4
2 WA3075 Washer M3 x 7 x 0.5
2 WA4099 Washer M4 x 9 x 0.9
2 WA502014 Washer M5 x 20 x 1.4
1 Ball bearing 624 4mm x 13mm x 5mm
1 M4 cap screw x 40mm
2 M3 hex screw x 16mm
2 LM8UU linear bearing
1 Nut M8
2 Nyloc nut M3
1 Nyloc nut M4
2 Washer M3 x 7mm x 0.5mm
2 Washer M4 x 9mm x 0.9mm
2 Washer M5 x 20mm x 1.4mm

Printed:
1 x_idler_bracket.stl
Expand Down
28 changes: 14 additions & 14 deletions mendel/bom/x_motor_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
x_motor_assembly:
Vitamins:
2 CS03016 M3 cap screw x 16
1 GB0306 M3 grub screw x 6
4 HX03016 M3 hex screw x 16
2 LM8UU LM8UU linear bearing
1 NEMA17475 NEMA17 x 47.5 stepper motor
1 NUTM3 Nut M3
1 NUTM8 Nut M8
6 NYLOCM3 Nyloc nut M3
3 PS0308 M3 pan screw x 8
2 PSW0213 No2 pan wood screw x 13
1 SMMICRO Microswitch
2 WA2555 Washer M2.5 x 5 x 0.5
9 WA3075 Washer M3 x 7 x 0.5
3 WS3075 Star washer M3 x 7 x 0.5
2 M3 cap screw x 16mm
1 M3 grub screw x 6mm
4 M3 hex screw x 16mm
2 LM8UU linear bearing
1 NEMA17 x 47.5mm stepper motor
1 Nut M3
1 Nut M8
6 Nyloc nut M3
3 M3 pan screw x 8mm
2 No2 pan wood screw x 13mm
1 Microswitch
2 Washer M2.5 x 5mm x 0.5mm
9 Washer M3 x 7mm x 0.5mm
3 Star washer M3 x 7mm x 0.5mm

Printed:
1 pulley.stl
Expand Down
24 changes: 12 additions & 12 deletions mendel/bom/y_axis_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
y_axis_assembly:
Vitamins:
1 BT56674 Belt T5 x 6 x 674
4 CS03016 M3 cap screw x 16
4 NYLOCM3 Nyloc nut M3
8 PS04016 M4 pan screw x 16
2 PSW0213 No2 pan wood screw x 13
1 RD8270 Smooth rod 8 x 270
1 RD8428 Smooth rod 8 x 428
1 SMMICRO Microswitch
2 WA2555 Washer M2.5 x 5 x 0.5
4 WA3075 Washer M3 x 7 x 0.5
8 WA4099 Washer M4 x 9 x 0.9
8 WS4099 Star washer M4 x 9 x 0.9
1 Belt T5 x 6mm x 674mm
4 M3 cap screw x 16mm
4 Nyloc nut M3
8 M4 pan screw x 16mm
2 No2 pan wood screw x 13mm
1 Smooth rod 8mm x 270mm
1 Smooth rod 8mm x 428mm
1 Microswitch
2 Washer M2.5 x 5mm x 0.5mm
4 Washer M3 x 7mm x 0.5mm
8 Washer M4 x 9mm x 0.9mm
8 Star washer M4 x 9mm x 0.9mm

Printed:
3 y_bar_clamp.stl
Expand Down
18 changes: 9 additions & 9 deletions mendel/bom/y_carriage_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
y_carriage_assembly:
Vitamins:
1 AC6224224 Acrylic sheet 224 x 224 x 6
5 AF150234 Aluminium foil tape 50 x 234 x 0.05
1 CB6200224 Corrugated cardboard 200 x 224 x 6
14 CS03016 M3 cap screw x 16
2 CS03025 M3 cap screw x 25
3 LM8UU LM8UU linear bearing
16 NYLOCM3 Nyloc nut M3
24 WA3075 Washer M3 x 7 x 0.5
3 ZT0087 Ziptie 87
1 Acrylic sheet 224mm x 224mm x 6mm
5 Aluminium foil tape 50mm x 234mm x 0.05mm
1 Corrugated cardboard 200mm x 224mm x 6mm
14 M3 cap screw x 16mm
2 M3 cap screw x 25mm
3 LM8UU linear bearing
16 Nyloc nut M3
24 Washer M3 x 7mm x 0.5mm
3 Ziptie 87mm min length

Printed:
2 ribbon_clamp_22_33.stl
Expand Down
14 changes: 7 additions & 7 deletions mendel/bom/y_idler_assembly.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
y_idler_assembly:
Vitamins:
2 BB624 Ball bearing 624 4 x 13 x 5
1 CS04040 M4 cap screw x 40
1 NYLOCM4 Nyloc nut M4
1 PS04016 M4 pan screw x 16
5 WA4099 Washer M4 x 9 x 0.9
2 WA502014 Washer M5 x 20 x 1.4
1 WS4099 Star washer M4 x 9 x 0.9
2 Ball bearing 624 4mm x 13mm x 5mm
1 M4 cap screw x 40mm
1 Nyloc nut M4
1 M4 pan screw x 16mm
5 Washer M4 x 9mm x 0.9mm
2 Washer M5 x 20mm x 1.4mm
1 Star washer M4 x 9mm x 0.9mm

Printed:
1 y_idler_bracket.stl
Expand Down
Loading

0 comments on commit d61dc7f

Please sign in to comment.