Feat: PEDIT command (PE) — polyline edit (close/open/width)

Entity pick → text input subcommands:
  C / CLOSE  → set closed flag
  O / OPEN   → clear closed flag
  W <value>  → set uniform width on LwPolyline vertices
  X / EXIT   → cancel

Command stays active after each op (CmdResult::PeditOp) for multiple edits.
Supports LwPolyline and Polyline2D.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-03 09:19:36 +03:00
commit 330b8b58f4
5 changed files with 139 additions and 0 deletions

View file

@ -1018,6 +1018,13 @@ impl H7CAD {
self.tabs[i].active_cmd = Some(Box::new(cmd));
}
"PEDIT"|"PE" => {
use crate::modules::home::modify::pedit::PeditCommand;
let cmd_obj = PeditCommand::new();
self.command_line.push_info(&cmd_obj.prompt());
self.tabs[i].active_cmd = Some(Box::new(cmd_obj));
}
"ALIGN"|"AL" => {
use crate::modules::home::modify::align::AlignCommand;
let cmd = AlignCommand::new();