Skip to content

Spike 2: bevel gear Route B (revolved blank + circularPatternCut) #86

Description

@gsdali

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

  1. Blank. Revolve the axial profile of the gear body (outer cone, root cone, face width)
    into a frustum.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:spikeInvestigation / research, not a fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions