Table of Contents

Method TriangulateSurface

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

TriangulateSurface()

Breaks the face into triangles that each lie within its material, holes included, using the default tolerance.

public GeoTriangle3[] TriangulateSurface()

Returns

GeoTriangle3[]

TriangulateSurface(Tolerance)

Breaks the face into triangles that each lie within its material, holes included, within a tolerance.

public GeoTriangle3[] TriangulateSurface(Tolerance tolerance)

Parameters

tolerance Tolerance

The tolerance deciding what counts as a degenerate triangle.

Returns

GeoTriangle3[]

The triangles covering the face, wound to share its normal.

Remarks

This is the triangulation to use wherever the mesh stands for the surface itself — ray casting, clash detection, distance to a body. Unlike Triangulate() every triangle lies inside the face, a hole is left empty rather than covered over, and a concave boundary is followed rather than spanned.

The triangles are clipped from the face's own corners while its rings stand apart. A face whose rings come within the point tolerance of each other (holes sharing an edge, a hole against the boundary) or cross, or whose loop the clipping cannot reduce, is cut into strips at its corners instead, its material read as the booleans read it: holes that touch or overlap are taken together, and one reaching past the boundary takes away only what it covers. Those triangles still lie within the material and leave every hole open, but they meet the face's edges at points of their own as well as at its corners. A face with nothing left of it gives none.

Such a face used to be handed back as the fan of its boundary, laid across every hole: a slab whose pits the clipping could not get round was meshed as 5 391 m2 for its 1 836.