Geometry · function

solidVolume

The enclosed volume by the divergence theorem: the sum of each triangle's signed tetrahedron with the origin. Positive for a closed, outward-wound solid; meaningless for an open one.

Explained in Hello world, Meshes and geometry.

function solidVolume(solid: Solid): number
import { solidVolume } from '@driftengine/core';

Parameters

ParameterTypeDescription
solidSolid

In depth

Exact for any closed surface, T-junctions included, which is why the CSG tests can use it on a boolean's output where an edge-pairing check cannot.