Feat: BREAK command (BR) — split Line/Arc/Circle/LwPolyline at two points

3-step interactive flow:
  1. Entity pick (first break point recorded at click location)
  2. Optional first point refinement
  3. Second break point → CmdResult::BreakEntity applied in cmd_result

Geometry:
- Line: project p1/p2 onto line parameter space → two line fragments
- Arc:  project p1/p2 to arc angles → trim CCW from p1 to p2
- Circle: same as Arc, converts Circle → Arc
- LwPolyline: nearest-vertex split → two polyline fragments

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Sonnet 4.6 committed 2026-04-02 23:39:51 +03:00
1 parent a3bb2714c1
commit 4b8ae08a19
5 files changed
+330 -1

No files matched your search

+2
View File
@@ -95,6 +95,8 @@ pub enum CmdResult {
ZoomToWindow { p1: Vec3, p2: Vec3 },
/// Print a measurement result to the command line and end the command.
Measurement(String),
/// Break `handle` at points `p1` and `p2`; replace with computed fragments.
BreakEntity { handle: Handle, p1: Vec3, p2: Vec3 },
}
// ── Trait ─────────────────────────────────────────────────────────────────