Open TTWDmitryZelenkin opened 6 years ago
snapping vertices to points is tricky because you might introduce foldovers. Another more reliable option is to insert each of your points into the meshed polygon as a new vertex, using DMesh3.PokeTriangle()
This is actually how TriangulatedPolygonGenerator works internally, it starts with a 2-triangle rectangle, inserts the polygon vertices, and then connects the edges and removes the 'outside' regions. If you look in MeshInsertUVPolyCurve.insert_corners() you will see how this is done (there are some special cases it handles there)
Hi. Thank you for a fantastic library. I found a TriangulatedPolygonGenerator method which does meshing of 2D polygons. I have points inside a polygon. Is there any workaround how to force mesh vertices to snap onto those points?