The Curves
I have worked out parametric equations for the curves of involute gear profiles using the seven gear parameters given in the "Background" section below. However, currently the fillet roulette curves are actually three different curves that apply in different scenarios based on the gear parameters:
When $P < 0$,
$$ x(γ) = \left(P + \frac{Z}{2}\right) × \cos(γ - Q) + γ × \frac{Z}{2} × \sin(γ - Q)\\ + F × \frac{P × \cos(γ - Q) + γ × \frac{Z}{2} × \sin(γ - Q)}{\sqrt{P^2 + \left(γ × \frac{Z}{2}\right)^2}}, $$ $$ y(γ) = \left(P + \frac{Z}{2}\right) × \sin(γ - Q) - γ × \frac{Z}{2} × \cos(γ - Q)\\ + F × \frac{P × \sin(γ - Q) - γ × \frac{Z}{2} × \cos(γ - Q)}{\sqrt{P^2 + \left(γ × \frac{Z}{2}\right)^2}}, $$ $$ \frac{2}{Z} × P × \cot(α) ≤ γ ≤ 0 $$
When $P ≟ 0$,
$$ x(γ) = \frac{Z}{2} × \cos(-Q) - F × \cos(γ - Q), $$ $$ y(γ) = \frac{Z}{2} × \sin(-Q) - F × \sin(γ - Q), $$ $$ α - \frac{π}{2} ≤ γ ≤ 0 $$
And when $P > 0$,
$$ x(γ) = \left(P + \frac{Z}{2}\right) × \cos(-γ - Q) - γ × \frac{Z}{2} × \sin(-γ - Q)\\ - F × \frac{P × \cos(-γ - Q) - γ × \frac{Z}{2} × \sin(-γ - Q)}{\sqrt{P^2 + \left(γ × \frac{Z}{2}\right)^2}}, $$ $$ y(γ) = \left(P + \frac{Z}{2}\right) × \sin(-γ - Q) + γ × \frac{Z}{2} × \cos(-γ - Q)\\ - F × \frac{P × \sin(-γ - Q) + γ × \frac{Z}{2} × \cos(-γ - Q)}{\sqrt{P^2 + \left(γ × \frac{Z}{2}\right)^2}}, $$ $$ -\frac{2}{Z} × P × \cot(α) ≤ γ ≤ 0 $$
Where:
- $P := X - C + F$ and
- $Q := \frac{2}{Z} × \left(F × \sec(α) - P × \tan(α) + N × \frac{π}{2}\right)$
Can these curves be re-written or re-parameterized so that a single set of $(x, y)$ equations covers all three cases?
For example, I've found two different paramterizations of the involute curves:
$$x(θ) = m × \frac{Z}{2} × \cos(α) × \left(\cos\left(θ - \tan(α) + α - N × \frac{π}{Z}\right) + θ × \sin\left(θ - \tan(α) + α - N × \frac{π}{Z}\right)\right),$$ $$y(θ) = m × \frac{Z}{2} × \cos(α) × \left(\sin\left(θ - \tan(α) + α - N × \frac{π}{Z}\right) - θ × \cos\left(θ - \tan(α) + α - N × \frac{π}{Z}\right)\right),$$ $$\frac{2}{Z} × \csc(α) × \left(\frac{F}{\tan(α) + \sec(α)} + \sec(α) × (X - C)\right) + \tan(α) ≤ θ ≤ \sec(α) × \sqrt{(1 + \frac{2}{Z} × (X + 1))^2 - \cos(α)^2}$$
and
$$x(θ) = m × \frac{Z}{2} × \cos(α) × \left(\cos(α + θ) + \sin(α + θ) × \left(\tan(α) + θ + N × \frac{π}{Z}\right)\right),$$ $$y(θ) = m × \frac{Z}{2} × \cos(α) × \left(\sin(α + θ) - \cos(α + θ) × \left(\tan(α) + θ + N × \frac{π}{Z}\right)\right),$$ $$\frac{4}{Z} × \csc(2 × α) × (X - C - F × \sin(α) + F - \sin(2 × α) × N × \frac{π}{4}) ≤ θ ≤ \sqrt{\left(\sec(α) × \left(\frac{2}{Z} × (X + 1) + 1\right)\right)^2 - 1} - \tan(α) - N × \frac{π}{Z}$$
Both sets of equations produce the same involute curve. That suggests to me that it might be possible to re-parameterize the fillet equations to make them equivalent, but I can't figure out how to go about doing that. Is such a thing actually possible?
Background
I am working on parametrically defining the shape of an involute gear, which consists of many identical copies of four curves:
- two different circular arcs (the tips and roots of the teeth, orange in the picture below),
- an involute of a circle (the faces of the teeth, purple), and
- a roulette (joins the involute curve to the root arc as a fillet, blue).
All of the above curves are developed as the envelope of a cutting tool called a hob that is rotated and translated relative to the gear (in real-life practice the gear blank is typically rotated while the hob profile is translated, but mathematically it seemed simpler to keep the gear entirely stationary by working within its rotating reference frame). The shape of the hob consists of straight line segments for the tooth faces, tips, and roots, and circular arcs for the tip fillets (which become the root fillets on the gear).
There are four parameters that define the shape of a hob:
- Module $m$, a uniform scale factor that gives the height of the teeth on a generated gear;
- Pitch Angle $α$ (a.k.a. Pressure Angle), the angle of force transfer between meshed gear teeth and the angle of the hob's main cutting faces relative to the normal;
- Clearance Factor $C$, a multiple of the module that extends the tip of the hob's cutting teeth to cut deeper roots than mathematically-necessary on generated gears, reducing friction and allowing mechanical clearance space for coolant/lubricant; and
- Fillet Radius $F$, a multiple of the module that rounds off the corners of the clearance-height on the cutting teeth to give a smoother transition between a generated gear's tooth faces and roots, increasing the strength of the teeth.
When cutting a gear with a hob, there are two additional parameters to consider:
- Profile Shift $X$, a multiple of the module that indicates moving the hob closer to or farther from a generated gear's central axis when cutting, which allows for adjusting the distance between the centers of meshed gears and/or reducing undercutting; and
- Number of Teeth $Z$ (hopefully self-explanatory).
Finally, the parameter $N$ is an integer that simply rotates the equations around the gear body to produce each distinct tooth.
Undercutting occurs when the various parameters of a gear are such that the roulette fillet curve on a gear's teeth cuts off part of the involute face curve. Because only the involute curves transfer force between gears, loosing a part of the involute reduces the overall strength of the gear. Small amounts of undercutting are often tolerated, but large amounts are generally to be avoided.
I developed the fillet curves by finding the path traced by the centerpoint of the circular arcs on the hob as the hob-rotation parameter $β$ varied, finding the normal line of that path at the centerpoint, and finding the intersection of that normal line with the circle of radius $m F$ centered on the centerpoint.
For $P < 0$, the path makes a little self-intersecting smooth loop, and the fillet curve uses the positive square root:
For $P > 0$, the path goes around a smooth (if very tight) rounded corner with no self-intersections, and the fillet curve uses the negative square root:
But for the in-between case, when $P ≟ 0$, the curve has a singularity where it instantaneously changes direction, and the fillet curve is a perfect circular arc:






