-
-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CURA-11974] better non vertex seams #2100
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… center. In isolation, you'd really want the actual closest point on the polygon, however, that'd make the seams not fit together for polygons with different sizes and shapes, especially if rounding is involved. start of CURA-11974 (split off from CURA-9474).
…rst, and disable for shortest. Since as polygons shift over the players, their center also changes, we need to be careful to get the same point each time (or at least try to, since if it's not the polygon center anymore but that of the entire model, the intersection with the line from that center to the requested point might not exist). Also disable _any_ of this new behaviour (also the previously introduced) for the 'shortest.' part of CURA-11974
Otherwise the algo would still occasionally choose other vertices, despite there being only one that we actually want it to land on. This would make the seams look messy in 3D space. part of CURA-11974
wawanbreton
reviewed
Jun 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions, feel free to decline them.
I took the liberty of making a last small modification, that IMHO makes the code more readable, and agree with our own standards. |
wawanbreton
approved these changes
Jun 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split off from: #2087
For user defined seam locations, the last ticket left us in a situation where it was calculated to be the closest point on the polygon. While this is technically correct in a sense, this would not make the newly made vertices (made for the seam) line up 'correclty'. Instead specify a line from the origin of the model and intersect.
Also, while a new vertex was made, the rest of the algorithm would still occasionally pick other vertices. Probably for very defensible reason(s) when dealing with arbitrary vertices, but not wanted when we explicitly make a vertex at the specified location.