documentation work and other cleanup and fixes
This commit is contained in:
57
mod/sub.scad
57
mod/sub.scad
@@ -48,6 +48,18 @@ module sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask) {
|
||||
msetback = mask[2];
|
||||
mstyle = mask[3];
|
||||
|
||||
if(type == "art") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) art(data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "fan_mask") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) fan_mask(size_x, size_z, data[0]);
|
||||
}
|
||||
if(type == "hd_holes") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[1],data[2],data[3],data[4]);
|
||||
}
|
||||
if(type == "knockout") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) knockout(size_x,size_y,data[0],size_z,data[1],data[2]);
|
||||
}
|
||||
if(type == "rectangle") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slab_r([size_x,size_y,size_z],data[0]);
|
||||
}
|
||||
@@ -57,55 +69,16 @@ module sub(type, loc_x, loc_y, loc_z, face, rotation, size, data, mask) {
|
||||
if(type == "slot") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) slot(size_x,size_y,size_z);
|
||||
}
|
||||
if(type == "sphere") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) sphere(d=size_x);
|
||||
}
|
||||
if(type == "text") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) linear_extrude(height = size_z) text(data_2, size=data[0]);
|
||||
}
|
||||
if(type == "art") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) art(data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "button") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) buttons(data[0],[size_x,size_y,size_z],data[1],data[2],mask);
|
||||
}
|
||||
if(type == "hd_holes") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[2],"none","none",data[1]);
|
||||
}
|
||||
if(type == "hd_vertleft_holes") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[2],"vertical","left",data[1]);
|
||||
}
|
||||
if(type == "hd_vertright_holes") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hd_bottom_holes(data[0],data[2],"vertical","right",data[1]);
|
||||
}
|
||||
if(type == "hk_fan_top") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_fan_top();
|
||||
}
|
||||
if(type == "knockout") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) knockout(size_x,size_y,data[0],size_z,data[1],data[2]);
|
||||
}
|
||||
if(type == "fan") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) fan_mask(size_x, size_z, data[0]);
|
||||
}
|
||||
if(type == "vent") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent(size_x,size_y,size_z,data[3],data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "vent_hex") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) vent_hex(size_x,size_y,size_z,data[0],data[1],data[2]);
|
||||
}
|
||||
if(type == "microusb") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) microusb_open();
|
||||
}
|
||||
if(type == "sphere") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) sphere(d=size_x);
|
||||
}
|
||||
if(type == "keyhole") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) keyhole(data[0], true);
|
||||
}
|
||||
if(type == "h3_port_extender") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) h3_port_extender(data[0], true);
|
||||
}
|
||||
if(type == "hk_pwr_button") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) hk_pwr_button(mask);
|
||||
}
|
||||
if(type == "dsub") {
|
||||
translate([loc_x,loc_y,loc_z]) rotate(rotation) dsub(data[0], true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user