Skip to content

RibbonFilter ​

Introduction ​

vtkRibbonFilter is a filter to create oriented ribbons from lines defined in polygonal dataset. The orientation of the ribbon is along the line segments and perpendicular to "projected" line normals. Projected line normals are the original line normals projected to be perpendicular to the local line segment. An offset angle can be specified to rotate the ribbon with respect to the normal.

Methods ​

extend ​

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

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

getAngle ​

Get the angle (in degrees) of rotation about the line tangent used to orient the ribbon.

getDefaultNormal ​

Get the default normal used to orient the ribbon when no normals are provided in the input.

getDefaultNormalByReference ​

Get the default normal used to orient the ribbon when no normals are provided in the input.

getGenerateTCoords ​

Get the method used to generate texture coordinates.

getGenerateTCoordsAsString ​

Get the method used to generate texture coordinates as a string.

getTextureLength ​

Get the texture length, used when generating texture coordinates from length.

getUseDefaultNormal ​

Get whether to use the default normal to orient the ribbon when no normals are provided in the input.

getVaryWidth ​

Get whether to vary the width of the ribbon using scalar data.

getWidth ​

Get the width of the ribbon.

getWidthFactor ​

Get the width factor, used to scale the width when varying the width.

newInstance ​

Method used to create a new instance of vtkRibbonFilter

ArgumentTypeRequiredDescription
initialValuesIRibbonFilterInitialValuesNofor pre-setting some of its content

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setAngle ​

Set the angle (in degrees) of rotation about the line tangent used to orient the ribbon. Default is 0.0.

ArgumentTypeRequiredDescription
angleYesThe angle in degrees.

Returns ​

TypeDescription
true if the angle is set successfully.

setDefaultNormal ​

Set the default normal used to orient the ribbon when no normals are provided in the input. The default normal is a vector defined by three components (x,y,z). The default is (0,0,1).

ArgumentTypeRequiredDescription
defaultNormalYesThe default normal as an array of three numbers or a Vector3.

Returns ​

TypeDescription
true if the default normal is set successfully.

setDefaultNormalFrom ​

Set the default normal used to orient the ribbon when no normals are provided in the input. The default normal is a vector defined by three components (x,y,z). The default is (0,0,1).

Returns ​

TypeDescription
true if the default normal is set successfully.

setGenerateTCoords ​

Set the method used to generate texture coordinates. By default, texture coordinates are not generated.

ArgumentTypeRequiredDescription
generateTCoordsYesThe method to generate texture coordinates.

Returns ​

TypeDescription
true if the method is set successfully.

setTextureLength ​

Set the texture length, used when generating texture coordinates from length. The default is 1.0.

ArgumentTypeRequiredDescription
textureLengthYesThe texture length.

Returns ​

TypeDescription
true if the texture length is set successfully.

setUseDefaultNormal ​

Set whether to use the default normal to orient the ribbon when no normals are provided in the input. The default is false.

ArgumentTypeRequiredDescription
useDefaultNormalYesWhether to use the default normal.

Returns ​

TypeDescription
true if the flag is set successfully.

setVaryWidth ​

Set whether to vary the width of the ribbon using scalar data. By default, the width of the ribbon is uniform.

ArgumentTypeRequiredDescription
varyWidthYesWhether to vary the width of the ribbon.

Returns ​

TypeDescription
true if the flag is set successfully.

setWidth ​

Set the width of the ribbon. The width is the total width of the ribbon; the ribbon extends width/2 on either side of the line. The default is 0.5.

ArgumentTypeRequiredDescription
widthYesThe width of the ribbon.

Returns ​

TypeDescription
true if the width is set successfully.

setWidthFactor ​

Set the width factor, used to scale the width when varying the width. The default is 1.0.

ArgumentTypeRequiredDescription
widthFactorYesThe width factor.

Returns ​

TypeDescription
true if the width factor is set successfully.