Section: Visualization Toolkit Graphics Classes
To create an instance of class vtkMassProperties, simply invoke its constructor as follows
obj = vtkMassProperties
obj
is an instance of the vtkMassProperties class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkMassProperties = obj.NewInstance ()
vtkMassProperties = obj.SafeDownCast (vtkObject o)
double = obj.GetVolume ()
- Compute and return the projected volume.
Typically you should compare this volume to the value returned by GetVolume
if you get an error (GetVolume()-GetVolumeProjected())*10000 that is greater
than GetVolume() this should identify a problem:
* Either the polydata is not closed
* Or the polydata contains triangle that are flipped
double = obj.GetVolumeProjected ()
- Compute and return the volume projected on to each axis aligned plane.
double = obj.GetVolumeX ()
- Compute and return the volume projected on to each axis aligned plane.
double = obj.GetVolumeY ()
- Compute and return the volume projected on to each axis aligned plane.
double = obj.GetVolumeZ ()
- Compute and return the weighting factors for the maximum unit
normal component (MUNC).
double = obj.GetKx ()
- Compute and return the weighting factors for the maximum unit
normal component (MUNC).
double = obj.GetKy ()
- Compute and return the weighting factors for the maximum unit
normal component (MUNC).
double = obj.GetKz ()
- Compute and return the area.
double = obj.GetSurfaceArea ()
- Compute and return the min cell area.
double = obj.GetMinCellArea ()
- Compute and return the max cell area.
double = obj.GetMaxCellArea ()
- Compute and return the normalized shape index. This characterizes the
deviation of the shape of an object from a sphere. A sphere's NSI
is one. This number is always >= 1.0.
double = obj.GetNormalizedShapeIndex ()