forked from 1b-agent/opencadstudio-upstream
feat(arc): keep ARC Continue drawing arcs until ended (#327)
The Continue option committed a single tangent-continuing arc and left the command. Now each picked end point commits its arc and re-anchors at that arc's free end, so the user keeps drawing tangent-continuing arcs until ending the run with Enter/Esc. A degenerate (collinear) pick stays active instead of cancelling. Because arcs now commit via CmdResult::CommitEntity (repeating) rather than CommitAndExit, advance the ARC_CONT continuation anchor in the CommitEntity arm too — guarded to line/arc so non-continuable repeats (point/ray/spline) leave it untouched. This also lets a LINE run feed a following ARC Continue. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
26cab3b712
commit
39c0a84c3c
2 files changed
+23
-2
No files matched your search
@@ -218,6 +218,17 @@ impl OpenCADStudio {
|
||||
}
|
||||
}
|
||||
CmdResult::CommitEntity(entity) => {
|
||||
// A line/arc drawn by a repeating command advances the ARC_CONT
|
||||
// continuation anchor, so ending one run and launching another
|
||||
// keeps continuing from the last segment (mirrors the
|
||||
// CommitAndExit arm). Non-continuable repeats (point/ray/spline)
|
||||
// leave the anchor untouched. (#327)
|
||||
if matches!(
|
||||
entity,
|
||||
acadrust::EntityType::Line(_) | acadrust::EntityType::Arc(_)
|
||||
) {
|
||||
self.update_cont_anchor(&entity);
|
||||
}
|
||||
let label = self.history_label_from_active_cmd(i, "ENTITY");
|
||||
self.push_undo_snapshot(i, label);
|
||||
self.commit_entity(entity);
|
||||
|
||||
Reference in new issue
Block a user