Skip to content

AntonEvmenenko/2d_geometric_constraint_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D Geometric Constraint Solver

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

How to run

pip install -r requirements.txt
python src/main.py

How to use

  1. 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)
  2. Left click the point/segment/arc to select it. Click on an empty space to clear the selection
  3. The available constraints are automatically displayed for the selected items. Left click the constraint button on the right to apply the constraint
  4. To delete a segment or an arc, select it and press DELETE
  5. To remove a constraint, left click its icon and press DELETE
  6. Press 'i' to print some debug information