Skip to content

PolyData ​

Introduction ​

vtkPolyData is a dataset that represents a geometric structure consisting of vertices, lines, polygons, and/or strips.

Methods ​

buildCells ​

Create data structure that allows random access of cells.

Create upward links from points to cells that use each point. Enables topologically complex queries.

ArgumentTypeRequiredDescription
initialSizeNumberYes

extend ​

Method used to decorate a given object (publicAPI+model) with vtkPolyData characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPolyDataInitialValuesNo(default: {})

getCell ​

If you know the type of cell, you may provide it to improve performances.

ArgumentTypeRequiredDescription
cellIdNumberYes
cellHintYes

getCellEdgeNeighbors ​

Get the neighbors at an edge.

ArgumentTypeRequiredDescription
cellIdNumberYesThe Id of the cell.
point1NumberYesThe first point id.
point2NumberYesThe second point id.

Returns ​

TypeDescription
Array[Number]Neighbor cell ids.

getCellPoints ​

Get a list of point ids that define a cell.

ArgumentTypeRequiredDescription
cellIdNumberYesThe Id of the cell.

getCellType ​

Get the type of the cell

ArgumentTypeRequiredDescription
cellIdNumberYesThe Id of the cell.

getCells ​

Get the cell array defining cells.

getLines ​

Get the cell array defining lines.

Get the links between points and cells.

getMaxCellSize ​

Get the maximum cell size. Returns 0 if there is no cell.

getNumberOfCells ​

Determine the number of cells composing the polydata.

getNumberOfLines ​

Determine the number of lines composing the polydata.

getNumberOfPoints ​

Determine the number of points composing the polydata.

getNumberOfPolys ​

Determine the number of polys composing the polydata.

getNumberOfStrips ​

Determine the number of strips composing the polydata.

getNumberOfVerts ​

Determine the number of vertices composing the polydata.

getPointCells ​

Topological inquiry to get cells using point.

ArgumentTypeRequiredDescription
ptIdYes

getPolys ​

Get the cell array defining polys.

getStrips ​

Get the cell array defining strips.

getVerts ​

Get the cell array defining vertices. If there are no vertices, an empty array will be returned (convenience to simplify traversal).

initialize ​

Empty the cells and initialize the point set.

newInstance ​

Method used to create a new instance of vtkPolyData.

ArgumentTypeRequiredDescription
initialValuesIPolyDataInitialValuesNofor pre-setting some of its content

setLines ​

Set the cell array defining lines.

ArgumentTypeRequiredDescription
linesvtkCellArrayYesThe cell array defining lines.

setPolys ​

Set the cell array defining polys.

ArgumentTypeRequiredDescription
polysvtkCellArrayYesThe cell array defining polys.

setStrips ​

Set the cell array defining strips.

ArgumentTypeRequiredDescription
stripsvtkCellArrayYesThe cell array defining strips.

setVerts ​

Set the cell array defining vertices.

ArgumentTypeRequiredDescription
vertsvtkCellArrayYesThe cell array defining vertices.