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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top