// Electrical box Bottom $fa = 1; $fs = 0.4; $wide = 116; $deep = 146; $high = 45; $wall = 4.9; // the top is 5.0 so just make the fit easier $base = 4; $bolt_high = 4; $bolt_pos = 25; $plinth = 0.2; // 5 when designing // PSU module size $psuW=36.6; $psuL=68.6; // W is X dimension, D is Y dimension // PSU module front left $psuX = $wall; $psuY = $deep-$wall-15-$psuL; $psuZ = $base; // SSR module size $ssrW = 45; $ssrL = 62.5; // SSR module front left $ssrX = 65; $ssrY = $deep-$wall-10-$ssrL; $ssrZ = $base; // relay module size $frrW = 40; $frrL = 60; // relay module front left $frrX = 71; $frrY = $wall+2; $frrZ = $base; // speed control module size $scmW = 60; $scmL = 30; // speed control module front left $scmX = $wall+1; $scmY = $wall+2; $scmZ = $base; difference(){ union(){ cube([$wide, $deep, $base]); translate([0, 0, $base]) cube([$wide, $wall, $high]); translate([0, $deep-$wall, $base]) cube([$wide, $wall, $high]); translate([0, 0, $base]) cube([$wall, $deep, $high]); translate([$wide-$wall, 0, $base]) cube([$wall, $deep, $high]); // PSU platform translate([$psuX, $psuY, $psuZ]){ cube([$psuW, $psuL, $plinth]); cube([7,7,2]); translate([$psuW-7, 0, 0]) cube([7,7,2]); translate([0, $psuL-7, 0]) cube([7,7,2]); translate([$psuW-7, $psuL-7, 0]) cube([7,7,2]); } // SSR platform translate([$ssrX, $ssrY, $ssrZ]) cube([$ssrW, $ssrL, $plinth]); // F/R relay platform translate([$frrX, $frrY, $frrZ]){ cube([$frrW, $frrL, $plinth]); cube([6,6,5]); translate([$frrW-6, 0, 0]) cube([6,6,5]); translate([$frrW-6, $frrL-6, 0]) cube([6,6,5]); translate([3.62-3, 44.4-3, -0.01]) // not in corner cube([6,6,5]); } // speed control module platform translate([$scmX, $scmY, $scmZ]){ cube([$scmW, $scmL, $plinth]); cube([6,6,3]); translate([0, $scmL-6, 0]) cube([6,6,3]); translate([$scmW-4, 0, 0]) cube([4,$scmL,3]); } } // panel for the text translate([50,-0.01,11]) cube([50, 1, 15]); // 4 bolt holes translate([$bolt_pos, -0.1, $high+$base-$bolt_high]) rotate([-90,0,0]){ cylinder(d=6,h=3); cylinder(d=3,h=$wall+0.2); } translate([$wide-$bolt_pos, -0.1, $high+$base-$bolt_high]) rotate([-90,0,0]){ cylinder(d=6,h=3); cylinder(d=3,h=$wall+0.2); } translate([$bolt_pos, $deep+0.1, $high+$base-$bolt_high]) rotate([90,0,0]){ cylinder(d=6,h=3); cylinder(d=3,h=$wall+0.2); } translate([$wide-$bolt_pos, $deep+0.1, $high+$base-$bolt_high]) rotate([90,0,0]){ cylinder(d=6,h=3); cylinder(d=3,h=$wall+0.2); } // LED holes translate([20, -0.01, $base+$high/2+7]) // LED rotate([-90,0,0]) cylinder(d=8,h=$wall+0.02); translate([20, -0.01, $base+$high/2-7]) // LED rotate([-90,0,0]) cylinder(d=8,h=$wall+0.02); // cable inlet translate([55, $deep-$wall-0.01, 30]) rotate([-90,0,0]) cylinder(d=16, h=$wall+0.02); // PSU platform translate([$psuX, $psuY, 0]){ translate([2.6, 2.6, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.3); } translate([$psuW-2.6, 2.6, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.3); } translate([2.6, $psuL-2.6, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.3); } translate([$psuW-2.6, $psuL-2.6, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.3); } } // SSR platform translate([$ssrX, $ssrY, 0]){ translate([$ssrW/2, 7.8, -0.01]){ cylinder(d=4, h=10); cylinder(d=8, h=2.4); } translate([$ssrW/2, $ssrL-6.8, -0.01]){ cylinder(d=4, h=10); cylinder(d=8, h=2.4); } } // F/R relay platform translate([$frrX, $frrY, 0]){ translate([2.4, 2.4, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.4); } translate([3.62, 44.4, -0.01]){ // not in corner cylinder(d=3, h=10); cylinder(d=6, h=2.4); } translate([$frrW-2.4, 2.4, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.4); } translate([$frrW-2.4, $frrL-2.4, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.4); } } // speed control module platform translate([$scmX, $scmY, 0]){ translate([2.4, 2.4, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.4); } translate([2.4, $scmL-2.4, -0.01]){ cylinder(d=3, h=10); cylinder(d=6, h=2.4); } } } translate([53, 2, 15]) rotate([90, 0, 0]) linear_extrude(2) text("NigSoft", 10, font = "Liberation Sans");