Hi Andy,<br /><br />
I wrote a filter which can be applied to an unstructured grid to compute the sums for all cells.<br />
The basic idea is to compute the volume of each cells just by applying this filter to unstructured grids in a usual manner:<br />
<pre> cellMassProperties->SetInputConnection(ugrid->GetProducerPort());</pre>
Then retrieve the volume of a single cell, e.g. with cellId like follows:
<pre> cellMassProperties->GetCellSum(<span style=' color: Maroon;'>36</span>);</pre>
or get the volume of the whole grid:
<pre> cellMassProperties->GetTotalSum(3);</pre>
NOTE: it's in an alpha state<br />
Some basic tests with unstructured grid containing tetrahedrons and hexahedrons<br />
and a cross-check with vtkMassProperties for the total volume has been done so far<br />
<br />
<a href="http://www.femcs.com/vtkjk/" target="_top" rel="nofollow" link="external">Doxygen documentation for vtkjkCellMassProperties filter</a><br />
<a href="http://www.femcs.com/vtkjk/vtkJkCellMassProperties.zip" target="_top" rel="nofollow" link="external">zipped source for vtkjkCellMassProperties filter with an example</a><br /><br />
It's probably not perfect (it's a long time ago I used to develop in C++ and I'm relatively new to VTK)<br />Nevertheless I did my very best.<br /><br />
Let me know what you think of it. Any write-ups and suggestions are welcome.<br /><br />
with best regards<br />
Jochen
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Polyhedral-volume-computation-tp5713778p5713939.html">Re: Polyhedral volume computation</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>