For the past days I worked on improving the Solver:
- fixed the circle parameters loading bug: the circle parameters were loaded first, regardless of the circle's position in the shape list.
- added code to make sure that the circle's center is always loaded before the circle in the shape list (since both of the reference the same index in the shape to parameter index list)
- added a new constraint which forces a value to always be positive. This constraint is currently used to ensure that circle radiuses computed by the Solver (when the radius isn't locked by the user to a specific value) remain positive
- updated the soft constraints function to only add the positive radius soft constraint
- improved the Solver calling for circle tab changes
There is a bug which causes the Solver to sometimes miss the solution for more complicated shapes (possibly because it doesn't select a correct estimation for the first step if the new position is too distant from the original position). This is what I'll be working on next, as well as adding unit tests for the shape list creation method in DocumentToSolverAdapter.