Part of #84. Depends on #85 (reuses its math port).
Goal
Build the same gear the OCCT-idiomatic way and compare head-to-head with Route A: revolve a
cone-frustum blank, loft one tooth-space cutter, then pattern-cut it N times.
Time-box: half a day.
Question this spike answers
Does circularPatternCut survive 20+ near-tangential boolean cuts against a cone?
This is the historical failure point for B-Rep gear generation, and the single biggest unknown
in the whole epic.
Approach
- Blank. Revolve the axial profile of the gear body (outer cone, root cone, face width)
into a frustum.
- Tooth-space cutter. Loft the gap profile across the same
slices+1 stations used in
Route A, extended radially far enough to clear the blank at both ends.
- Pattern cut. One call:
blank.circularPatternCut(tool: toothSpace,
axisPoint: .zero,
axisDirection: SIMD3(0, 0, 1),
count: teeth)
circularPatternCut is confirmed present in OCCTSwift 1.3.1 and later (OCCTSwift#169) and is
already used in this repo by recipes/03-pipe-flange/.
Why this route is worth the risk
A proper B-Rep with roughly 10x fewer faces than Route A: filletable, chamferable, and it
exports a clean STEP. That is the difference between a demo and something a downstream consumer
(OCCTStudio, OCCTMCP) can actually build on.
Acceptance criteria
Failure is still a result
If the booleans prove unreliable, that is a legitimate and cheap finding. It tells us BOSL2
ports in this repo must stay loft-only, and it retires the idea of a filletable parametric gear
until an upstream OCCT fix. Record the specific failure mode (which tooth index, what
analyze() reports). That is what an upstream OCCTSwift issue would need.
Part of #84. Depends on #85 (reuses its math port).
Goal
Build the same gear the OCCT-idiomatic way and compare head-to-head with Route A: revolve a
cone-frustum blank, loft one tooth-space cutter, then pattern-cut it N times.
Time-box: half a day.
Question this spike answers
This is the historical failure point for B-Rep gear generation, and the single biggest unknown
in the whole epic.
Approach
into a frustum.
slices+1stations used inRoute A, extended radially far enough to clear the blank at both ends.
circularPatternCutis confirmed present in OCCTSwift 1.3.1 and later (OCCTSwift#169) and isalready used in this repo by
recipes/03-pipe-flange/.Why this route is worth the risk
A proper B-Rep with roughly 10x fewer faces than Route A: filletable, chamferable, and it
exports a clean STEP. That is the difference between a demo and something a downstream consumer
(OCCTStudio, OCCTMCP) can actually build on.
Acceptance criteria
isValid == trueShape.analyze()snapshot recorded (small edges, free edges, self-intersections). A cutthat "succeeds" but leaves slivers is a failure for our purposes
Failure is still a result
If the booleans prove unreliable, that is a legitimate and cheap finding. It tells us BOSL2
ports in this repo must stay loft-only, and it retires the idea of a filletable parametric gear
until an upstream OCCT fix. Record the specific failure mode (which tooth index, what
analyze()reports). That is what an upstream OCCTSwift issue would need.