feat(mview): add viewport creation options

Support polygonal and object viewports through native clip-boundary handles, including clipped rendering and selection.

Closes #525
This commit is contained in:
Hakan Seven committed 2026-07-27 19:28:51 +03:00
1 parent 3d90450b3f
commit b8889ccd20
10 files changed
+1038 -135

No files matched your search

+8 -1
View File
@@ -412,7 +412,14 @@ impl OpenCADStudio {
.push_error("MVIEW: switch to a paper space layout first.");
} else {
use crate::modules::layout::mview::MviewCommand;
let new_cmd = MviewCommand::new();
let scene = &self.tabs[i].scene;
let layout = scene.current_layout.clone();
let paper_bounds = scene
.printable_area_limits()
.or_else(|| scene.paper_limits())
.unwrap_or(((0.0, 0.0), (297.0, 210.0)));
let views = scene.document.views.iter().cloned().collect();
let new_cmd = MviewCommand::new(layout, paper_bounds, views);
self.command_line.push_info(&new_cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(new_cmd));
}