// allviews quebec // Chaise quebec // allviews lock // Use to lock the screw // viewopts lock solid // testviews test-quebec // printviews lock:x2,y2,w20,h20 include // Base circle ray1=55/2; height1=4; // Center post ray2_out=13.5; ray2_in=9.5; height2=24; // Post for side arms angle_height=22; angle_thick=8; include <../cadlib.h> module anglepost(){ difference(){ cube([ray1-5,angle_thick,angle_height]); union(){ translate([8,-1,14]) rotate([-90,0,0]) cylinder(r=2.5,h=angle_thick+2,$fn=20); translate([0,-1,angle_height]) rotate([-90,0,0]) quarter_concave(4,angle_thick+2,20,3); } } } module quebec(){ cylinder(r=ray1,h=height1,$fn=40); // Circle to hold the center post offset=(ray1-ray2_out)/2; translate([offset,offset,height1]){ difference(){ cylinder(r=ray2_out,h=height2,$fn=40); union(){ translate([0,0,-1]) cylinder(r=ray2_in,h=height2+2,$fn=40); translate([ray2_out,0,12]) rotate([0,-90,0]){ cylinder(r=2,h=10,$fn=20); cylinder(r1=4,r2=2,h=1,$fn=20); } } } cylinder(r=5,h=4,$fn=40); } translate([-ray1+2,0,height1]) anglepost(); translate([angle_thick,-ray1+2,height1]) rotate([0,0,90]) anglepost(); } module lock(){ difference(){ width=10; height=12; cube([width,width,height]); translate([width/2,width/2,2]) cylinder(r=2,h=height,$fn=20); } } module main_view(view){ if (view=="quebec"){ quebec(); }else if (view=="test-quebec"){ intersection(){ len=2*ray1+10; translate([-ray1+1,-ray1+1,0]) cube ([len,len,1.5]); translate([0,0,-height1+0.5]) quebec(); } }else if (view=="lock"){ lock(); } }