feat(commands): step POLYSOLID (select polyline, then width + height)

Add SelectThenTwoValueCommand (gather a selection, then two values) and use it
for POLYSOLID: bare POLYSOLID gathers the polyline if none is selected, prompts
for wall width then height, and dispatches POLYSOLID <width> <height>.
This commit is contained in:
Hakan Seven committed 2026-07-16 14:47:45 +03:00
1 parent 49c10bc806
commit e85e2aeb78
2 files changed
+105 -1

No files matched your search

+13 -1
View File
@@ -761,7 +761,19 @@ impl OpenCADStudio {
// POLYSOLID <width> <height> — extrude a selected polyline into a
// wall-like solid.
cmd if cmd == "POLYSOLID" || cmd.starts_with("POLYSOLID ") => {
"POLYSOLID" => {
use crate::command::SelectThenTwoValueCommand;
let has_sel = !self.tabs[i].scene.selected_entities().is_empty();
let c = SelectThenTwoValueCommand::new(
"POLYSOLID",
"POLYSOLID wall width:",
"POLYSOLID wall height:",
has_sel,
);
self.command_line.push_info(&c.prompt());
self.tabs[i].active_cmd = Some(Box::new(c));
}
cmd if cmd.starts_with("POLYSOLID ") => {
let nums: Vec<f64> = cmd
.split_whitespace()
.skip(1)