// allviews view1 view2 // viewsopts fill80 // printviews view1:x2,y3,h20 include include <../cadlib.h> len1=15+9; len2=8; width=10; thick=4; hole1=1.5; hole2=4; module holer(ray1,ray2){ translate([0,-1,0]) rotate ([-90,0,0]) cylinder(r=ray1,h=thick*2,$fn=20); translate([0,thick-1.9,0]) rotate ([-90,0,0]) cylinder(r1=ray1,r2=ray2,h=3.5 ,$fn=40); } module view1(){ difference(){ union(){ cube([len1,thick,width]); translate ([len1-2,thick,0]) cube([len2,thick,width]); quarter_cylinder(thick,width,20,2); translate([len1-thick+2,thick,0]) quarter_cylinder(thick,width,20,2); translate([len1+len2-2.01,thick,0]) quarter_cylinder(thick,width,20,1); } union(){ translate ([thick,0,width/2]) holer (hole1,hole2); } } } module view2(){ } module main_view(view){ if (view=="view1"){ view1(); }else if (view=="view2"){ view2(); } }