Skip to content

Commit

Permalink
Merge pull request #1532 from xloem/gears
Browse files Browse the repository at this point in the history
propagate fix for negative helix angles
  • Loading branch information
adrianVmariano authored Dec 24, 2024
2 parents a25f706 + 61cb5ea commit 9375201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gears.scad
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ function spur_gear(
: assert(false,"atype must be one of \"root\", \"tip\" or \"pitch\""),
circum = 2 * PI * pr,
twist = 360*thickness*tan(helical)/circum,
slices = default(slices, ceil(twist/360*segs(pr)+1)),
slices = default(slices, ceil(abs(twist)/360*segs(pr)+1)),
rgn = spur_gear2d(
circ_pitch = circ_pitch,
teeth = teeth,
Expand Down Expand Up @@ -1437,7 +1437,7 @@ module ring_gear(
: 2*ar - rr; // default case
circum = 2 * PI * pr;
twist = 360*thickness*tan(-helical)/circum;
slices = default(slices, ceil(twist/360*segs(pr)+1));
slices = default(slices, ceil(abs(twist)/360*segs(pr)+1));
attachable(anchor,spin,orient, h=thickness, r=atype=="outside"?or:pr) {
zrot(gear_spin)
if (herringbone) {
Expand Down

0 comments on commit 9375201

Please sign in to comment.