Files
OneCAD-Draft/src/snap
Hakan SevenandClaude Opus 4.8 ce2365e8f9 fix(osnap): snap to arc/circle centre when hovering the curve (#152)
The Center object snap was a pre-baked point gated purely on the
cursor's screen distance to the centre point. A circle's centre sits
inside it and an arc's centre is usually off in empty space well away
from the curve, so hovering the curve — the natural gesture — never
landed within the snap radius and no centre marker appeared.

Add a curve-proximity pass: when Center is enabled and the cursor is
near a circle/arc/ellipse curve, offer that curve's centre, ranked by
the cursor's distance to the curve. It runs after the `try_pt` closure's
borrow ends so it can update the candidate state directly, mirroring the
Tangent pass.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-25 17:01:23 +03:00
..