STLReader
Introduction
vtkSTLReader is a source object that reads ASCII or binary stereo lithography files (.stl files). The object automatically detects whether the file is ASCII or binary. .stl files are quite inefficient since they duplicate vertex definitions.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkSTLReader 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 | ISTLReaderInitialValues | No | (default: {}) |
getBaseURL
getDataAccessHelper
getRemoveDuplicateVertices
Get tolerance when removeDuplicateVertices is set
getUrl
Get the url of the object to load.
loadData
Load the object data.
| Argument | Type | Required | Description |
|---|---|---|---|
options | ISTLReaderOptions | No |
newInstance
Method used to create a new instance of vtkSTLReader
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ISTLReaderInitialValues | No | for pre-setting some of its content |
parse
Parse data.
| Argument | Type | Required | Description |
|---|---|---|---|
content | String or ArrayBuffer | Yes | The content to parse. |
parseAsArrayBuffer
Parse data as ArrayBuffer.
| Argument | Type | Required | Description |
|---|---|---|---|
content | ArrayBuffer | Yes | The content to parse. |
parseAsText
Parse data as text.
| Argument | Type | Required | Description |
|---|---|---|---|
content | String | Yes | The content to parse. |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setDataAccessHelper
| Argument | Type | Required | Description |
|---|---|---|---|
dataAccessHelper | Yes |
setRemoveDuplicateVertices
Turn on/off automatic removeDuplicateVertices After reading the STL file, if tolerance is >= 0, then points with the same coordinates at 10 power tolerance are merged. For a smooth rendering, you might want to compute normals with vtkPolyDataNormals.
| Argument | Type | Required | Description |
|---|---|---|---|
tolerance | Number | Yes |
setUrl
Set the url of the object to load.
| Argument | Type | Required | Description |
|---|---|---|---|
url | String | Yes | the url of the object to load. |
option | ISTLReaderOptions | No | The STL reader options. |