* claim: Sketch: keep profile outlines and trim/extend cuts between mouse moves
* Sketch: keep profile outlines and trim/extend cuts between mouse moves
Hovering a large sketch sampled every profile's loops into polylines for
each point asked, and Trim/Extend intersected the hovered curve with every
other curve on every mouse move.
- Loop2::contains rejects points clearly outside a box from the loop's end
and control points before sampling; Region2::outline samples the loops
once (RegionOutline). Profile keeps both in OnceLocks and answers
Profile::contains from them (viewport pick, profile_at_point, profile
selection by points). Answers are unchanged: the box margin covers
rounding, and non-finite values or negative conic weights skip the box.
- sketch_modify splits the cuts on a curve (TrimHover) from choosing the
piece around the cursor. The UI keeps one per sketch state and curve,
and Extend's preview per sketch state, curve and growing end (afresh
when the sketch has an infinite line).
Plate with 400 circles (801 profiles), release, per mouse move: UI frame
5.19 -> 1.11 ms, with Trim 9.45 -> 1.50 ms; 30 lines x 30 splines: Trim
piece 6.10 -> 0.0002 ms. Equivalence tests compare with the old answers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sketch: keep the profile outline helpers in the sketch crate
The outer loop's box, the clearly-outside test and the outline sampled
once move from geom into crates/sketch/src/profiles.rs as private items
built from geom's public types, so the PR leaves crates/geom untouched.
Profile::contains answers exactly as before; the geom test moves to the
sketch profile tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>