Latest Results
[BUG]: Point on arc changes when constrained even with good initial guesses (#221)
@franknoirot found this
```
@settings(experimentalFeatures = allow)
sketch(on = XY) {
line3 = sketch2::line(start = [var 4.32mm, var 3.72mm], end = [var 1.06mm, var -3.26mm])
line4 = sketch2::line(start = [var 1.06mm, var -3.26mm], end = [var -6.71mm, var -2.8mm])
sketch2::coincident([line3.end, line4.start])
arc1 = sketch2::arc(start = [var -1.44mm, var -0.99mm], end = [var 2.49mm, var -0.2mm], center = [var 1.06mm, var -3.26mm])
sketch2::coincident([arc1.center, line3.end])
sketch2::coincident([arc1.end, line3])
}
```
https://github.com/user-attachments/assets/ef695f23-8d50-4fe0-8af5-e76a6083bc80
Aside from the tests added here, there's also a [test in the trim
branch](https://github.com/KittyCAD/modeling-app/pull/9651/commits/91bb2930a1fc9c9e93d74cd55c92fdaefbd05695)
that reflects this too
This PR addresses that by changing how the “point is within the arc’s
angular span” part of the constraint is expressed and stabilized across
the branch
• It still enforces “point is on the circle” (distance-to-center equals
radius)
• The angle-range residuals use the arc’s own orientation (start → end)
for a consistent CCW/CW sign
• The angle-range residuals are one-sided penalties (0 when satisfied,
positive when violated)
• The Jacobian for those penalties is gated so once the angular
condition is satisfied it stops pulling
• The angular penalties are disabled when the point is already
sufficiently close to the circle, preventing the solver from dragging a
near-satisfied point around
That combination is meant to stop the solver from getting a big,
misleading “gradient signal” from the angular terms when it shouldn’t Active Branches
#1770%
#168+1%
#160+3%
© 2026 CodSpeed Technology