feat(snap): Shift hard axis lock during point picks (#312)
Holding Shift while a command asks for a point captures the nearest polar increment (or ortho axis, UCS-aware) from the rubber-band base toward the cursor and pins the pick to that ray. Every candidate — osnap hits included — projects onto the locked direction, so a snap far off-axis contributes only its along-axis component; the click commits exactly what the preview shows. The direction stays fixed while Shift is held and drops the moment it releases. Grip drags get the same lock from the grip origin. Guards: engages only when the active command wants a point — never during entity picks (Shift there is the TRIM/EXTEND swap), tangent picks, selection gathering or window-corner picks. Closes #312 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
ba73c48aec
commit
51f07f1208
4 changed files with 119 additions and 4 deletions
|
|
@ -2243,6 +2243,11 @@ impl OpenCADStudio {
|
|||
let ctrl_changed = self.ctrl_down != ctrl;
|
||||
self.shift_down = shift;
|
||||
self.ctrl_down = ctrl;
|
||||
// Releasing Shift drops the hard axis lock immediately (#312)
|
||||
// — without this a lock could linger until the next move.
|
||||
if !shift {
|
||||
self.axis_lock_dir = None;
|
||||
}
|
||||
// A live command may key its preview off Ctrl (arc-direction
|
||||
// flip). Rebuild it at the current cursor so the flip shows
|
||||
// without waiting for the next mouse move.
|
||||
|
|
|
|||
Loading…
Reference in a new issue