use ; use ; holeSize = 4.2; nutAcrossCorners = 8.2; // Max dimension from standard is 8.1 mm difference() { union() { Ty(-35) Tz(-56+0.282) Rx(180) import("20v_Base_V2.stl"); // Fill in clip holes color("red") copy_mirror([0,1,0]) Tz(-9) Ty(29) Tx(-22.5) cube([23,6,18], center=true); color("blue") copy_mirror([0,1,0]) Tz(-1) Ty(29) Tx(-22.4) cube([23.2,8.2,2], center=true); // Fill-in the hex holes so they can be re-cut smaller color("grey") Tz(-4) Tx(-0.835) Ty(22.978) cylinder(d=12, h=3, $fn=6); Tz(-4) Tx(-0.835) Ty(-22.67) cylinder(d=12, h=3, $fn=6); Tz(-4) Tx(-37.5) Ty(22.63) cylinder(d=12, h=3, $fn=6); Tz(-4) Tx(-37.5) Ty(-22.67) cylinder(d=12, h=3, $fn=6); } //Chop off front difference() { cube(200, center=true); Tx(-150) cube(300, center=true); Tx(-25) cylinder(d=90, h=300, $fn=200, center=true); } copy_mirror([0,1,0]) Ty(130.5) cube(200, center=true); // Bore out the holes to clearance M4 color("purple") Tz(-10) Tx(-0.835) Ty(22.978) cylinder(d=holeSize, h=100, $fn=20); color("purple") Tz(-10) Tx(-0.835) Ty(-22.67) cylinder(d=holeSize, h=100, $fn=20); color("purple") Tz(-10) Tx(-37.5) Ty(22.63) cylinder(d=holeSize, h=100, $fn=20); color("purple") Tz(-10) Tx(-37.5) Ty(-22.67) cylinder(d=holeSize, h=100, $fn=20); // Re-cut the hexagons to the right size for M4 nuts color("Violet") Tz(-12) Tx(-0.835) Ty(22.978) cylinder(d=nutAcrossCorners, h=10, $fn=6); color("Violet") Tz(-12) Tx(-0.835) Ty(-22.67) cylinder(d=nutAcrossCorners, h=10, $fn=6); color("Violet") Tz(-12) Tx(-37.5) Ty(22.63) cylinder(d=nutAcrossCorners, h=10, $fn=6); color("Violet") Tz(-12) Tx(-37.5) Ty(-22.67) cylinder(d=nutAcrossCorners, h=10, $fn=6); // Test only! //Ty(100+22.978) // Section through test screw hole. //cube(200, center=true); } /* // Test pieces to locate screw holes color("purple") Tx(-0.835) Ty(22.978) cylinder(d=3.9, h=100, $fn=20); color("purple") Tx(-0.835) Ty(-22.67) cylinder(d=3.9, h=100, $fn=20); color("purple") Tx(-37.5) Ty(22.63) cylinder(d=3.9, h=100, $fn=20); color("purple") Tx(-37.5) Ty(-22.67) cylinder(d=3.9, h=100, $fn=20); */ // Screw length check // 4mm of screw needed in this section! * color("green") Tx(-0.835) Ty(22.978) Rx(180) cylinder(d=3.9, h=4, $fn=20);