bonjorno7
bonjorno7
Good idea.
I've made a start here: https://github.com/hlorus/CAD_Sketcher/pull/425
The linter seems to dislike long lines. I didn't think they would be an issue, because the project has lots of them already. I suppose I can split things across...
> Great stuff! I see one major problem tho, since constraints.all is not sorted by creation date the contextmanager might remove constraints that weren't added in its context which is...
It now only removes constraints that are actually new. If the sketch fails, it removes all of the new constraints. Ideally it'd find out which constraints specifically are conflicting and...
> The solver simply changes the position of geometric entities based on the constraints. We don't want that to happen always, usually only from the fini method of operators. With...
> I made it remove only the constraints where failed=True; though it might make sense to make this an option. I feel like if you're adding multiple constraints inside the...
Oh and would it be possible to set the linter to 120 line length? That'd be consistent with the actual code base, so it would stop failing every time.
If you think the context manager is good now, I can start adding the other operators yeah.
I could use some help coming up with cases where auto constraints fail actually. It's easy enough for line_2d, but other than that I'm not sure.