maybeSplitAt in lib/pages/map/canvas/interaction/line_ops.dart:310 skips biarcs but not arcs, and tests the point against the straight chord with distToSegment(position, line.start, line.end). It then calls splitLineAt, which replaces the arc with two straight segments.
Scenario: a quarter arc from (0,0) to (20,20) has the grid point (10,10) on its chord, 5.86 units from the curve. Starting or ending a line there turns the arc into two straights.
Evidence:test/review_probes/engine_model_ops_probe.dart (local, untracked): after maybeSplitAt: [StraightSegment (0,0)->(10,10), StraightSegment (10,10)->(20,20)].
Same gap in the agent tool: split_segment in lib/agent/tools/segment_tools.dart:38 passes any segment type and any point straight through.
Fix sketch: use distance to the arc for arcs and split them into two arcs, or refuse. Validate the type and point in the tool. Related: #4.
From the engineering review on 2026-10-13.
`maybeSplitAt` in `lib/pages/map/canvas/interaction/line_ops.dart:310` skips biarcs but not arcs, and tests the point against the straight chord with `distToSegment(position, line.start, line.end)`. It then calls `splitLineAt`, which replaces the arc with two straight segments.
**Scenario:** a quarter arc from (0,0) to (20,20) has the grid point (10,10) on its chord, 5.86 units from the curve. Starting or ending a line there turns the arc into two straights.
**Evidence:** `test/review_probes/engine_model_ops_probe.dart` (local, untracked): `after maybeSplitAt: [StraightSegment (0,0)->(10,10), StraightSegment (10,10)->(20,20)]`.
Same gap in the agent tool: `split_segment` in `lib/agent/tools/segment_tools.dart:38` passes any segment type and any point straight through.
**Fix sketch:** use distance to the arc for arcs and split them into two arcs, or refuse. Validate the type and point in the tool. Related: #4.
ImBenji
added the bug label 2026-10-13 02:28:37 +00:00
ImBenji
added this to the Arcs & Angles project 2026-10-13 02:28:37 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From the engineering review on 2026-10-13.
maybeSplitAtinlib/pages/map/canvas/interaction/line_ops.dart:310skips biarcs but not arcs, and tests the point against the straight chord withdistToSegment(position, line.start, line.end). It then callssplitLineAt, which replaces the arc with two straight segments.Scenario: a quarter arc from (0,0) to (20,20) has the grid point (10,10) on its chord, 5.86 units from the curve. Starting or ending a line there turns the arc into two straights.
Evidence:
test/review_probes/engine_model_ops_probe.dart(local, untracked):after maybeSplitAt: [StraightSegment (0,0)->(10,10), StraightSegment (10,10)->(20,20)].Same gap in the agent tool:
split_segmentinlib/agent/tools/segment_tools.dart:38passes any segment type and any point straight through.Fix sketch: use distance to the arc for arcs and split them into two arcs, or refuse. Validate the type and point in the tool. Related: #4.