Fixed teeth_to_hide.

This commit is contained in:
Revar Desmera 2019-02-07 21:41:16 -08:00
parent 086ccfc753
commit 2a13b55c80

View file

@ -117,8 +117,8 @@ module gear2d(
bevelang = 0.0
) {
r = root_radius(mm_per_tooth, number_of_teeth, clearance);
ang = 360/number_of_teeth/2;
union() {
circle(r=r-0.5, $fn=number_of_teeth);
for (i = [0:number_of_teeth-teeth_to_hide-1] ) {
rotate(i*360/number_of_teeth) {
translate([0,r,0]) {
@ -131,6 +131,11 @@ module gear2d(
bevelang = bevelang
);
}
polygon([
[-r*sin(ang), r*cos(ang)],
[0,0],
[r*sin(ang), r*cos(ang)]
]);
}
}
}
@ -294,7 +299,7 @@ translate([ 0, 0, 0]) rotate([0,0, $t*360/n1]) color([1.00,0.
translate([ 0, d12, 0]) rotate([0,0,-($t+n2/2-0*n1+1/2)*360/n2]) color([0.75,1.00,0.75]) gear(mm_per_tooth,n2,thickness,hole);
translate([ d13, 0, 0]) rotate([0,0,-($t-n3/4+n1/4+1/2)*360/n3]) color([0.75,0.75,1.00]) gear(mm_per_tooth,n3,thickness,hole);
translate([ d13, 0, 0]) rotate([0,0,-($t-n3/4+n1/4+1/2)*360/n3]) color([0.75,0.75,1.00]) gear(mm_per_tooth,n3,thickness,hole);
translate([-d14, 0, 0]) rotate([0,0,-($t-n4/4-n1/4+1/2-floor(n4/4)-3)*360/n4]) color([1.00,0.75,0.50]) gear(mm_per_tooth,n4,thickness,hole);
translate([-d14, 0, 0]) rotate([0,0,-($t-n4/4-n1/4+1/2-floor(n4/4)-3)*360/n4]) color([1.00,0.75,0.50]) gear(mm_per_tooth,n4,thickness,hole,teeth_to_hide=n4-3);
translate([(-floor(n5/2)-floor(n1/2)+$t+n1/2-1/2)*9, -d1+0.0, 0]) rotate([0,0,0]) color([0.75,0.75,0.75]) rack(mm_per_tooth,n5,thickness,height);
*/