feat(otrack): lock onto the intersection of two active vectors

When two tracking vectors were active, clicking placed a free point on
one of them instead of their crossing. otrack_snap now builds the active
rays (OTRACK rays from tracking points, plus POLAR rays from the last
point) and, when the cursor is near the crossing of two vectors from
different origins, locks onto that intersection. Covers OTRACK×OTRACK and
POLAR×OTRACK; single-vector alignment is unchanged when no crossing is
near.

Closes #111
Closes #112

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-17 05:01:41 +03:00
commit 58e4d696ba
2 changed files with 121 additions and 16 deletions

View file

@ -2493,8 +2493,13 @@ impl OpenCADStudio {
} else {
None
};
self.snapper
.otrack_snap(cursor_world, view_proj, bounds, step)
self.snapper.otrack_snap(
cursor_world,
view_proj,
bounds,
step,
self.last_point,
)
} else {
None
}
@ -3100,7 +3105,8 @@ impl OpenCADStudio {
} else {
None
};
self.snapper.otrack_snap(raw, vp_mat, bounds, step)
self.snapper
.otrack_snap(raw, vp_mat, bounds, step, self.last_point)
} else {
None
};