// Attaches pour support arrière de vélo // allviews attache // printviews attache:x2,w70 // viewopts attache solid // testviews testsize include ray=8.5; thick=5; height=20; tonglen=15; module attache(){ difference(){ off=-ray-thick-tonglen; len=2*ray+2*thick+2*tonglen; union(){ cylinder(r=ray+thick,h=height,$fn=40); translate([off,-thick,0]) cube([len,2*thick,height]); } union(){ translate([0,0,-1]) cylinder(r=ray,h=height+2,$fn=40); translate([off-1,-2,-1]) cube([len+2,ray+thick+4,height+2]); offhole=ray+tonglen/2+4; hole=2.5; translate([offhole,-thick-1,height/2]) rotate([-90,0,0]) cylinder(r=hole,h=2*thick+2,$fn=20); translate([-offhole,-thick-1,height/2]) rotate([-90,0,0]) cylinder(r=hole,h=2*thick+2,$fn=20); } } } module view2(){ } module main_view(view){ if (view=="attache"){ attache(); }else if (view=="testsize"){ intersection(){ off=ray+thick+1; w=2*ray+2*thick+2; translate([-off,-off,0]) cube([w+tonglen,w,1]); attache(); } } }