Re: mesh_volume and tetra_volume [message #40355] |
Mon, 09 August 2004 09:28  |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
"Robert Schaefer" <robertschaefer@gmx.de> wrote in message
news:bffaee64.0408090124.5906ed23@posting.google.com...
> Hello, I want to get the volume out of a 3d object.
> First i tried with mesh_volume, but the returned values weren't
> similar to my calculated. I checked with mesh_issolid: return value:1,
> so it ios solid and should return the volume.
> When i check with tetra_volume the volume is similar to my calculated
> volume.
>
> Now my question: what is the difference between mesh_volume and
> tetra_volume?
MESH_VOLUME works by summing:
( a dot ( b cross c ) ) / 6
for every triangle in the mesh where a, b, and c are the verts of each
triangle in the mesh. This effectively calculates the signed volume of a
tetrahedron formed by the origin and the 3 triangle verts for each triangle
and then adds them up.
TETRA_VOLUME just adds up the volume of all the tets in the mesh using the
same idea as above.
How big a difference are you seeing? Is there anything strange about your
mesh, like being self-intersecting? How did you generate both the polygonal
mesh and the tetrahedral mesh?
Karl
|
|
|