mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
fix for extreme profile shifts
This commit is contained in:
parent
6a20c8c34a
commit
a24593041c
1 changed files with 13 additions and 8 deletions
21
gears.scad
21
gears.scad
|
@ -211,7 +211,7 @@ function _inherit_gear_thickness(thickness) =
|
||||||
// be automatically incorporated. (Consider the situation where one gear mates with multiple other gears.) With modest
|
// be automatically incorporated. (Consider the situation where one gear mates with multiple other gears.) With modest
|
||||||
// profile shifts, you can probably ignore this adjustment, but with more extreme profile shifts, it may be important.
|
// profile shifts, you can probably ignore this adjustment, but with more extreme profile shifts, it may be important.
|
||||||
// You can compute the shortening parameter using {{gear_shorten()}}. Note that the actual shortening distance is obtained
|
// You can compute the shortening parameter using {{gear_shorten()}}. Note that the actual shortening distance is obtained
|
||||||
// by scaling the shortening fator by the gear's module.
|
// by scaling the shortening factor by the gear's module.
|
||||||
// Figure(2D,Big,NoAxes,VPT=[55.8861,-4.31463,8.09832],VPR=[0,0,0],VPD=325.228): With large profile shifts the teeth need to be shortened or they don't have clearance in the valleys of the teeth in the meshing gear.
|
// Figure(2D,Big,NoAxes,VPT=[55.8861,-4.31463,8.09832],VPR=[0,0,0],VPD=325.228): With large profile shifts the teeth need to be shortened or they don't have clearance in the valleys of the teeth in the meshing gear.
|
||||||
// teeth1=25;
|
// teeth1=25;
|
||||||
// teeth2=19;
|
// teeth2=19;
|
||||||
|
@ -1692,7 +1692,7 @@ function rack2d(
|
||||||
tthick = trans_pitch/PI * (PI/2 + 2*profile_shift * tan(PA)) - backlash,
|
tthick = trans_pitch/PI * (PI/2 + 2*profile_shift * tan(PA)) - backlash,
|
||||||
l = teeth * trans_pitch,
|
l = teeth * trans_pitch,
|
||||||
ax = ang_adj_to_opp(trans_pa, adendum),
|
ax = ang_adj_to_opp(trans_pa, adendum),
|
||||||
dx = ang_adj_to_opp(trans_pa, dedendum),
|
dx = dedendum*tan(trans_pa),
|
||||||
poff = tthick/2 - backlash,
|
poff = tthick/2 - backlash,
|
||||||
tooth = [
|
tooth = [
|
||||||
[-trans_pitch/2, -dedendum],
|
[-trans_pitch/2, -dedendum],
|
||||||
|
@ -2365,7 +2365,7 @@ function worm_gear(
|
||||||
assert(is_finite(gear_spin))
|
assert(is_finite(gear_spin))
|
||||||
let(
|
let(
|
||||||
helical = asin(worm_starts * circ_pitch / PI / worm_diam),
|
helical = asin(worm_starts * circ_pitch / PI / worm_diam),
|
||||||
pr = pitch_radius(circ_pitch, teeth, helical),
|
pr = pitch_radius(circ_pitch, teeth,helical),
|
||||||
hob_rad = worm_diam / 2 + crowning,
|
hob_rad = worm_diam / 2 + crowning,
|
||||||
thickness = worm_gear_thickness(circ_pitch=circ_pitch, teeth=teeth, worm_diam=worm_diam, worm_arc=worm_arc, crowning=crowning, clearance=clearance),
|
thickness = worm_gear_thickness(circ_pitch=circ_pitch, teeth=teeth, worm_diam=worm_diam, worm_arc=worm_arc, crowning=crowning, clearance=clearance),
|
||||||
tooth_profile = _gear_tooth_profile(
|
tooth_profile = _gear_tooth_profile(
|
||||||
|
@ -2662,9 +2662,11 @@ function _gear_tooth_profile(
|
||||||
? [last(line1), isect_pt, line2[0]]
|
? [last(line1), isect_pt, line2[0]]
|
||||||
: [line2[0], isect_pt, line1[0]],
|
: [line2[0], isect_pt, line1[0]],
|
||||||
rounded_tooth_half = deduplicate([
|
rounded_tooth_half = deduplicate([
|
||||||
if (!internal) each arc(n=8, r=round_r, corner=rcorner),
|
if (!internal && round_r>0) each arc(n=8, r=round_r, corner=rcorner),
|
||||||
|
if (!internal && round_r<=0) isect_pt,
|
||||||
each tooth_half_raw,
|
each tooth_half_raw,
|
||||||
if (internal) each arc(n=8, r=round_r, corner=rcorner),
|
if (internal && round_r>0) each arc(n=8, r=round_r, corner=rcorner),
|
||||||
|
if (internal && round_r<=0) isect,
|
||||||
]),
|
]),
|
||||||
|
|
||||||
// Strip "jaggies" if found.
|
// Strip "jaggies" if found.
|
||||||
|
@ -3163,7 +3165,10 @@ function worm_gear_thickness(circ_pitch, teeth, worm_diam, worm_arc=60, crowning
|
||||||
// distance between the rack's pitch line and the gear's center. If you set internal1 or internal2 to true then the
|
// distance between the rack's pitch line and the gear's center. If you set internal1 or internal2 to true then the
|
||||||
// specified gear is a ring gear; the returned distance is still the distance between the centers of the gears. Note that
|
// specified gear is a ring gear; the returned distance is still the distance between the centers of the gears. Note that
|
||||||
// for a regular gear and ring gear to be compatible the ring gear must have more teeth and at least as much profile shift
|
// for a regular gear and ring gear to be compatible the ring gear must have more teeth and at least as much profile shift
|
||||||
// as the regular gear.
|
// as the regular gear.
|
||||||
|
// .
|
||||||
|
// The backlash parameter computes the distance offset that produces a total backlash of `2*backlash` in the
|
||||||
|
// two gear mesh system. This is equivalent to giving the same backlash argument to both gears.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// teeth1 = Total number of teeth in the first gear. If given 0, we assume this is a rack or worm.
|
// teeth1 = Total number of teeth in the first gear. If given 0, we assume this is a rack or worm.
|
||||||
// teeth2 = Total number of teeth in the second gear. If given 0, we assume this is a rack or worm.
|
// teeth2 = Total number of teeth in the second gear. If given 0, we assume this is a rack or worm.
|
||||||
|
@ -3177,7 +3182,7 @@ function worm_gear_thickness(circ_pitch, teeth, worm_diam, worm_arc=60, crowning
|
||||||
// internal1 = first gear is an internal (ring) gear. Default: false
|
// internal1 = first gear is an internal (ring) gear. Default: false
|
||||||
// internal2 = second gear is an internal (ring) gear. Default: false
|
// internal2 = second gear is an internal (ring) gear. Default: false
|
||||||
// pressure_angle = The pressure angle of the gear.
|
// pressure_angle = The pressure angle of the gear.
|
||||||
// backlash = Add extra space to produce the specified backlash
|
// backlash = Add extra space to produce a total of 2*backlash between the two gears.
|
||||||
// Example(2D,NoAxes): Spur gears (with automatic profile shifting on both)
|
// Example(2D,NoAxes): Spur gears (with automatic profile shifting on both)
|
||||||
// circ_pitch=5; teeth1=7; teeth2=24;
|
// circ_pitch=5; teeth1=7; teeth2=24;
|
||||||
// d = gear_dist(circ_pitch=circ_pitch, teeth1, teeth2);
|
// d = gear_dist(circ_pitch=circ_pitch, teeth1, teeth2);
|
||||||
|
@ -3248,7 +3253,7 @@ function gear_dist(
|
||||||
pa_eff = _working_pressure_angle(teeth1,profile_shift1,teeth2,profile_shift2,pressure_angle,helical),
|
pa_eff = _working_pressure_angle(teeth1,profile_shift1,teeth2,profile_shift2,pressure_angle,helical),
|
||||||
pa_transv = atan(tan(pressure_angle)/cos(helical))
|
pa_transv = atan(tan(pressure_angle)/cos(helical))
|
||||||
)
|
)
|
||||||
mod*(teeth1+teeth2)*cos(pa_transv)/cos(pa_eff)/cos(helical)/2 + backlash*cos(helical)/2/tan(pressure_angle);
|
mod*(teeth1+teeth2)*cos(pa_transv)/cos(pa_eff)/cos(helical)/2 + backlash*cos(helical)/tan(pressure_angle);
|
||||||
|
|
||||||
function _invol(a) = tan(a) - a*PI/180;
|
function _invol(a) = tan(a) - a*PI/180;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue