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: Polyface | PolyfaceVisitor, result?: ConvexClipPlaneSet): { clipper: ConvexClipPlaneSet, volume: number }
Parameter | Type | Description |
---|---|---|
convexMesh | Polyface | PolyfaceVisitor | 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
- clipping/ConvexClipPlaneSet.ts Line 754
Last Updated: 30 November, 2023