createConvexPolyface MethodStatic

Create a convex clip set from a convex mesh.

  • Create a plane for each facet.
  • Assemble the planes as a single clip plane set.
  • If the facets are closed by edge pairing, use the sign of the computed volume to point the plane normals inward.
  • If the facets are not closed, the facet orientation determines plane orientation.
  • The implication of this is that if the facets are a convex volume, the returned clip plane set is convex.

createConvexPolyface(convexMesh: PolyfaceVisitor | Polyface, result?: ConvexClipPlaneSet): { clipper: ConvexClipPlaneSet, volume: number }

@returns clipper and volume (zero if mesh is not closed)

Parameter Type Description
convexMesh PolyfaceVisitor | Polyface input mesh. For best results, the mesh should be closed and convex.
result ConvexClipPlaneSet optional preallocated result to reuse and return

Returns - { clipper: ConvexClipPlaneSet, volume: number }

clipper and volume (zero if mesh is not closed)

Defined in

Last Updated: 14 November, 2024