ShrinkPolyData
Introduction
vtkShrinkPolyData shrinks cells composing a polygonal dataset (e.g., vertices, lines, polygons, and triangle strips) towards their centroid. The centroid of a cell is computed as the average position of the cell points. Shrinking results in disconnecting the cells from one another. The output dataset type of this filter is polygonal data.
During execution the filter passes its input cell data to its output. Point data attributes are copied to the points created during the shrinking process.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkShrinkPolyData characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IShrinkPolyDataInitialValues | No | (default: {}) |
getShrinkFactor
Get the shrink factor.
newInstance
Method used to create a new instance of vtkShrinkPolyData.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IShrinkPolyDataInitialValues | No | for pre-setting some of its content |
requestData
Expose methods
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setShrinkFactor
Set the shrink factor.
| Argument | Type | Required | Description |
|---|---|---|---|
shrinkFactor | Number | Yes |
shrinkLine
Shrink two points towards their midpoint by a shrink factor.
| Argument | Type | Required | Description |
|---|---|---|---|
p1 | Vector3 | Yes | - The [x, y, z] coordinates of the first point |
p2 | Vector3 | Yes | - The [x, y, z] coordinates of the second point |
shrinkFactor | number | Yes | - The shrink factor (0.0 to 1.0) |
shrunkPoints | Array[Number] | No | - Optional array to store the shrunk points |
Returns
| Type | Description |
|---|---|
| Array[Number] | Array containing the two new points |