module st_lever(){ pl= [ [2,0,-2],[92,0,-1],[92,0,1],[2,0,2], [2,-1,-2],[92,-1,-1],[92,-1,1],[2,-1,2]]; fl=[ [0,1,2,3], // bottom [4,5,1,0], // front [7,6,5,4], // top [5,6,2,1], // right [6,7,3,2], // back [7,4,0,3]]; // left polyhedron(pl,fl); } translate ([0,10,0])st_lever(); // for comparison //to bend, move point to origin and bend then move back //first bend point is at x=2 , 5 deg fwrd // second at 48.5, back 5 deg //third at 60, bck 30 (until 1.5 from x axis - trial and error // then 70 bends down in x plane, at say15deg module left(x,y,z){ intersection(){ translate ([-1000,-500,-500]) cube(1000); translate([x,y,z])st_lever(); } } module right(x,y,z){ intersection(){ translate ([0,-500,-500]) cube(1000); translate([x,y,z]) st_lever(); } } module bend(x=0,y=0,z=0,ax=0,ay=0,az=0){ translate ([x,y,z]){ left(-x,-y,-z); rotate([ax,ay,az]) right(-x,-y,-z); } } y1=(48.5-2)*sin(5); echo(y1); // 4.05274 actual 3.625 from drawing so could use distances not angles y2=y1+.25; y3=1.5; module bender(x1=0,y1=0,z1=0,x2=0,y2=0,z2=0,ax=0,ay=0,az=0,px=0,py=0,pz=0){ difference(){ translate([px,py,pz])bend(x1,y1,z1,ax,ay,az); translate([500+x2,0,0])cube(1000,true); translate([500+x1-1000,0,0])cube(1000,true); } } bender(x1=2,x2=48.5,py=0,az=-5); bender(x1=48.5,x2=59.5,py=-y1,az=0); bender(x1=59,x2=64,py=-y2,az=30); bender(x1=64,x2=75,py=-1.5,az=0); bender(x1=74,x2=100,py=-1.5,ay=15); // maybe could chop off the ends perpendicular to the centre line, somehow, // and bisect the angle // currently limited to length less than 1000 in substantially // to x axis // need to change left and right if wanting other directions // could probably avoid using angle, could calculate fromx2,y2,z2 // need to check what happening at x=60 and angle (been fudged)