feat(plot): QUICKPRINT/QP — plot a selection's bounding box to PDF (#325)

Run QUICKPRINT (or QP), select objects, then Enter: the selection's
bounding box becomes the plot window and a PDF is written next to the
drawing (<name>_<timestamp>.pdf) using the active page setup, with no
dialog. Model space.

Implemented as a selection-gathering CadCommand (src/modules/view/
quick_print.rs) returning CmdResult::QuickPrint(handles); the host
(on_quick_print_handles) unions the picked entities' AABBs, sets the
plot window, and reuses the tested clipped window-export path.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-09 12:57:35 +03:00
1 parent a1ee4d9269
commit c45fe0267c
7 files changed
+165

No files matched your search

+7
View File
@@ -654,6 +654,13 @@ impl OpenCADStudio {
self.tabs[i].active_cmd = Some(Box::new(cmd));
}
"QUICKPRINT" | "QP" => {
use crate::modules::view::quick_print::QuickPrintCommand;
let cmd = QuickPrintCommand::new();
self.command_line.push_info(&cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(cmd));
}
// Bare ZOOM enters the interactive window zoom (pick two corners) —
// the common "zoom to a rectangle" action. The sub-keyword forms
// (ZOOM EXTENTS / IN / OUT / …) are matched above.
+2
View File
@@ -512,6 +512,8 @@ inventory::submit!(crate::command::CommandRegistration {
"PROPS",
"PSPACE",
"PURGE",
"QP",
"QUICKPRINT",
"QS",
"QSAVE",
"QSELECT",