forked from 1b-agent/opencadstudio-upstream
fix(snap): parallel snap keeps its reference, base and lock in f64
The reference direction, base point and locked point went through f32, so the drawn line drifted off true parallel. Fixes #1387 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
399b5b2c95
commit
c964e365c3
3 files changed
+29
-30
No files matched your search
@@ -2293,7 +2293,7 @@ impl OpenCADStudio {
|
||||
Instant::now(),
|
||||
);
|
||||
self.snapper.update_parallel(
|
||||
cursor_world.as_vec3(),
|
||||
cursor_world,
|
||||
&snap_candidates,
|
||||
view_rot,
|
||||
eye,
|
||||
@@ -2324,8 +2324,8 @@ impl OpenCADStudio {
|
||||
// (#277)
|
||||
if axis_lock.is_none() && self.tabs[i].snap_result.is_none() && otrack_hit.is_none() {
|
||||
if let Some(par) = self.snapper.parallel_snap(
|
||||
cursor_world.as_vec3(),
|
||||
self.last_point.map(|p| p.as_vec3()),
|
||||
cursor_world,
|
||||
self.last_point,
|
||||
view_rot,
|
||||
eye,
|
||||
bounds,
|
||||
@@ -2333,7 +2333,7 @@ impl OpenCADStudio {
|
||||
if let (Some(base), Some((dir, _))) =
|
||||
(self.last_point, self.snapper.parallel_ref)
|
||||
{
|
||||
self.otrack_active = Some((base, dir.as_dvec3()));
|
||||
self.otrack_active = Some((base, dir));
|
||||
self.otrack_cross = None;
|
||||
}
|
||||
self.tabs[i].snap_result = Some(par);
|
||||
|
||||
Reference in new issue
Block a user