// allviews hold-left hold-right hold-wire // testviews base test_hold include include <../cadlib.h> height1=140; height2=160; reduce=8; width=55; ray=15; thick=4; module base(thick,is_left){ len=63; translate([0,width/2,0]) rotate([90,0,90]) difference(){ triangle_isocel(width,len,thick); union(){ translate([-5,len-6,0]) cube([10,10,thick]); translate([0,len-10,0]){ cylinder(r=2.5,h=thick,$fn=20); translate([0,0,0.5]) cylinder(r=3.5,h=thick-0.5,$fn=20); } translate([10,10,0]) cube([20,30,thick]); translate([-10-20,10,0]) cube([20,30,thick]); } } } module holder(is_left){ under=-15; path=[[0,width],[under,width/2+4],[0,width/2+4],[0,width/2-4],[under,width/2-4], [0,0],[height1,reduce],[height2,reduce],[height2,width-reduce], [height1,width-reduce], [0,width],[0,0]]; path2=[[0,0],[0,width/2-10],[height1-10,width/2-17],[height1-10,0],[0,0]]; difference(){ union(){ linear_extrude(thick){polygon(path);} translate([height1+ray,width/2,0]) 3darc(ray+5,5,thick,270,360+90,40); } union(){ translate([height1+ray,width/2,0]) rotate([0,0,90]) cylinder(r=ray,h=thick); translate([6,width/2+5,0]) linear_extrude(thick) polygon(path2); translate([6,width/2-5,0]){ linear_extrude(thick) mirror([0,1,0]) polygon(path2); } } } translate([0,width/2+3/2,thick]) rotate([90,0,0]) triangle_rectangle(height1,25,3); base(thick,is_left); translate([-9,width/2,thick]){ translate([-3,4,0]) cube([3,5,is_left ? thick : thick+8]); translate([-3,-4-5,0]) cube([3,5,is_left ? thick+8: thick]); } } if (view=="hold-left"){ holder(true); }else if (view=="hold-right"){ holder(false); }else if (view=="hold-wire"){ // Simple clip to keep the extruder wires in place on the top of the frame difference(){ width=8; len=40+50+10; thick=2; inside=8.5; union(){ translate([-10,0,0]) cube([len,thick,width]); translate([-10,inside+2,0]) cube([len,thick,width]); in2=inside/2+thick; ray=(inside+2*thick)/2; translate([20,in2,0]) 3darc(ray,thick,width,90,270,20); translate([9,in2,0]) 3darc(ray,thick,width,270,270+180,20); } union(){ translate([22,0,width/2]) rotate([-90,0,0]) cylinder(r=1.8,h=inside+2*thick,$fn=20); translate([87,0,width/2]) rotate([-90,0,0]) cylinder(r=1.8,h=inside+2*thick,$fn=20); translate([0,9,-4]) rotate([20,0,0]) cylinder(r=inside/2+1,h=width*2,$fn=20); } } }else if (view=="base"){ rotate([0,-90,0]) base(0.3,true); }else if (view=="test_hold"){ intersection(){ // -15 translate([-3,0,0]){ cube([3.5,width,58]); cube([6,width,thick]); } holder(true); } }