Skip to main content

triangulate

manifold-3d


manifold-3d / manifold-encapsulated-types / triangulate

Function: triangulate()

triangulate(polygons, epsilon?, allowConvex?): Vec3[]

Defined in: manifold-3d/manifold-encapsulated-types.d.ts:35

Triangulates a set of /epsilon-valid polygons.

Parameters

polygons

Polygons

The set of polygons, wound CCW and representing multiple polygons and/or holes.

epsilon?

number

The value of epsilon, bounding the uncertainty of the input.

allowConvex?

boolean

If true (default), the triangulator will use a fast triangulation if the input is convex, falling back to ear-clipping if not. The triangle quality may be lower, so set to false to disable this optimization.

Returns

Vec3[]

The triangles, referencing the original polygon points in order.

See

C++ API: Triangulation