Feat: DIVIDE and MEASURE commands — place points along entities
DIVIDE (DIV): entity pick → type N → places N-1 Point entities at equal spacing. MEASURE (ME): entity pick → type distance → places points at fixed intervals. Supported entities: Line, Arc, Circle, LwPolyline. Uses CmdResult::DivideEntity / MeasureEntity with geometry computed in cmd_result. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
641cc2d70b
commit
ae0a4b12b5
5 changed files with 294 additions and 1 deletions
|
|
@ -985,6 +985,20 @@ impl H7CAD {
|
|||
self.tabs[i].active_cmd = Some(Box::new(cmd));
|
||||
}
|
||||
|
||||
"DIVIDE"|"DIV" => {
|
||||
use crate::modules::home::inquiry::divide::DivideCommand;
|
||||
let cmd = DivideCommand::new();
|
||||
self.command_line.push_info(&cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(cmd));
|
||||
}
|
||||
|
||||
"MEASURE"|"ME" => {
|
||||
use crate::modules::home::inquiry::divide::MeasureCommand;
|
||||
let cmd = MeasureCommand::new();
|
||||
self.command_line.push_info(&cmd.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(cmd));
|
||||
}
|
||||
|
||||
// ── Inquiry ──────────────────────────────────────────────────────
|
||||
"DIST"|"DI" => {
|
||||
use crate::modules::home::inquiry::dist::DistCommand;
|
||||
|
|
@ -1014,7 +1028,7 @@ impl H7CAD {
|
|||
Array: ARRAY ARRAYRECT ARRAYPOLAR ARRAYPATH | \
|
||||
Text: TEXT MTEXT LEADER MLEADER | \
|
||||
Dimension: DIMLINEAR DIMANGULAR DIMRADIUS | \
|
||||
Inquiry: DIST ID AREA LIST | \
|
||||
Inquiry: DIST ID AREA LIST | Draw on entity: DIVIDE MEASURE | \
|
||||
View: ZOOM EXTENTS VIEW LIST/SAVE/RESTORE/DELETE | \
|
||||
Layer: LAYER LIST/NEW/ON/OFF/FREEZE/THAW/LOCK/UNLOCK/COLOR/SET | \
|
||||
Viewport: MVIEW VPLAYER VPORTS MS PS DRAWORDER | \
|
||||
|
|
|
|||
Loading…
Reference in a new issue