FreeMat

- Main Page
- Related Pages

vtkSTLReader

Section: Visualization Toolkit IO Classes

# Usage

vtkSTLReader is a source object that reads ASCII or binary stereo lithography files (.stl files). The FileName must be specified to vtkSTLReader. The object automatically detects whether the file is ASCII or binary.

.stl files are quite inefficient since they duplicate vertex definitions. By setting the Merging boolean you can control whether the point data is merged after reading. Merging is performed by default, however, merging requires a large amount of temporary storage since a 3D hash table must be constructed.

To create an instance of class vtkSTLReader, simply invoke its constructor as follows

      obj = vtkSTLReader

# Methods

The class vtkSTLReader has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkSTLReader class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkSTLReader = obj.NewInstance ()`
- `vtkSTLReader = obj.SafeDownCast (vtkObject o)`
- `long = obj.GetMTime ()` - Overload standard modified time function. If locator is modified, then this object is modified as well.
- `obj.SetFileName (string )` - Specify file name of stereo lithography file.
- `string = obj.GetFileName ()` - Specify file name of stereo lithography file.
- `obj.SetMerging (int )` - Turn on/off merging of points/triangles.
- `int = obj.GetMerging ()` - Turn on/off merging of points/triangles.
- `obj.MergingOn ()` - Turn on/off merging of points/triangles.
- `obj.MergingOff ()` - Turn on/off merging of points/triangles.
- `obj.SetScalarTags (int )` - Turn on/off tagging of solids with scalars.
- `int = obj.GetScalarTags ()` - Turn on/off tagging of solids with scalars.
- `obj.ScalarTagsOn ()` - Turn on/off tagging of solids with scalars.
- `obj.ScalarTagsOff ()` - Turn on/off tagging of solids with scalars.
- `obj.SetLocator (vtkIncrementalPointLocator locator)` - Specify a spatial locator for merging points. By default an instance of vtkMergePoints is used.
- `vtkIncrementalPointLocator = obj.GetLocator ()` - Specify a spatial locator for merging points. By default an instance of vtkMergePoints is used.
- `obj.CreateDefaultLocator ()` - Create default locator. Used to create one when none is specified.