forked from 1b-agent/opencadstudio-upstream
fix(ucs): object snap tracking rays follow the active UCS
OTRACK alignment rays (0°/90° and polar steps, plus the polar pencil from the last point) were built along world X/Y. They now rotate with the active UCS via a Mat4 passed into otrack_snap (scene.viewcube_ucs_mat() — the UCS in model space, identity in paper), so tracking lines and the intersection lock align to the user's coordinate system like ortho, polar, and the grid. sync_ucs_to_scene now reuses UcsXform::rotation_mat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
98142ee4af
commit
2509396ba0
4 files changed
+21
-10
No files matched your search
+4
-1
@@ -2839,12 +2839,14 @@ impl OpenCADStudio {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let ucs = self.tabs[i].scene.viewcube_ucs_mat();
|
||||
self.snapper.otrack_snap(
|
||||
cursor_world,
|
||||
view_proj,
|
||||
bounds,
|
||||
step,
|
||||
self.last_point,
|
||||
ucs,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
@@ -3464,8 +3466,9 @@ impl OpenCADStudio {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let ucs = self.tabs[i].scene.viewcube_ucs_mat();
|
||||
self.snapper
|
||||
.otrack_snap(raw, vp_mat, bounds, step, self.last_point)
|
||||
.otrack_snap(raw, vp_mat, bounds, step, self.last_point, ucs)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user