Skip to content

Conversation

@robnee
Copy link
Contributor

@robnee robnee commented Mar 7, 2021

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.

@robnee
Copy link
Contributor Author

robnee commented Mar 7, 2021

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.

@robnee
Copy link
Contributor Author

robnee commented Mar 7, 2021

@ruevs Didn't mean to conflict with your commit. You might be in a better position to fix this since I think you are working on the tangent #937. It's tricky though. There's a couple of frustrating edge cases.

@ruevs ruevs requested a review from vespakoen March 7, 2021 22:16
@ruevs
Copy link
Member

ruevs commented Mar 7, 2021

No problem. I need time to think about this and debug through it... corner cases...
This may be for after 3.0 - especially considering that it can be done with construction entities.

@ruevs ruevs self-requested a review January 29, 2023 02:23
@ruevs ruevs self-assigned this Jan 29, 2023
@ruevs ruevs marked this pull request as draft November 27, 2023 03:50
@ruevs
Copy link
Member

ruevs commented May 17, 2025

See here #951 (comment)

@ruevs
Copy link
Member

ruevs commented May 17, 2025

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants