CAD_Sketcher icon indicating copy to clipboard operation
CAD_Sketcher copied to clipboard

Improve auto-creating constraints

Open hlorus opened this issue 2 years ago • 5 comments

Tools that automatically add constraints should check if the system still solves. If there's an error the constraints shouldn't be added.

Additionally it would be great to have the option to turn off automatic constraining with a global toggle and ideally also a modifier key.

hlorus avatar Apr 28 '22 14:04 hlorus

Do you have a list of tools which automatically add constraints? So far it seems all active tools (toolbar on the left) can do it under the right circumstances, except Offset Entities.

bonjorno7 avatar Nov 13 '23 15:11 bonjorno7

Probably these:

add_point_3d add_point_2d add_line_3d add_line_2d add_arc add_rectangle

bevel trim

hlorus avatar Nov 13 '23 16:11 hlorus

Maybe we could use a context manager for this, then adding constraints would look something like this:

with safe_constraining() as constraints: constraints.add_coincident() ....

hlorus avatar Nov 13 '23 16:11 hlorus

Good idea.

bonjorno7 avatar Nov 13 '23 17:11 bonjorno7

I've made a start here: https://github.com/hlorus/CAD_Sketcher/pull/425

bonjorno7 avatar Nov 19 '23 18:11 bonjorno7