mesh_volume
- compas_cgal.measure.mesh_volume(mesh)
Compute the volume of a closed triangle mesh.
- Parameters:
- mesh
compas_cgal.types.VerticesFaces
The mesh.
- mesh
- Returns:
- float
The volume of the mesh.
Examples
>>> from compas.geometry import Box >>> from compas_cgal.measure import mesh_volume
>>> box = Box(1) >>> mesh = box.to_vertices_and_faces(triangulated=True)
>>> mesh_volume(mesh) 1.0