Allow constraining both sides of 2 curves or a line and a cubic#954
Allow constraining both sides of 2 curves or a line and a cubic#954robnee wants to merge 1 commit intosolvespace:masterfrom
Conversation
|
This doesn't properly handle attempting to constrain the entities tangent a second time if their remaining endpoints are not already coincident. It redundantly constrains the first two points. This also cheats when it detects the existing constraint. It rewrites that first constraint to constrain the other points and then proceeds to constrain the first two points again. It works but it might cause a problem somewhere else, changing the constraint after it's been written. These can be fixed but the code started to get even uglier. This is still a work in progress. |
|
No problem. I need time to think about this and debug through it... corner cases... |
|
See here #951 (comment) |
|
I rabased this on master here and it works. It has an interesting side effect when a curve and line do not share end points - if the user selects the two entities and one end point of the curve and applies the tangent constraint it works as expected. If he repeats exactly the same a second time the other end of the curve gets constrained. Not surprising and perhaps not a big problem. But see here #951 (comment) in current master it is possible to achieve this without this PR by selecting the entities in a different order. Hmmmm... |
This tries to address issue #951. There didn't really seem to be anything that prevented this from working from the data-model point of view. The code that applies the constraints just needed to check if the other two points were already constrained. If so it just tries to constrain the other two points. You must constrain the two entities twice to constrain both ends. That said, this feels a little ugly and I wonder if there is a more elegant way to do it.