Closed TimStrauven closed 3 months ago
Btw we could also add a class variable (e.g. "has_alignment"), initialize it in init(), set it in main() when we add a vertical/horizontal constraint and then check in fini() if either has_coincident or has _alignment is set.
This would just prevent the solver from running when there's no new constraint which is probably a good practice but might not be too important...
Sounds good, and will probably have a slight performance gain. Implemented in workflow above waiting for approval.
Thanks!
__init__()
is an internal python method which is better not used with blender's api. Stateful Operators use the init()
method for initializing stuff, see: https://github.com/hlorus/CAD_Sketcher/blob/main/stateful_operator%2Fdocs.md
Merged the PR with the removed __init__
method. Feel free to collect the bounty.
Sorry for the late reply, life got busy... I didn't know about the init() method within Blender, good catch. Thanks for the merge and help you provided!
New behavior will run the solver every time after a line segment has been created.
[BUG] CAD Sketcher shows horizontal and vertical constraints on slanting lines. #429