forked from 1b-agent/opencadstudio-upstream
fix(ucs): snap ViewCube face views square to the active UCS
Clicking a ViewCube face rotated the gaze into the UCS frame but derived the up vector from world X/Y/Z, so the snapped view landed world-aligned (most visibly Top, where the UCS shares world Z and only the in-plane roll differs). snap_to_direction now takes the UCS basis and picks its up from the UCS axes, so a face snap lands square to the user's coordinate system. Identity UCS reproduces the world-aligned snap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
b676874a6f
commit
98142ee4af
2 files changed
+13
-14
No files matched your search
+1
-1
@@ -4351,7 +4351,7 @@ impl OpenCADStudio {
|
||||
.snap_active_viewport_to_direction(eye_dir);
|
||||
} else {
|
||||
let mut cam = self.tabs[i].scene.camera.borrow_mut();
|
||||
cam.snap_to_direction(eye_dir);
|
||||
cam.snap_to_direction(eye_dir, r_ucs);
|
||||
}
|
||||
self.tabs[i].scene.camera_generation += 1;
|
||||
self.command_line
|
||||
|
||||
Reference in new issue
Block a user