Section: Visualization Toolkit Filtering Classes
This algorithm is based on edge subdivision. An error metric along each edge is evaluated, and if the error is greater than some tolerance, the edge is subdivided (as well as all connected 2D and 3D cells). The process repeats until the error metric is satisfied.
A significant issue addressed by this algorithm is to insure face compatibility across neigboring cells. That is, diagonals due to face triangulation must match to insure that the mesh is compatible. The algorithm employs a precomputed table to accelerate the tessellation process. The table was generated with the help of vtkOrderedTriangulator; the basic idea is that the choice of diagonal is made by considering the relative value of the point ids.
To create an instance of class vtkGenericCellTessellator, simply invoke its constructor as follows
obj = vtkGenericCellTessellator
obj
is an instance of the vtkGenericCellTessellator class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkGenericCellTessellator = obj.NewInstance ()
vtkGenericCellTessellator = obj.SafeDownCast (vtkObject o)
obj.TessellateFace (vtkGenericAdaptorCell cell, vtkGenericAttributeCollection att, vtkIdType index, vtkDoubleArray points, vtkCellArray cellArray, vtkPointData internalPd)
- Tessellate a face of a 3D `cell'. The face is specified by the
index value.
The result is a set of smaller linear triangles in `cellArray' with
`points' and point data `internalPd'.
\pre cell_exists: cell!=0
\pre valid_dimension: cell->GetDimension()==3
\pre valid_index_range: (index>=0) && (index<cell->GetNumberOfBoundaries(2))
\pre att_exists: att!=0
\pre points_exists: points!=0
\pre cellArray_exists: cellArray!=0
\pre internalPd_exists: internalPd!=0
obj.Tessellate (vtkGenericAdaptorCell cell, vtkGenericAttributeCollection att, vtkDoubleArray points, vtkCellArray cellArray, vtkPointData internalPd)
- Tessellate a 3D `cell'. The result is a set of smaller linear
tetrahedra in `cellArray' with `points' and point data `internalPd'.
\pre cell_exists: cell!=0
\pre valid_dimension: cell->GetDimension()==3
\pre att_exists: att!=0
\pre points_exists: points!=0
\pre cellArray_exists: cellArray!=0
\pre internalPd_exists: internalPd!=0
obj.Triangulate (vtkGenericAdaptorCell cell, vtkGenericAttributeCollection att, vtkDoubleArray points, vtkCellArray cellArray, vtkPointData internalPd)
- Triangulate a 2D `cell'. The result is a set of smaller linear triangles
in `cellArray' with `points' and point data `internalPd'.
\pre cell_exists: cell!=0
\pre valid_dimension: cell->GetDimension()==2
\pre att_exists: att!=0
\pre points_exists: points!=0
\pre cellArray_exists: cellArray!=0
\pre internalPd_exists: internalPd!=0
obj.SetErrorMetrics (vtkCollection someErrorMetrics)
- Specify the list of error metrics used to decide if an edge has to be
splitted or not. It is a collection of vtkGenericSubdivisionErrorMetric-s.
vtkCollection = obj.GetErrorMetrics ()
- Specify the list of error metrics used to decide if an edge has to be
splitted or not. It is a collection of vtkGenericSubdivisionErrorMetric-s.
obj.Initialize (vtkGenericDataSet ds)
- Initialize the tessellator with a data set `ds'.
obj.InitErrorMetrics (vtkGenericDataSet ds)
- Init the error metric with the dataset. Should be called in each filter
before any tessellation of any cell.
int = obj.GetMeasurement ()
- If true, measure the quality of the fixed subdivision.
obj.SetMeasurement (int )
- If true, measure the quality of the fixed subdivision.
obj.GetMaxErrors (double errors)
- Get the maximum error measured after the fixed subdivision.
\pre errors_exists: errors!=0
\pre valid_size: sizeof(errors)==GetErrorMetrics()->GetNumberOfItems()