A profile is an envelope
Assumes The cam that cannot be cut.
The cam field on this site builds a profile the way a cam is actually made. A motion programme gives the follower’s displacement at every cam angle; adding it to a base radius gives the pitch curve, which is where the roller’s centre travels; and the surface that has to be cut is the pitch curve offset inward along its own normal by the roller radius.
That last step is a construction. It says where the surface is and says nothing about what shape it is, and the shape is the interesting part, because the shape is what decides whether the cam can be made at all.
An envelope, and the conjugate law again
The cut profile is the envelope of the family of roller circles as the roller’s centre runs round the pitch curve — the curve that touches every one of them. That is a different description from “the offset”, and it is the one that connects to the rest of the site.
An envelope’s curvature at a contact point is tied to the curvature of the curve the generating circle’s centre travels on, by a relation that is the conjugate law of the curvature field with one of the two centres sent to infinity. In this case the relation is as simple as it gets, because the roller’s radius is constant:
The centre of curvature of the cut profile and the centre of curvature of the pitch curve are the same point, and the two radii differ by the roller radius. That is Euler and Savary’s relation with the same for both curves — a degenerate case of it, and a useful one.
Measuring the drawn curve
The site’s habit is to check a law against something drawn rather than against the expression that produced the drawing. So the check reads the polyline the cam library emits — the array of points that becomes the SVG — and computes its curvature at a point by circumcircle through three consecutive points.
At six cam angles on a cycloidal rise-dwell-return-dwell programme with base radius 30 and roller radius 8:
| cam angle | pitch curve radius | cut profile radius | pitch − roller |
|---|---|---|---|
| 40° | 52.616 | 44.616 | 44.616 |
| 95° | 29.522 | 21.522 | 21.522 |
| 150° | 42.000 | 34.000 | 34.000 |
| 205° | 29.593 | 21.593 | 21.593 |
| 260° | 58.322 | 50.322 | 50.322 |
| 315° | 30.000 | 22.000 | 22.000 |
Worst relative departure over the six: , which is the circumcircle fit’s own precision at that sampling rather than anything about the law.
What that measurement found
The table above is what the check reports now. What it reported first was this:
| cam angle | pitch curve radius | cut profile radius | pitch − roller |
|---|---|---|---|
| 40° | 52.616 | 60.616 | 44.616 |
| 95° | 29.522 | 37.522 | 21.522 |
rather than . The offset was going the wrong way.
The pitch curve is traversed anticlockwise, so its forward tangent rotated by is the outward normal, and adding the roller radius along it put the cut profile outside the path of the roller’s own centre. Every cam this site has drawn since its foundation phase was eight units too large in radius everywhere, with the roller drawn buried in the metal it is supposed to be riding on.
The comment above the code said “inward offset by the roller radius” the entire time.
Why nothing caught it
The cam library has more checks than most of this site’s libraries, and none of them could see it. Going through them:
undercutMargin computes the smallest radius of curvature the pitch curve reaches and compares it against the roller radius. Reads the pitch curve. Never looks at the offset.
smallestBase bisects on the base radius using that margin. Reads the pitch curve.
The curvature check fits circles to the pitch curve and compares them against a closed-form radius of curvature, at two sampling rates, plus a deliberately wrong base radius that it requires to fail. Reads the pitch curve, twice, carefully.
The pressure angle is about the angle between the follower’s direction of travel and the surface normal, which is computed from the programme rather than from the drawn profile.
Every gate the fleet runs asks whether a label fits, whether a curve is inside the viewBox, whether an assertion passed. None of them asks whether a drawn curve is the curve it is supposed to be.
So: every check the cam library had was about the curve the roller’s centre travels on, and the bug was in the only curve that gets manufactured. The pitch curve is the one every formula in the field is about; the cut profile is the one a cutter follows. The library was thoroughly checked on the first and unchecked on the second.
What found it
The finding came from outside the cam field. The curvature field had just acquired the habit of asking a drawn curve what its curvature was, for a completely different reason — to check that its own exact curvatures matched the polylines the solver traced — and applying the same question to a cam profile took about ten lines.
That is the shape this site’s defects keep having. The geneva driven-fraction error was a wrong number sitting in a library that nothing read, and it survived the foundation, the expansion and 137 of the site’s own checks. The ticks() bug in the shared drawing kit returned an empty array for a descending domain, so two figures in the fleet had no tick labels at all, and every gate asked whether a label fit and none asked whether it existed.
The common structure: a quantity that is computed, drawn, and never asked a question. A check on the thing next to the bug is not a check on the bug, and the way these get found is that some other field arrives with a different question.
The fix, and the refusal that comes with it
The sign is corrected. Alongside it the offset direction is now an argument, and it exists for exactly one purpose: so the gate can feed the old value back in and require the check to fail.
That arrangement is this site’s standard response to a wrong number that nothing read. When geneva’s driven fraction was corrected, the shipped expression was fed back into the check and required to be refused; when the solver’s Jacobian signs were corrected, the old signs were kept in a function whose only caller is the check that must reject them. A correction without a refusal leaves the same trap armed for whoever next edits the line.
Fed the old sign, the offset-law check reports a relative departure of and fails. Fed the corrected one it reports and passes.
Undercutting is a curvature condition, and now it looks like one
The practical payoff of having the law rather than the construction is that undercutting becomes a statement about a number.
Where on a convex stretch, the subtraction gives a negative radius for the cut profile — the offset curve has turned itself inside out. Physically the cutter removes metal the profile needs; the cam gets a cusp or a small loop, and no amount of care in manufacture recovers it.
That is a hard limit rather than a design guideline, and it is the reason the cam field’s base-circle essay has two constraints in it rather than one. The pressure angle is a comfort criterion — a large one makes the follower jam in its guide, and where the threshold sits is a judgement. The curvature criterion is not a judgement: below it the part cannot be made.
The site’s measurement there is that for an ordinary roller the pressure angle always binds first, and it takes a large roller for the curvature limit to decide anything. With a roller two thirds of the base circle, a cam at a perfectly comfortable 21° of pressure angle cannot be cut at all.
Why an envelope, rather than an offset
The two descriptions are equivalent for a roller follower and they stop being equivalent as soon as the follower is anything else, which is the reason the envelope reading is the one worth having.
A flat-faced follower has no roller radius. Its cam profile is the envelope of a family of straight lines — the follower’s face at each cam angle — and there is no offset construction available at all. The profile is still the curve that touches every member of the family, and its curvature is still tied to the family’s parameterisation by the same kind of relation.
A curved-faced follower, or a knife-edge one, or a follower whose motion is a rotation rather than a translation: each gives a different family and each gives an envelope. The offset construction is the special case where every member of the family is a circle of the same radius.
The site draws the roller case because it is the common one, and the general statement is what connects the cam field to the gear field, where a tooth flank is the envelope of a rack cutter’s straight edge, and to the curvature field, where a conjugate profile is an envelope under a rigid motion.
The undercut condition read three ways
The condition is one inequality with three readings, and each of them is how a different part of the site would state it.
As an offset: the offset of a convex curve inward by more than its radius of curvature turns the curve inside out. This is the construction reading and it is what the drawing shows.
As an envelope: the family of roller circles fails to have a well-defined envelope where the circles are larger than the curvature of the locus of their centres — successive circles enclose one another rather than crossing, and there is no curve touching all of them. This is the reading that generalises to other followers.
As a conjugate pair: the cut profile’s centre of curvature and the pitch curve’s are the same point, and the radius passes through zero and changes sign. A curve whose radius of curvature changes sign through zero rather than through infinity has a cusp there. This is the reading that connects to the cusp essay.
All three describe the same failure and each makes a different consequence obvious. That is a reasonable test of whether a relation has been understood rather than memorised.
Why a defect that large stayed invisible
A sign error in an offset does not produce a small discrepancy. It moves the cut profile to the wrong side of the pitch curve, so the profile is out by twice the roller radius everywhere — a substantial fraction of a cam whose radii run from the base circle to the base circle plus the rise. That is not a subtle number, and it is worth asking how a subtle number would have been easier to catch than an obvious one.
The answer is that nothing ever drew the two curves together. The figures showed a pitch curve, or a cut profile, or a follower on a cam — and each of those is a perfectly good picture in which a doubled offset looks like a slightly different cam. What was never drawn is the pair: the pitch curve, the cut profile, and a roller circle sitting between them touching both. In that picture the error is not subtle at all; the roller is on the wrong side and the eye settles it before any arithmetic.
So the defect’s size is exactly what made it survive. A small error would have been sought, because a small error is what a check looks for; a large one changed the whole shape of the curve, and a whole curve of the wrong shape is indistinguishable from a curve of a different cam unless something is beside it for comparison.
That gives a rule with more force than check the sign, and it is one this site can act on. A derived curve should be drawn with the object it was derived from, in the same figure, at the same scale, with the generating element shown. A profile offset from a pitch curve gets a roller drawn tangent to both. An envelope gets a member of its own family. A centrode gets the two bodies it rolls between. In each case the relation the construction asserts becomes visible, and a picture in which the relation is visible is a check that runs every time anybody looks at it.
The complementary rule is about what was checked instead. Every existing gate measured the pitch curve, and the pitch curve was right — so a great deal of correct verification accumulated around a quantity that was never in doubt, while the derived quantity beside it went unmeasured for six months. Verification concentrates where the machinery is convenient, and the machinery was convenient on the pitch curve because that is where the closed forms are.
The general form of both is that the cut profile had two properties nothing exploited: it is the thing that gets manufactured, and it is one construction away from something already checked. Either would have been enough to mark it as worth a test. Together they make it the most obvious candidate in the library, in hindsight, which is the ordinary experience of finding a defect of this kind.
Which is why the refusal now shipped alongside the fix matters more than the fix. The sign is a one-character change and could be made again in the other direction by anybody tidying the code; a check that fails at a relative departure of when fed the old sign is what makes the correction permanent rather than current.
The measurement’s own precision
The circumcircle fit through three consecutive polyline points is not an unconditionally good way of measuring curvature, and the site has a recorded finding that it can get worse with finer sampling: as the three points crowd together the fit becomes ill-conditioned and conditioning beats truncation.
Here the profile is sampled at 3,600 points round a cam of radius 30 to 42, so consecutive points are about units apart on a curve whose radius of curvature is tens of units. That is well inside the regime where truncation dominates and the fit is stable, and the measured departures — at the dwells, where the curve is an exact circle, and where it is not — are consistent with that.
The dwells are the useful diagnostic. During a dwell the pitch curve is a circular arc of radius and the cut profile is one of radius , both exactly, so the fit is being asked to recover a known answer. It returns and . Anywhere the measurement disagreed with the law by more than that on a stretch where the answer is known, the fit rather than the law would be the suspect.
The cusp, which is the same object as elsewhere in the site
A cam profile with exactly has a cusp: an infinitely sharp corner, reached but not passed.
That is the same object the curvature field’s cusp essay is about, arriving from a different direction. There a cusp is where a tracing point is momentarily still; here it is where an offset curve’s radius reaches zero. Both are places where a curve’s parameterisation breaks down while the curve is still there, and both mark a boundary between two smooth behaviours — a tight turn on one side and a small loop on the other.
The design consequence is the same too. A cusp is non-generic: it happens at one exact value of a parameter, and a built cam’s dimensions are ranges rather than numbers. So a cam designed exactly at the limit is manufactured either just inside it, where it works, or just outside, where it has a loop the cutter cannot follow, and which side is decided by the tolerances.
The other envelope this site draws
There is a second envelope in the site and the same law governs it: an involute gear tooth’s flank is the envelope of a rack cutter’s straight edge, and the undercutting of a gear tooth is the same phenomenon as the undercutting of a cam — the generating curve reaching into a region the generated one needs.
The gear field states its version as a tooth count: below seventeen teeth at a 20° pressure angle a standard tooth undercuts, and the threshold is . That is the curvature condition with the geometry substituted in, and the site’s profile-shift essay is about the fix, which is to move the cutter out until the condition is satisfied.
Three fields, then, with the same law: a cam’s offset, a gear’s generation, and a coupler point’s osculating circle. The unifying statement is the conjugate relation, and it is worth having explicitly rather than three times in three vocabularies.
What this makes readable
Essays that name this one as a prerequisite.
- A follower needs a face Prescribed motion
About the same objects
Not linked from either essay — found by the objects both name.
- The frame seen from the coupler conjugate point · euler savary · path curvature
- The two numbers are the curves' own euler savary · osculating circle · path curvature
- A cam is a conjugate pair cam profile · envelope
- A construction with no arithmetic in it conjugate point · euler savary
- A curvature is a size with a minus sign euler savary · path curvature
- How long a pivot stands in for a linkage osculating circle · path curvature
What links here
The 8 of 13 essays linking to this one that name the most of the same objects.
- Two flanks, one law Teeth
- A flat face asks for a convex cam Prescribed motion
- A flat face on an arm is worse Prescribed motion
- A follower needs a face Prescribed motion
- The circle a point stays on longest The motion, not the mechanism
- A roller in a groove changes walls with the speed Prescribed motion
- An arm is an offset that grows with the lift Prescribed motion
- An offset trades the rise for the return Prescribed motion
The objects this essay names
Each one links to every other essay that touches it.
Cam profileConjugate pointEnvelopeEuler savaryOsculating circlePath curvatureRoller followerUndercut