1
0
mirror of https://github.com/nophead/Mendel90.git synced 2025-08-30 08:21:23 +02:00

Better BOM format

This commit is contained in:
Chris Palmer
2012-04-02 15:30:31 +01:00
parent b2ea9b14af
commit d61dc7fa2d
50 changed files with 604 additions and 601 deletions

View File

@@ -30,7 +30,7 @@ module bed_assembly() {
}
translate([0, 0, washer_thickness(M3_washer)]) {
vitamin(str("BED", bed_width, bed_depth,": PCB bed ", bed_width, " x ", bed_depth));
vitamin(str("BED", bed_width, bed_depth,": PCB bed ", bed_width, "mm x ", bed_depth, "mm"));
translate([0,0, pillar_height(bed_pillars) + pcb_thickness / 2])
color(bed_color) cube([bed_width, bed_depth, pcb_thickness], center = true);

View File

@@ -27,20 +27,20 @@ include <../vitamins/electronics.scad>
module rod(d , l) {
vitamin(str("RD", d, round(l), ": Smooth rod ", d, " x ", round(l)));
vitamin(str("RD", d, round(l), ": Smooth rod ", d, "mm x ", round(l), "mm"));
color(rod_color)
cylinder(r = d / 2, h = l, center = true);
}
module studding(d , l) {
vitamin(str("ST", d, round(l),": Threaded rod ", d, " x ", round(l)));
vitamin(str("ST", d, round(l),": Threaded rod M", d, " x ", round(l), "mm"));
color(studding_color)
cylinder(r = d / 2, h = l, center = true);
}
module tubing(od, id, length) {
vitamin(str("TB", od, id, length,": Tubing OD ",od, " ID ", id," x ",length));
vitamin(str("TB", od, id, length,": Tubing OD ",od, "mm ID ", id,"mm x ",length, "mm"));
color(tubing_color) render() difference() {
cylinder(r = od / 2, h = length, center = true);
cylinder(r = id / 2, h = length + 1, center = true);

View File

@@ -14,7 +14,7 @@ function ball_bearing_diameter(type) = type[1];
function ball_bearing_width(type) = type[2];
module ball_bearing(type) {
vitamin(str("BB",type[3],": Ball bearing ",type[3]," ",type[0], " x ", type[1], " x ", type[2]));
vitamin(str("BB",type[3],": Ball bearing ",type[3]," ",type[0], "mm x ", type[1], "mm x ", type[2], "mm"));
rim = type[1] / 10;
color(bearing_color) render() difference() {

View File

@@ -23,7 +23,7 @@ module belt(type, x1, y1, r1, x2, y2, r2, gap = 0) {
dy = y2 - y1;
length = pi * (r1 + r2) + 2 * sqrt(dx * dx + dy * dy) - gap;
vitamin(str("BT", belt_pitch(type),width, round(length), ": Belt T", belt_pitch(type)," x ", width, " x ", round(length)));
vitamin(str("BT", belt_pitch(type),width, round(length), ": Belt T", belt_pitch(type)," x ", width, "mm x ", round(length), "mm"));
color(belt_color)
linear_extrude(height = width, center = true, convexity = 6) {

View File

@@ -27,7 +27,7 @@ module fan(type) {
corner_radius = width / 2 - hole_pitch;
screw = fan_screw(type);
vitamin(str("FAN", fan_width(type), fan_depth(type), ": Fan ", fan_width(type), " x ", fan_depth(type)));
vitamin(str("FAN", fan_width(type), fan_depth(type), ": Fan ", fan_width(type), "mm x ", fan_depth(type), "mm"));
difference() {
linear_extrude(height = depth, center = true, convexity = 4)
difference() {

View File

@@ -28,7 +28,7 @@ module pillar(type) {
module hex_pillar(type) {
height = pillar_height(type);
vitamin(str("HP0", type[0], height, " : Hex pillar M", type[0], " x ", height));
vitamin(str("HP0", type[0], height, " : Hex pillar M", type[0], " x ", height, "mm"));
color(pillar_color) render() difference() {
union() {
cylinder(h = height, r = type[2] / 2, $fn = 6);

View File

@@ -54,7 +54,7 @@ function screw_head_height(type) = type[2] == hs_cap ? type[4] :
module screw(type, length) {
vitamin(str(type[0], length,": ",type[1], " x ", length));
vitamin(str(type[0], length,": ",type[1], " x ", length, "mm"));
head_type = type[2];
rad = screw_radius(type) - eta;

View File

@@ -51,7 +51,7 @@ module corner(r) {
module sheet(type, w, d, corners = [0, 0, 0, 0]) {
t = sheet_thickness(type);
vitamin(str(type[0], ceil(t), round(w), round(d),": ",type[1]," ", round(w), " x ", round(d), " x ", t));
vitamin(str(type[0], ceil(t), round(w), round(d),": ",type[1]," ", round(w), "mm x ", round(d), "mm x ", t, "mm"));
color(sheet_colour(type))
linear_extrude(height = t, center = true)
hull() {

View File

@@ -8,9 +8,14 @@
// Springs
//
extruder_spring = [7, 1, 10, 5];
extruder_spring = [ 7, 1, 10, 5];
hob_spring = [12, 0.75, 10, 6];
function spring_od(type) = type[0];
function spring_gauge(type) = type[1];
function spring_length(type) = type[2];
function spring_coils(type) = type[3];
// taken from openscad example 20
module coil(r1 = 100, r2 = 10, h = 100, twists)
{
@@ -49,12 +54,14 @@ module coil(r1 = 100, r2 = 10, h = 100, twists)
}
module comp_spring(spring, l = 0) {
l = (l == 0) ? spring[2] : l;
module comp_spring(type, l = 0) {
l = (l == 0) ? spring_length(type) : l;
vitamin(str("SPR", spring[0], spring[1] * 100, spring[2], ": Spring ", spring[0], " x ", spring[1], " x ", spring[2] ));
vitamin(str("SPR", spring_od(type), spring_gauge(type) * 100, type[2],
": Spring ", spring_od(type), "mm OD x ", spring_gauge(type), "mm gauge x ", spring_length(type), "mm length" ));
color(spring_color) render() coil(r1 = (spring[0] - spring[1])/ 2, r2 = spring[1] / 2, h = l, twists = spring[3]);
color(spring_color) render()
coil(r1 = (spring_od(type) - spring_gauge(type)) / 2, r2 = spring_gauge(type) / 2, h = l, twists = spring_coils(type));
}

View File

@@ -29,7 +29,7 @@ module NEMA(motor) {
boss_height = motor[5];
shaft_rad = motor[6] / 2;
cap = 8;
vitamin(str("NEMA", round(motor[0] / 2.54), length * 10, ": NEMA", round(motor[0] / 2.54), " x ", length, " stepper motor"));
vitamin(str("NEMA", round(motor[0] / 2.54), length * 10, ": NEMA", round(motor[0] / 2.54), " x ", length, "mm stepper motor"));
union() {
color(stepper_body_color) render() // black laminations
translate([0,0, -length / 2])

View File

@@ -24,9 +24,9 @@ function washer_color(type) = washer_soft(type) ? soft_washer_color : hard_washe
module washer(type) {
if(washer_soft(type))
vitamin(str("WR", type[0] * 10, type[1], type[2] * 10, ": Rubber washer M",type[0], " x ", type[1], " x ", type[2]));
vitamin(str("WR", type[0] * 10, type[1], type[2] * 10, ": Rubber washer M",type[0], " x ", type[1], "mm x ", type[2], "mm"));
else
vitamin(str("WA", type[0] * 10, type[1], type[2] * 10, ": Washer M",type[0], " x ", type[1], " x ", type[2]));
vitamin(str("WA", type[0] * 10, type[1], type[2] * 10, ": Washer M",type[0], " x ", type[1], "mm x ", type[2], "mm"));
color(washer_color(type)) render() difference() {
cylinder(r = washer_diameter(type) / 2, h = washer_thickness(type));
cylinder(r = type[0] / 2, h = 2 * washer_thickness(type) + 1, center = true);
@@ -38,7 +38,7 @@ module star_washer(type) {
rad = washer_diameter(type) / 2;
inner = (hole + rad) / 2;
spoke = rad - hole;
vitamin(str("WS", type[0] * 10, type[1], type[2] * 10, ": Star washer M",type[0], " x ", type[1], " x ", type[2]));
vitamin(str("WS", type[0] * 10, type[1], type[2] * 10, ": Star washer M",type[0], " x ", type[1], "mm x ", type[2], "mm"));
color(star_washer_color) render() difference() {
cylinder(r = rad, h = washer_thickness(type));
cylinder(r = hole, h = 2 * washer_thickness(type) + 1, center = true);

View File

@@ -18,7 +18,7 @@ module ziptie(type, r)
{
latch = type[2];
length = ceil(2 * PI * r + type[4] + latch[2] + 1);
vitamin(str("ZT00", length, ": Ziptie ",length));
vitamin(str("ZT00", length, ": Ziptie ", length, "mm min length"));
angle = asin((latch[0] / 2) / r) - asin(ziptie_thickness(type) / latch[0]);
color(type[3]) render() union() {