-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix inserting break lines in dual edge triangulation #39218
Conversation
@@ -1327,13 +1327,39 @@ unsigned int QgsDualEdgeTriangulation::insertEdge( int dual, int next, int point | |||
|
|||
} | |||
|
|||
static bool triangleIsFlat( const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double tolerance ) |
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.
Maybe this method could be useful in QgsTriangle class?
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.
Or in QgsGeometryUtils to avoid the creation of a triangle each time
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.
Ad this function is not complete (but sufficient in this context), no sure. Indeed, only the distance between the segment [pt1,pt2] from pt3 is checked. So if this segment is very small and pt3 far away, the triangle is flat but the function does not return true
.
This is acceptable here and changing that will slow down the function. I think I will change the function name / add comments.
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.
Pretty tricky to review this one, but I can't see any glaring issues!
@nyalldawson , also pretty tricky to fix... |
I can imagine! I'm just glad that these classes are getting some love and no longer produce embarrassing results!! |
fix #30549 and more generally inserting break line in dual edge triangulation.
Hope it is the last issue... (surely not!)