mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 00:09:41 +00:00
propagate fix for negative helix angles
to function spur_gear and module ring_gear
This commit is contained in:
parent
a25f706800
commit
61cb5eaf56
1 changed files with 2 additions and 2 deletions
|
@ -932,7 +932,7 @@ function spur_gear(
|
||||||
: assert(false,"atype must be one of \"root\", \"tip\" or \"pitch\""),
|
: assert(false,"atype must be one of \"root\", \"tip\" or \"pitch\""),
|
||||||
circum = 2 * PI * pr,
|
circum = 2 * PI * pr,
|
||||||
twist = 360*thickness*tan(helical)/circum,
|
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(
|
rgn = spur_gear2d(
|
||||||
circ_pitch = circ_pitch,
|
circ_pitch = circ_pitch,
|
||||||
teeth = teeth,
|
teeth = teeth,
|
||||||
|
@ -1437,7 +1437,7 @@ module ring_gear(
|
||||||
: 2*ar - rr; // default case
|
: 2*ar - rr; // default case
|
||||||
circum = 2 * PI * pr;
|
circum = 2 * PI * pr;
|
||||||
twist = 360*thickness*tan(-helical)/circum;
|
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) {
|
attachable(anchor,spin,orient, h=thickness, r=atype=="outside"?or:pr) {
|
||||||
zrot(gear_spin)
|
zrot(gear_spin)
|
||||||
if (herringbone) {
|
if (herringbone) {
|
||||||
|
|
Loading…
Reference in a new issue