$$\newcommand{\cis}{\operatorname{cis}}$$
Using these substitutions ...
$$Z_2 := Z/2 \qquad M := \gamma Z_2 \qquad N := \sqrt{P^2+M^2}$$ $$\theta := \operatorname{atan2}(M,P) \quad\to\quad P = N\cos\theta \qquad M = N\sin\theta$$ $$\cis x := (\cos x, \sin x)$$
... the triad of equations for $(x,y)$ become ...
$$\begin{align} P < 0: \quad & Z_2\cis(-Q+\gamma) \;+\; F \cis(-Q+\gamma-\theta) \;+\; N \cis(-Q+\gamma-\theta) \\ P = 0: \quad & Z_2 \cis(-Q\phantom{0\gamma}\;\;) \;-\; F \cis(-Q+\gamma \phantom{+\theta}\;\;) \\ P > 0: \quad & Z_2\cis(-Q-\gamma) \;-\; F \cis(-Q-\gamma+\theta) \;+\; N \cis(-Q-\gamma+\theta) \end{align} \tag0$$
(I'm ignoring the domain restrictions, which OP's answer handles well enough.)
Defining $\sigma := \operatorname{sgn}(P)$, the $Z_2$ and $N$ terms of these expressions fairly clearly unify as
$$Z_2 \cis(-Q-\sigma\gamma) \;+\; N \sigma^2 \cis(-Q-\sigma(\gamma-\theta)) \tag1$$
Unfortunately, the signs in the $F$ terms don't correlate as nicely with the sign of $P$. Perhaps the best we might do —as OP has done— is to combine the terms as-is, folding the cases together using coefficients that evaluate to either $1$ or $0$:
$$-F \; (\; \underbrace{\sigma \cis(-Q - \sigma (\gamma - \theta))}_{\text{ignored when $P=\sigma=0$}} \;+\; \underbrace{(1 - \sigma^2) \cis(-Q + \gamma)}_{\text{ignored when $P\neq0, \; \sigma=\pm1$}}\;) \tag2$$
So, combining $(1)$ and $(2)$ unifies the equations. This is effectively OP's result, streamlined a bit with $N$, $\theta$, and the "$\cis$" shorthand.
As an alternative to $(2)$, suppose we define $$\sigma_+ = \begin{cases}\phantom{-}1, & P \geq 0 \\ -1, &P<0 \end{cases} \qquad \sigma_- = \begin{cases}\phantom{-}1, & P > 0 \\ -1, &P\leq0\end{cases}$$ (Think of the subscript as assigning that sign to zero.) With these, the $F$ terms have this common form:
$$- F\sigma_+ \cis(-Q-\sigma_-\gamma+\sigma\theta) \tag3$$
In fact, since the $N$ term of $(1)$ vanishes for $\sigma=0$, and $\sigma_-=\sigma$ when $\sigma\neq0$, the argument of the $F$ term can be used for the $N$ term. So, we can write the combined equations as
$$Z_2 \cis(-Q-\sigma\gamma) \;+\; (N \sigma^2 - F\sigma_+) \cis(-Q-\sigma_-\gamma+\sigma\theta) \tag4$$
Even so, the use of $\sigma_\pm$ may be trying a bit too hard to fold all of the cases together. But, then again, $(2)$ is also rather artificial. Only in $(1)$ does the sign trichotomy integrate somewhat naturally with the expressions.