Update (January 2026):
- Added support for the advanced IPOPT solver via CasADi. The solver type can now be selected at runtime via the menu.
- Added the ability to zoom the canvas using the mouse wheel scroll.
- Added more keyboard shortcuts and tooltips displaying them for all buttons.
- Added dimensions for segments and arcs.
This project is an attempt to utilize mathematical optimization algorithms, specifically SLSQP, to deal with geometric constraint solving problem.
Currently, the project is not stable and mature enough to be considered seriously, but you can still experiment with it.
Here you can find more information on how it works: https://vmnnk.com/en/2023-10-18/2d-geometric-constraint-solver
pip install -r requirements.txt
python src/main.py
- Pan the canvas by holding down the mouse wheel button and dragging. Zoom the canvas using the mouse wheel scroll.
- Use the buttons on the left to add a new segment or an arc. You can also use hotkeys ('s' for segment, 'a' for arc).
- Left-click a point, segment, or arc to select it. Click on an empty space to clear the selection.
- Available constraints are automatically displayed for selected items. Left-click the constraint button on the right to apply it. Hover over any button to see its keyboard shortcut.
- To delete a segment or an arc, select it and press DELETE.
- To remove a constraint, left-click its icon and press DELETE.
- Press 'p' to print debug information.
