forked from 1b-agent/opencadstudio-upstream
Fix perpendicular and OTRACK snap interactions
This commit is contained in:
1 parent
a8c9e3dd0c
commit
080a82306e
2 files changed
+50
-31
No files matched your search
@@ -1107,10 +1107,8 @@ impl OpenCADStudio {
|
||||
// Grip edits use the same tracking-point acquisition and OTRACK
|
||||
// resolution as normal interactive point commands.
|
||||
let otrack_hit = {
|
||||
let snap_world = snap_hit.map(|s| s.world);
|
||||
|
||||
self.snapper.update_otrack_dwell(
|
||||
snap_world,
|
||||
snap_hit,
|
||||
&snap_candidates,
|
||||
view_rot,
|
||||
eye,
|
||||
@@ -1595,9 +1593,8 @@ impl OpenCADStudio {
|
||||
// to a tracking ray (and store the alignment so a typed
|
||||
// distance can place a point along it — issue #69).
|
||||
let otrack_hit = {
|
||||
let snap_world = self.tabs[i].snap_result.map(|s| s.world);
|
||||
self.snapper.update_otrack_dwell(
|
||||
snap_world,
|
||||
self.tabs[i].snap_result,
|
||||
&snap_candidates,
|
||||
view_rot,
|
||||
eye,
|
||||
@@ -1614,7 +1611,11 @@ impl OpenCADStudio {
|
||||
bounds,
|
||||
Instant::now(),
|
||||
);
|
||||
if self.tabs[i].snap_result.is_none() {
|
||||
if self.tabs[i].snap_result.is_none()
|
||||
|| self.tabs[i]
|
||||
.snap_result
|
||||
.is_some_and(|s| s.snap_type == crate::snap::SnapType::Extension)
|
||||
{
|
||||
// A window corner is a free point, so neither the
|
||||
// Polar increment nor the Ortho lock may pull the
|
||||
// OTRACK alignment onto an axis (#291).
|
||||
@@ -2992,7 +2993,10 @@ impl OpenCADStudio {
|
||||
}
|
||||
// OTRACK alignment wins over ortho/polar; otherwise apply
|
||||
// ortho/polar relative to the last point.
|
||||
let otrack = if !world_pt_locked && snap_hit.is_none() {
|
||||
let otrack = if !world_pt_locked
|
||||
&& (snap_hit.is_none()
|
||||
|| snap_hit.is_some_and(|s| s.snap_type == crate::snap::SnapType::Extension))
|
||||
{
|
||||
let step = if self.polar_mode && !is_window_corner {
|
||||
Some(self.polar_increment_deg)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user