// Z-sensor bracket // use the rounding library // ass https://learn.cadhub.xyz/docs/round-anything/api-reference include $fa = 1; $fs = 0.4; p0 = [0,0]; f1 = 4; // height above metal //a1 would be 0 x1 = 0; y1 = f1; p1 = [x1,y1]; f2 = 15; // length of first side a2 = 90; // angle to Y axis x2 = x1 + f2*sin(a2); y2 = y1+f2*cos(a2); p2 = [x2,y2]; f3 = 10; a3 = 35; x3 = x2 + f3*sin(a3); y3 = y2 + f3*cos(a3); p3 = [x3,y3]; f4 = 20; a4 = 88; x4 = x3 + f4*sin(a4); y4 = y3 + f4*cos(a4); p4 = [x4,y4]; p5 = [x4,0]; radiiPoints = [ // list of the vertices but with added radius [0,0,0], [x1, y1, 0], [x2, y2, 0], [x3, y3, 5], // need a round-out here [x4, y4, 0], [x4, 0, 0], [0, 0, 0] ]; difference(){ union(){ translate([0,8,0]) linear_extrude(8+8) polygon(polyRound(radiiPoints, 30)); translate([0,0,14]) cube([40.9,8,2]); translate([0,0,8]) cube([40.9,2,8]); translate([0,0,8]) cube([2,8,8]); } translate([9, 8-0.01, 4]){ rotate([270,0,0]){ cylinder(d=1.7, h=5); // M2 tap is 1.6mm } } translate([9+9.5, 8-0.01, 4]){ // 9.5mm between centers rotate([270,0,0]){ cylinder(d=1.7, h=5); } } translate([34, 8-0.01, 4]){ rotate([270,0,0]){ cylinder(d=4.0, h=20); } } }