include ; module holder(l=20, $fs=0.25) difference() { circle(d=6.25); offset(0.25) offset(-0.25) difference() { rotate([0,0,45]) union() { square([2,50],center=true); square([50,2],center=true); } circle(d=5); } } module holder2(h=20, w=2) difference() { rotate_extrude() { square([(6.25+(w*2))/2,h]); translate([0,h]) intersection() { circle(r=(6.25+(2*w))/2); square(20*[1,1]); } } // if(hollow) translate([0,0,2]) linear_extrude(h, convexity=3) holder(); } module pie(A) scale(100) polygon([ [0,0], [1,0], [sin(90-A),-cos(90-A)] ]); module arc2d(r=50, d=5, a0=0, a1=45, c1=true, c2=true) { module pie(r, a1=0, a2=90, msteps=12) { function a(n)=90-(a1+((a2-a1)*(n/msteps))); polygon(concat([[0,0]], [ for(n=[0:msteps]) r*[sin(a(n)),cos(a(n))] ])); } union() { intersection() { projection() rotate_extrude() translate([r,0,0]) circle(d=d); pie(r+d, a0, a1); } if(c1) rotate([0,0,a0]) translate([r,0]) circle(d=d); if(c2) rotate([0,0,a1]) translate([r,0]) circle(d=d); } } module oblique(A=0, nib=28, flick=-10,corr=10) { module ob() translate(-(10+nib)*[0,1,0]) rotate([-90,0,A]) rotate([flick,0]) children(); // module hollow(AA) { // rotate([0,90,AA]) translate(-R*[0,0,1]) linear_extrude(25, convexity=3, center=true) holder(); // } difference() { ob() { translate([0,0,nib]) holder2(); //cylinder(d=1, h=nib); rotate([90,0]) skew_zy(flick) { linear_extrude(2,center=true) arc2d(10+nib,8,90,90-A,0,0); linear_extrude(4,center=true) arc2d(10+nib,2,90,90-A,0,0); } } ob() rotate([0,0,corr]) linear_extrude(20+nib) holder(); } } $fs=1; $fa=1; // Model from https://www.thingiverse.com/thing:2226446 // with much modification for a stable STL translate([0,127]) translate([34.5,0,-2.5]) rotate([1.3,0,0]) scale(100) import("portapluma_oblicua_anatomica_rev4.stl"); oblique(-45, 28, 10, -10);