Section: Visualization Toolkit Filtering Classes
To create an instance of class vtkPolygon, simply invoke its constructor as follows
obj = vtkPolygon
obj
is an instance of the vtkPolygon class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkPolygon = obj.NewInstance ()
vtkPolygon = obj.SafeDownCast (vtkObject o)
int = obj.GetCellType ()
- See the vtkCell API for descriptions of these methods.
int = obj.GetCellDimension ()
- See the vtkCell API for descriptions of these methods.
int = obj.GetNumberOfEdges ()
- See the vtkCell API for descriptions of these methods.
int = obj.GetNumberOfFaces ()
- See the vtkCell API for descriptions of these methods.
vtkCell = obj.GetEdge (int edgeId)
- See the vtkCell API for descriptions of these methods.
vtkCell = obj.GetFace (int )
- See the vtkCell API for descriptions of these methods.
int = obj.CellBoundary (int subId, double pcoords[3], vtkIdList pts)
- See the vtkCell API for descriptions of these methods.
obj.Contour (double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray verts, vtkCellArray lines, vtkCellArray polys, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, vtkIdType cellId, vtkCellData outCd)
- See the vtkCell API for descriptions of these methods.
obj.Clip (double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray tris, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, vtkIdType cellId, vtkCellData outCd, int insideOut)
- See the vtkCell API for descriptions of these methods.
int = obj.Triangulate (int index, vtkIdList ptIds, vtkPoints pts)
- See the vtkCell API for descriptions of these methods.
obj.Derivatives (int subId, double pcoords[3], double values, int dim, double derivs)
- See the vtkCell API for descriptions of these methods.
int = obj.IsPrimaryCell ()
- Compute the area of a polygon. This is a convenience function
which simply calls static double ComputeArea(vtkPoints *p,
vtkIdType numPts, vtkIdType *pts, double normal[3]);
with the appropriate parameters from the instantiated vtkPolygon.
double = obj.ComputeArea ()
- Compute the area of a polygon. This is a convenience function
which simply calls static double ComputeArea(vtkPoints *p,
vtkIdType numPts, vtkIdType *pts, double normal[3]);
with the appropriate parameters from the instantiated vtkPolygon.
obj.InterpolateFunctions (double pcoords[3], double sf)
- Compute the interpolation functions/derivatives
(aka shape functions/derivatives)
obj.InterpolateDerivs (double pcoords[3], double derivs)
- Compute the interpolation functions/derivatives
(aka shape functions/derivatives)
obj.ComputeWeights (double x[3], double weights)
- Compute interpolation weights using 1/r**2 normalized sum.
@deprecated Replaced by vtkPolygon::InterpolateFunctions as of VTK 5.2
int = obj.Triangulate (vtkIdList outTris)
- Triangulate this polygon. The user must provide the vtkIdList outTris.
On output, the outTris list contains the ids of the points defining
the triangulation. The ids are ordered into groups of three: each
three-group defines one triangle.
int = obj.NonDegenerateTriangulate (vtkIdList outTris)
- Same as Triangulate(vtkIdList *outTris)
but with a first pass to split the polygon into non-degenerate polygons.