wo80 / Triangle.NET

C# / .NET version of Jonathan Shewchuk's Triangle mesh generator.
463 stars 85 forks source link

Provide easier way to recognize contours in the mesh #28

Closed adriaanpfeiffer closed 2 years ago

adriaanpfeiffer commented 2 years ago

By specifying a contour (with regionlabel) when adding the contour it is immediately clear that the label belongs with that contour. It makes it easier to find the region later on when the polygon is meshed.

wo80 commented 2 years ago

Thanks. Since the combination of hole = true and regionlabel > 0 doesn't make sense, I think it would be best to add a separate method

void Add(Contour contour, int regionlabel)

The existing method should call the new method for the hole = false branch with regionlabel = 0. The IPolygon interface should be updated accordingly - this will also fix the build error.

adriaanpfeiffer commented 2 years ago

yes agreed, will update the pull request according to your remarks.