// Poulie pour la perceuse a colonne // Poulie corde a linge // allviews small large cordelinge // testviews testhole testbelt // viewopts testbelt brim5mm // viewopts small brim10mm // viewopts large brim10mm include w1=13; w2=9; h1=15-2; h2=5; shaftr=(13.9+0.5+0.2)/2; shaftoff=1.5; small_r=45/2; // 50 large_r=82/2; width=w1+6*2; // Pour corde a linge corde_r=18; corde_w=16; holer=3.5; //shape=[[0,-w2/2],[0,w2/2],[h1,w1/2],[h1,-w1/2],[0,-w2/2]]; shape=[[0,0],[h2,w2/2],[h1,w1/2],[h1,-w1/2],[h2,-w2/2],[0,0]]; module poulie(ray,w1_5,shaft){ difference(){ ; cylinder(r=ray,h=w1_5,$fn=80); union(){ translate([0,0,w1_5/2]) rotate_extrude($fn=80) translate([ray-h1,0,0]) polygon(shape); if (shaft){ difference(){ cylinder(r=shaftr,h=w1*2,$fn=40); translate([-w1,shaftr-shaftoff,-1]) cube([w1*2,w1*2,w1_5+2]); } }else{ cylinder(r=holer,h=w1*2,$fn=40); } } } } cordeshape=[[0,0],[h2,w2/2],[h1,w1/2],[h1,-w1/2],[h2,-w2/2],[0,0]]; module cordepoulie(ray,w1_5){ difference(){ cylinder(r=ray,h=w1_5,$fn=80); union(){ translate([0,0,w1_5/2]) rotate_extrude($fn=80) translate([ray-h1/2,0,0]) polygon(cordeshape); cylinder(r=holer,h=w1*2,$fn=40); } } } module main_view(view){ if (view=="small"){ translate([0,0,small_r]) rotate([-90,0,0]) poulie(small_r,width,true); }else if (view=="testhole"){ intersection(){ poulie(small_r,width,true); s1=shaftr*2+5; translate([-s1/2,-s1/2,0]) cube([s1,s1,2]); } }else if (view=="testbelt"){ intersection(){ translate([0,0,small_r]) rotate([90,0,0]) poulie(small_r,width,true); //s1=shaftr*2+5; s1=w1+4; translate([-s1,-s1-4,0]) cube([s1*2,s1,h1+4]); } }else if (view=="large"){ poulie(large_r,width,true); }else if (view=="cordelinge"){ cordepoulie(corde_r,corde_w); } }