[vtkusers] Volume calculation

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Wed May 12 05:57:53 EDT 2004


I just tried with with vtkCubesource->vtkTrianglefilter->vtkMassproperties
and I get the correct answer.
Check your cube is correctly formed.
  VolumeX: 1
  VolumeY: 1
  VolumeZ: 1
  Kx: 0.333333
  Ky: 0.333333
  Kz: 0.333333
  Volume:  1
  Surface Area: 6
  Normalized Shape Index: 1.11387

JB


----- Original Message ----- 
From: "Ursula Kretschmer" <ursula.kretschmer at iww.uni-freiburg.de>
To: <vtkusers at vtk.org>
Sent: Wednesday, May 12, 2004 10:40 AM
Subject: [vtkusers] Volume calculation


> 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
>




More information about the vtkusers mailing list