setup screw mask for panel_clamp and used mask for rack case
This commit is contained in:
@@ -37,10 +37,44 @@ module panel_clamp(face, screw, style, dia_x, dia_y, height, mask) {
|
||||
roty = 0;
|
||||
rotz = face == "left" ? 90 : face == "right" ? 270 : 0;
|
||||
|
||||
if(enablemask == true && mstyle == "default") {
|
||||
if(enablemask == true) {
|
||||
rotate([rotx,roty,rotz]) {
|
||||
if(mstyle == "default") {
|
||||
cylinder(d=dia_y, h=height);
|
||||
}
|
||||
if(screw == "m2" && mstyle == "holes") {
|
||||
translate([(-dia_y-(nuts[2][0]+.5)/2)/2, 0, 2.25]) rotate([0,90,0])
|
||||
cylinder(d=nuts[0][0]+.5, h=dia_y+2);
|
||||
translate([-(dia_y/2), 0, 2.25]) rotate([0,90,0])
|
||||
cylinder(d=nuts[0][1]*2/sqrt(3), h=dia_y*.375, $fn=6);
|
||||
translate([nuts[0][0]+.5, 0, 2.25]) rotate([0,90,0])
|
||||
cylinder(d=nuts[0][1]+.5, h=dia_y*.375);
|
||||
}
|
||||
if(screw == "m2.5" && mstyle == "holes") {
|
||||
translate([(-dia_y-(nuts[2][0]+.5)/2)/2, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[1][0]+.5, h=dia_y+2);
|
||||
translate([-(dia_y/2), 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[1][1]*2/sqrt(3), h=dia_y*.375, $fn=6);
|
||||
translate([nuts[1][0]+.5, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[1][1]+.5, h=dia_y*.375);
|
||||
}
|
||||
if(screw == "m3" && mstyle == "holes") {
|
||||
translate([(-dia_y-(nuts[2][0]+.5)/2)/2, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[2][0]+.5, h=dia_y+2);
|
||||
translate([-(dia_y/2), 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[2][1]*2/sqrt(3), h=dia_y*.375, $fn=6);
|
||||
translate([nuts[2][0]+.5, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[2][1]+.5, h=dia_y*.375);
|
||||
}
|
||||
if(screw == "m4" && mstyle == "holes") {
|
||||
translate([(-dia_y-(nuts[2][0]+.5)/2)/2, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[3][0]+.5, h=dia_y+2);
|
||||
translate([-(dia_y/2), 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[3][1]*2/sqrt(3), h=dia_y*.375, $fn=6);
|
||||
translate([nuts[3][0]+.5, 0, 3]) rotate([0,90,0])
|
||||
cylinder(d=nuts[3][1]+.5, h=dia_y*.375);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(enablemask == false) {
|
||||
rotate([rotx,roty,rotz]) {
|
||||
|
||||
@@ -387,6 +387,24 @@ if(case_design == "rack" && side == "bottom") {
|
||||
vent(2,10,wallthick+4,2,1,9,"vertical");
|
||||
}
|
||||
}
|
||||
// case floor panel clamp holes
|
||||
translate([150-gap-wallthick,(depth/2)-gap-wallthick,floorthick-adj-.5])
|
||||
panel_clamp("bottom", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
if(rack_width == 19) {
|
||||
translate([300-gap-wallthick,(depth/2)-gap-wallthick,floorthick-adj-.5])
|
||||
panel_clamp("bottom", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
}
|
||||
// case upper panel clamp holes
|
||||
translate([150-gap-wallthick,-gap-adj,case_z-13])
|
||||
panel_clamp("rear", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
translate([150-gap-wallthick,depth-gap-(2*wallthick)+adj,
|
||||
case_z-13]) panel_clamp("front", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
if(rack_width == 19) {
|
||||
translate([300-gap-wallthick,-gap-adj,case_z-13])
|
||||
panel_clamp("rear", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
translate([300-gap-wallthick,depth-gap-(2*wallthick)+adj,
|
||||
case_z-13]) panel_clamp("front", "m2", "sloped", 6, 18, 5, [true,10,2,"holes"]);
|
||||
}
|
||||
}
|
||||
// pcb and multi-pcb standoffs
|
||||
for(r = [0:len(rack_bay_sbc)-1]) {
|
||||
|
||||
Reference in New Issue
Block a user