Method TriangulateSurface
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
TriangulateSurface()
Breaks the polygon into triangles that each lie within it, using the default tolerance.
public GeoTriangle2[] TriangulateSurface()
Returns
- GeoTriangle2[]
The triangles covering the polygon, counter-clockwise; none when it encloses no area.
TriangulateSurface(Tolerance)
Breaks the polygon into triangles that each lie within it, within a tolerance.
public GeoTriangle2[] TriangulateSurface(Tolerance tolerance)
Parameters
toleranceToleranceThe tolerance deciding what counts as no area, and how near two edges may come.
Returns
- GeoTriangle2[]
The triangles covering the polygon, counter-clockwise whichever way the polygon runs; none when it encloses no area within the tolerance.
Remarks
A polygon that crosses itself is covered where MakeValid() says it covers, under the even-odd rule.
The triangles keep the shape's own corners while its rings stand apart, as TriangulateSurface(Tolerance) keeps them, a concave boundary followed rather than spanned. Rings that come within the point tolerance of each other, or cross, are read as the booleans read them and cut into strips at their corners instead: those triangles still lie within the material, but meet its edges at points of their own as well.