feat(snap): mark the parallel reference line + toggle it off on re-hover
Two refinements to Parallel snap. The acquired reference now keeps a point on the line and draws a ∥ marker there, so the user sees which line the parallel is measured from. And dwelling on that same reference line again removes it (toggle), matching how OTRACK tracking points clear; dwelling on a different line switches the reference. Same-line detection uses parallel direction plus perpendicular screen distance, so it holds across zoom. Refs #277 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
e85cec8274
commit
3bcb5a04c5
4 changed files with 114 additions and 43 deletions
|
|
@ -386,6 +386,15 @@ impl OpenCADStudio {
|
|||
}
|
||||
_ => None,
|
||||
};
|
||||
// The acquired Parallel-snap reference, marked on its line (#277).
|
||||
let parallel_ref_marker: Option<iced::Point> =
|
||||
match (otrack_proj, self.snapper.parallel_ref) {
|
||||
(Some((view_rot, eye, ob)), Some((_, pt))) => {
|
||||
let s = ost_project(pt, view_rot, eye, ob);
|
||||
(s.x.is_finite() && s.y.is_finite()).then_some(s)
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
|
||||
// Model-space pane dividers (none in paper / single-pane layouts).
|
||||
let dividers = if !is_paper {
|
||||
|
|
@ -437,6 +446,7 @@ impl OpenCADStudio {
|
|||
ucs_icons,
|
||||
ost_points,
|
||||
otrack_line,
|
||||
parallel_ref_marker,
|
||||
!is_paper && self.show_viewcube,
|
||||
dividers,
|
||||
pane_move_rect,
|
||||
|
|
|
|||
Loading…
Reference in a new issue