Blender Git Commit Log
Git Commits -> Revision 964c357
Revision 964c357 by Ton Roosendaal (master) February 15, 2013, 12:26 (GMT) |
Bug fix #34177 Blender's triangulator has been rescued :) This commit fixes errors with concave holes inside polygons. Simple explanation: Blender "ScanFill" works by sorting vertices from top-left to bottom-right, and connecting these vertices with a sorted list of edges they have. The inner loop then goes over every vertex, its edges, and tries to make triangles by checking vertices that are next in the list. - if the triangle has points inside: it creates an edge to this vertex, and continues - else: add new triangle. Very simple, fast and efficient. But it needed one more check for the first step: it should check every vertex inside the triangle, and pick the best vertex for an edge based on forming the sharpest angle with the tested edge. That solves the case for concave holes. Blender ScanFill was coded 20 years ago, and is an own invention. I wanted a triangulator that just fills any collection of polygons, including with holes. No idea if this was ever published in a paper! |
Commit Details:
Full Hash: 964c35771ce3a4a15dfb96d6185b31457e1d29b3
SVN Revision: 54579
Parent Commit: d5d38ef
Lines Changed: +39, -15
1 Modified Path:
/source/blender/blenlib/intern/scanfill.c (+39, -15) (Diff)