Frage

I am wondering if anyone knows how to get the volume of a 3D concave shape? The Matlab build-in function can only calculate the volume of a convex shape. For example,

[K, V] = convhulln(shape.vertices); 

V is the volume. Here the shape is defined by a mesh with vertices and faces.

Thanks very much.

Best, A

War es hilfreich?

Lösung

If your shape isn't too complicated you can compute the volume of its convex hull and subtract the volumes of all the convex hulls of its concavities.

Otherwise, decompose your concave shape into a set of disjoint convex shapes and sum their volumes.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top