diff --git a/transmission.scad b/transmission.scad index c972ab3..c305be1 100644 --- a/transmission.scad +++ b/transmission.scad @@ -1,44 +1,67 @@ +epsilon = 0.01; +$fn=100; -module transmission(hauteur, diametre0, diametre1, diametre2){ +module tube(h, de, di){ + translate([0,0,h/2-epsilon]) difference(){ - cylinder(h=hauteur, r=diametre0/2); - translate([0,0,-1]){ - difference (){ - cylinder(h=hauteur-12.35+1, r=diametre0/2+1); - cylinder(h=hauteur-12.35+1, r=diametre1/2); - }; - difference (){ - cylinder(h=hauteur-18.85+1, r=diametre1/2+1); - cylinder(h=hauteur-18.85+1, r=diametre2/2); - }; - cylinder(h=13+1, r=2); - }; - translate([0,0,hauteur+1-18]){ - cylinder(h=18, r=5.6/2); - }; - translate([0,0,17.1/2+1+hauteur-17.1]) - { - cube([9.6,3.1,17.1+1],center=true); - cube([3.1,9.6,17.1+1],center=true); - } + cylinder(h, d = de, center = true); + cylinder(h+epsilon, d = di, center = true); } } -$fn=100; +module transmission(h, d0, d1, d2, h1, h2, p1, p2, d3, d4,l1, l2){ + difference (){ + cylinder(h, d=d0); + tube (h - h1, de = d0 + epsilon, di = d1); + tube(h - h2, de = d1 + epsilon, di = d2); + translate([0,0, h - p1 + epsilon]) cylinder(h= p1, d = d4); + translate([0,0,-epsilon]) cylinder(h = h - h2, d=d3); + translate([0,0,h-p2/2]){ + minkowski(){ + sphere(d=1); + cube([l1,l2,p2+epsilon], center=true); + } + minkowski(){ + sphere(d=1); + cube([l2,l1,p2+epsilon], center=true); + } + } + }; + + translate([0,0,115]) + mirror([0,0,1]) + difference(){ + translate([0,0,82.5-p2]){ + translate([0,0,p2/2]){ + cube([l1,l2,p2], center=true); + cube([l2,l1,p2], center=true); + } + cylinder(p2, d=d4); + } + translate([0,0,96]) + difference(){ + cylinder(50, d=50,center=true); + translate([0,0,-40]) + minkowski(){ + cylinder(50, d1=50, d2=0, center=true); + sphere(d=3); + } + } + + } +} transmission( - hauteur=31.65, - diametre0=14, - diametre1=13, - diametre2=10.5 - ); - -/* base (hauteur=31, diam=34, */ -/* diam2 = 20.8, diam3 = 22.5, */ -/* decoupe = 16.9, hcube = 10, */ -/* halesage=4, dalesage=8, */ -/* dvis = 4, largeurcroix = 0.7 */ -/* ); */ - -// translate([diam,0,0]) -//cylinder(h,diam); + h=31.65, + d0=14, + d1=12.5, + d2=10.5, + h1 = 12.35, + h2 = 18.85, + p1 = 18, + p2 = 17.1, + d3 = 4, + d4 = 5.5, + l1 = 10, + l2 = 3 +);