On Sun, Jun 16, 2013 at 1:38 PM, Brecht Van Lommel <brechtvanlom...@pandora.be> wrote: > Indeed, you can compute the exact volume of a closed triangle mesh by > summing signed volumes of tetrahedra. The tessellation doesn't even > need to be any good, you can just use one tetrahedron for each > triangle, constructed from the triangle vertices and one other fixed > point (typically the origin). > http://stackoverflow.com/questions/1406029/how-to-calculate-the-volume-of-a-3d-mesh-object-the-surface-of-which-is-made-up > > By summing the centers of mass of these tetrahedra, weighted by the > signed volume, then I guess you get the center of mass of the whole > mesh too? I didn't check the math but intuitively it makes sense to > me. > > This algorithm does require the mesh to be closed. For non-closed > meshes the fixed point could perhaps be the center of mass as computed > now, that might give a reasonable approximation.
Note, that you can calculate the volume from Python/BMesh api - bmesh.calc_volume(), BM_mesh_calc_volume from C. http://www.blender.org/documentation/blender_python_api_2_67_release/bmesh.types.html#bmesh.types.BMesh.calc_volume _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers