Does the winding of input edges matter? #186
-
Hello! I've been using this library a bit, and it works really well. I was usually using polygons that always had the edges wound in the same way and in order(for example: v0->v1, v1->v2, v2->v3 etc). However, for my use case (I'm using this in unreal engine to triangulate some mesh slices) I decided that it might be better to supply a full array of randomly-ordered edges (random both in winding and the general order, so they can be something like v0->v1, v2->v1, v4->v3, v2->v3...) that I get after slicing a mesh, becase unreal's FGeomTools way of building a polygon from a set of these edges resulted in unsatisfactory polygons (or their complete lack) in some cases. Unfortunately, when supplying the data, eraseOuterTriangles seemed to result in erasure of all or almost all of the geometry, and the winding of the edges is the only culprit I can think of. Some of them were intersecting, but I thought that with a proper CDT::Triangulation constructor option they would be a non-issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Could you provide a minimal reproducible example? |
Beta Was this translation helpful? Give feedback.
Hi, Adam,
To answer the original question: edges direction does not matter: edge
1 -> 2
is same as edge2 -> 1
.I looked at your input: the boundary is not watertight (see images below).
Also here's the input that CDT visualizer can open, so you can take a look yourself if you would like to:
discussion-186.txt