Details
-
Technical task
-
Resolution: Fixed
-
P2: Important
-
None
-
None
-
None
Description
When triangles containing curves overlap with other triangles, we get into trouble with parts sticking out and the triangulator having trouble because it assumes there are no overlapping triangles. The article mentions that the trick here is to detect when a triangle representing a curve is overlapping with another triangle representing a curve, and then subdividing one of the curves until there are no more overlaps. This should be done on the QPainterPath before we start triangulating it as a pre-pass, so that the QPainterPath we pass in does not contain any curves which will result in overlapping triangles. De Casteljau's algorithm may be useful for subdividing the curves.
Here's the illustration from the original article:
The problem is easily visible with the current implementation on the outline. Here is an example from the current implementation:
When enabling debug view, we can see that the concave triangle (the blue one) is overlapping with the convex triangle (the red one) and the tip representing its control point is sticking out of the shape, causing the sharp edge there.
Zoomed in:
Attachments
Issue Links
- mentioned in
-
Page Loading...