[vtkusers] Volume calculation

Ursula Kretschmer ursula.kretschmer at iww.uni-freiburg.de
Wed May 12 05:40:40 EDT 2004


Dear VTK list,

I would like to calculate the volume of a triangulated body. To test my 
algorithm I have built up a cube with an edge length of 1. The 
vtkPolyData object which represents my cube consists of 8 points and 6 
polygons. It is transformed by vtkTriangleFilter and then passed to 
vtkMassProperties. With the method vtkMassProperties.GetVolume() I would 
like to calculate the volume of the cube. Unfortunately the result is 
0.6 instead of 1.0.

Does anybody have an idea what I did wrong? I already checked the 
direction of the polygon normals.

I am using VTK with C# using the vtkDotNetWrapper.

Thanks in advance for any advice,
Ursula
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ursula.kretschmer.vcf
Type: text/x-vcard
Size: 272 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040512/46ba1543/attachment.vcf>


More information about the vtkusers mailing list