[vtkusers] torus volume

Petr Vokac vok at ujv.cz
Mon Feb 4 05:34:06 EST 2013


Hello,

I am trying to calculate torus volume using 
vtkMassProperties. 
I did three attempts with extrusion of
1) vtkdisksource
2) vtkcylindersource
3) generated polydata
see attached python script.

Graphics looks good, however calculated 
volume is not correct.

Output for the example is:

1 disksource:
VTK Volume           14.775676 m3
VTK Projected Volume -14.775676 m3
Toroid Volume        14.804407 m3
Number of edges      360

2 cylinder source
VTK Volume           0.000000 m3
VTK Projected Volume -0.000000 m3
Toroid Volume        14.804407 m3
Number of edges      240

3 from points
VTK Volume           29.551352 m3
VTK Projected Volume 29.551352 m3
Toroid Volume        14.804407 m3
Number of edges      0

What I am doing wrong?
Thank you for any hint.

Petr Vokac
UJV Rez, a.s.




-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: torus.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130204/42c3f752/attachment.asc>


More information about the vtkusers mailing list