// allviews view1 view2 include len=35; height=10; thick=4; module view1(){ difference(){ cube([len,thick,height]); union(){ h_2 = height/2; translate([5,-1,h_2]) rotate([-90,0,0]){ cylinder(r=2,h=6,$fn=20); cylinder(r1=4,r2=2,h=2,$fn=20); } translate([len-5,-1,h_2]) rotate([-90,0,0]){ cylinder(r=2,h=6,$fn=20); cylinder(r1=4,r2=2,h=2,$fn=20); } } } translate([len/2,-thick,0]) difference(){ union(){ cylinder(r=7,h=6,$fn=40); translate([-7,0,0]) cube([14,6,6]); } translate([0,0,-1]) cylinder(r=4,h=8,$fn=40); } } module view2(){ } module main_view(view){ if (view=="view1"){ view1(); }else if (view=="view2"){ intersection(){ translate([-1,-len,0]) cube([len+2,len+len,0.5]); view1(); } } }