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:
parent
98142ee4af
commit
2509396ba0
4 changed files with 21 additions and 10 deletions
|
|
@ -192,13 +192,7 @@ impl DocumentTab {
|
|||
/// Push the active UCS rotation into the scene so the ViewCube composes with
|
||||
/// it. Call after any change to `active_ucs`.
|
||||
pub(super) fn sync_ucs_to_scene(&mut self) {
|
||||
let (_, x, y, z) = self.ucs_xform().axes();
|
||||
self.scene.viewcube_ucs = glam::Mat4::from_cols(
|
||||
x.extend(0.0),
|
||||
y.extend(0.0),
|
||||
z.extend(0.0),
|
||||
glam::Vec4::W,
|
||||
);
|
||||
self.scene.viewcube_ucs = self.ucs_xform().rotation_mat();
|
||||
}
|
||||
|
||||
pub(super) fn new_drawing(n: usize) -> Self {
|
||||
|
|
|
|||
Loading…
Reference in a new issue