Closed Paulchen29 closed 2 years ago
Concave is possible. How do you set up your polygon?
Hey,
Thanks I figured it out yesterday! I was missing to add the segments to the polygon - I was just using points
TriangleNet.Geometry.Polygon polygon = new TriangleNet.Geometry.Polygon();
polygon.Points.AddRange(polygonPoints);
for (int ix = 0; ix < polygonPoints.Count; ix++)
{
if (ix == polygonPoints.Count - 1)
{
polygon.Add(new Segment(new Vertex(polygonPoints[ix].X, polygonPoints[ix].Y),
new Vertex(polygonPoints[0].X, polygonPoints[0].Y)));
}
else polygon.Add(new Segment(new Vertex(polygonPoints[ix].X, polygonPoints[ix].Y),
new Vertex(polygonPoints[ix + 1].X, polygonPoints[ix + 1].Y)));
}
Hello,
I have a concave polygon and when I triangulate it with your Libary I get back only the convex hull no matter what constraint options I am using.
Any suggestions on that or is a concave not possible?