feat(view): DVIEW twists the view about its line of sight

DVIEW (alias DV) offers TWist and Undo. TWist rolls the active view
or viewport camera to the typed angle; Undo steps back through the
twists made in the session. The new alias reaches existing profiles
through the alias migration table.

Refs #638

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-13 14:47:34 +03:00
1 parent 6490a625f2
commit 4ffae00199
31 files changed
+203 -1

No files matched your search

+15
View File
@@ -935,6 +935,21 @@ impl OpenCADStudio {
self.tabs[i].active_cmd = Some(Box::new(cmd));
}
"DVIEW" => {
use crate::modules::view::dview::DviewCommand;
let twist = {
let scene = &self.tabs[i].scene;
let roll = match scene.active_viewport {
Some(_) => scene.navigation_camera().roll(),
None => scene.camera.borrow().roll(),
};
-(roll as f64)
};
let cmd = DviewCommand::new(twist.rem_euclid(std::f64::consts::TAU));
self.command_line.push_info(&cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(cmd));
}
"ZOOM" | "ZOOM WINDOW" | "ZOOM W" | "ZW" => {
use crate::modules::view::zoom_window::ZoomWindowCommand;
let new_cmd = ZoomWindowCommand::new();