include //-- Y1 module. Part F //-- Parameters: // w: thickness. Typicall: 3 // M: Drills diameter. Typicall: 3 module part_F_dxf(w=3,M=3) { xd1 = dxf_dim(file = "part-F.dxf", name = "xd1"); yd1 = dxf_dim(file = "part-F.dxf", name= "yd1"); xd2 = dxf_dim(file = "part-F.dxf", name = "xd2"); yd2 = dxf_dim(file = "part-F.dxf", name= "yd2"); xd3 = dxf_dim(file = "part-F.dxf", name = "xd3"); yd3 = dxf_dim(file = "part-F.dxf", name= "yd3"); xd4 = dxf_dim(file = "part-F.dxf", name = "xd4"); yd4 = dxf_dim(file = "part-F.dxf", name= "yd4"); difference() { linear_extrude(file="part-F.dxf", layer="exterior", height=w, center=true); translate ([-xd1,yd1,0]) cylinder(h=w+10, r=M/2, center=true, $fn=16); translate ([-xd2,yd2,0]) cylinder(h=w+10, r=M/2, center=true, $fn=16); translate ([xd3,-yd3,0]) cylinder(h=w+10, r=M/2, center=true, $fn=16); translate ([xd4,-yd4,0]) cylinder(h=w+10, r=M/2, center=true, $fn=16); } } module test_part_F_dxf() { //-- Part thickness: W=3; //-- Locate the part on the z=0 plane translate ([0,0,W/2]) part_F_dxf(W,3); } //-- Y1 module parameters y1_height = 52; y1_width=52; F_wy = y1_height; F_wx = y1_height; F_wz = 3; servo_wy = 19.6; servo_wx = 40.3; drills_dx = 48.5; drills_dy = 9.6; d1 = [drills_dx/2, -drills_dy/2,0]; d2 = [drills_dx/2, drills_dy/2,0]; d3 = [-drills_dx/2, drills_dy/2.0]; d4 = [-drills_dx/2, -drills_dy/2.0]; difference() { color (green) cube([F_wx,F_wy,F_wz],center=true); color(blue) rotate([0,0,-45]) union() { cube([servo_wx, servo_wy, 30], center=true); translate(d1) cylinder(r=3/2, h=20, $fn=20,center=true); translate(d2) cylinder(r=3/2, h=20, $fn=20, center=true); translate(d3) cylinder(r=3/2, h=20, $fn=20, center=true); translate(d4) cylinder(r=3/2, h=20, $fn=20, center=true); } color(red) translate([2*(servo_wy-0.5)*cos(45), (servo_wy-0.5)*sin(45),0]) rotate([0,0,-45]) cube([servo_wx*2, 2*servo_wy,20],center=true); } //-- the old one //test_part_F_dxf();