diff --git a/lib/panel_clamp.scad b/lib/panel_clamp.scad index 9519b30..50f6957 100644 --- a/lib/panel_clamp.scad +++ b/lib/panel_clamp.scad @@ -37,9 +37,43 @@ 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]) { - cylinder(d=dia_y, h=height); + 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) { diff --git a/mod/case_rack.scad b/mod/case_rack.scad index b8de776..b9ca38d 100644 --- a/mod/case_rack.scad +++ b/mod/case_rack.scad @@ -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]) {