//-- Node4-y1 L=dxf_dim(file = "node4-plate.dxf",name="L"); module node4(W,l) { xd = dxf_dim(file = "node4-plate.dxf", name = "xd"); yd = dxf_dim(file = "node4-plate.dxf",name= "yd"); module drill() { rotate(a=90, v=[1,0,0]) translate(v=[xd,yd,0]) cylinder(h=90, r=3, center=true); rotate(a=90, v=[1,0,0]) translate(v=[-xd,yd,0]) cylinder(h=90, r=3, center=true); rotate(a=90, v=[1,0,0]) translate(v=[-xd,-yd,0]) cylinder(h=90, r=3, center=true); rotate(a=90, v=[1,0,0]) translate(v=[xd,-yd,0]) cylinder(h=90, r=3, center=true); } module interior() { rotate(a=90, v=[1,0,0]) linear_extrude(file="node4-plate.dxf", layer="interior", height=L+2*W+10, center=true); } module bevel_edge() { translate([L/2+W, L/2+W, 0]) rotate(a=-45, v=[0,0,1]) cube(size=[l+10, l, L+10],center=true); } difference() { //-- Initial hexahedron cube(size=[L+2*W,L+2*W,L], center=true); //-- substract the inside cube(size=[L,L,L+10], center=true); //-- Create the interior of the y axis sides interior(); //-- Create the interior of the x axis sides rotate(a=90, v=[0,0,1]) interior(); //-- Drills on the y-axis side drill(); //-- Driss on the x-axis side rotate(a=90,v=[0,0,1]) drill(); //-- Remove the edges bevel_edge(); rotate(a=90,v=[0,0,1]) bevel_edge(); rotate(a=180,v=[0,0,1]) bevel_edge(); rotate(a=-90,v=[0,0,1]) bevel_edge(); } } //-- Locate the piece on the z=0 plane translate([0,0,L/2]) node4(4,4);