Skip to content

DiskSource ​

Introduction ​

vtkDiskSource creates a polygonal disk with a hole in the center. The disk has zero height. The user can specify the inner and outer radius of the disk, the radial and circumferential resolution of the polygonal representation, and the center and plane normal of the disk (i.e., the center and disk normal control the position and orientation of the disk).

Usage ​

js
import vtkDiskSource from '@kitware/vtk.js/Filters/Sources/DiskSource';

const disk = vtkDiskSource.newInstance({ radius: 1, resolution: 80 });
const polydata = disk.getOutputData();

Methods ​

extend ​

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

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

getCenter ​

Get the center of the disk.

getCircumferentialResolution ​

Get the circumferential resolution of the disk.

getInnerRadius ​

Get the inner radius of the disk.

getNormal ​

Get the normal of the disk.

getOuterRadius ​

Get the outer radius of the disk.

getPointType ​

Get the point type used for the disk.

getRadialResolution ​

Get the radial resolution of the disk.

newInstance ​

Method used to create a new instance of vtkDiskSource.

ArgumentTypeRequiredDescription
initialValuesIDiskSourceInitialValuesNofor pre-setting some of its content

requestData ​

Expose methods

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setCenter ​

Set the center of the disk.

ArgumentTypeRequiredDescription
centerVector3Yes

setCircumferentialResolution ​

Set the circumferential resolution of the disk.

ArgumentTypeRequiredDescription
resolutionnumberYes

setInnerRadius ​

Set the inner radius of the disk.

ArgumentTypeRequiredDescription
radiusnumberYes

setNormal ​

Set the normal of the disk.

ArgumentTypeRequiredDescription
normalVector3Yes

setOuterRadius ​

Set the outer radius of the disk.

ArgumentTypeRequiredDescription
radiusnumberYes

setPointType ​

Set the point type used for the disk.

ArgumentTypeRequiredDescription
typestringYes

setRadialResolution ​

Set the radial resolution of the disk.

ArgumentTypeRequiredDescription
resolutionnumberYes