Skip to content

solidcore: variable-round skin refinement re-solves spans already within tolerance #15482

Open

Description

@brett19

#15257 holds a variable round's skin to its balls between stations. Its refinement loop re-solves every span's middle section in every round, including spans whose skin was already measured within tolerance in the round before. On the variable-round test that refines most, this more than doubles the time.

Where (solidcore/crates/solidcore/src/blend/fillet_intersector.rs, #15257's branch):

  • flush_curve, lines 1982-2011: each round rebuilds the skin (build_flush_geometry), calls skin_splits on all stations, merges the splits into the stations, re-equalises and loops again (at most SKIN_ROUNDS = 6 rounds, at most 64 times the stations).
  • skin_splits, line 2154: solve_mid_point (a Newton solve of the section, upstream step 5a) runs for every span on every round. The rest of the measurement is cheap by comparison: a projection onto the skin, then 9 evaluations against the section's envelope cone.

A span's middle section depends only on its two stations. Stations that stay put keep the same section, but it is solved again each round. Only the skin changes between rounds: the global C2 interpolation moves it everywhere when a station is added, so every span does still need re-measuring.

Timing (pinned to P-cores, one test at a time, #15257 against its base #15411):

  • fillet_variable_radius_closes_onto_vertex::taper_closing_to_a_point_rounds_the_wedge: 4.35 s -> 11.31 s (2.6x). The radius runs to zero, so the skin refines most there.
  • Other variable-round tests are at 1.0x-1.14x (for example a_record_ordered_variable_round_keeps_the_near_end_and_tie_rule 12.62 -> 14.44 s). The sum over 122 variable-round tests in a parallel gate run is 1.37x.

Proposal (performance only, results unchanged): keep each span's solved middle section across rounds, keyed by its two stations, and re-solve only the sections of spans that a new station split. Every span would still be re-measured against the rebuilt skin. Since the same sections are measured, the stations and the result are bit-identical, which a goldens run can confirm.

Correctness comes first: #15257 lands as it is, and this is its follow-up.

Written by Claude Code (Anthropic) on behalf of @brett19.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageno priority yet; a maintainer sorts it with /triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions