VTK  9.3.20240510
vtkSTLReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
135#ifndef vtkSTLReader_h
136#define vtkSTLReader_h
137
139#include "vtkIOGeometryModule.h" // For export macro
140
141VTK_ABI_NAMESPACE_BEGIN
142class vtkCellArray;
143class vtkFloatArray;
145class vtkPoints;
146
147class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
148{
149public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
156 static vtkSTLReader* New();
157
163
165
168 vtkSetMacro(Merging, vtkTypeBool);
169 vtkGetMacro(Merging, vtkTypeBool);
170 vtkBooleanMacro(Merging, vtkTypeBool);
172
174
177 vtkSetMacro(ScalarTags, vtkTypeBool);
178 vtkGetMacro(ScalarTags, vtkTypeBool);
179 vtkBooleanMacro(ScalarTags, vtkTypeBool);
181
183
188 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
190
200 vtkGetStringMacro(Header);
201
208 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
209
210protected:
212 ~vtkSTLReader() override;
213
218
222 vtkSetStringMacro(Header);
223 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
224
228 char* Header;
230
233 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
234 int GetSTLFileType(const char* filename);
235
236private:
237 vtkSTLReader(const vtkSTLReader&) = delete;
238 void operator=(const vtkSTLReader&) = delete;
239};
240
241VTK_ABI_NAMESPACE_END
242#endif
Superclass for algorithms that read models from a file.
object to represent cell connectivity
dynamic, self-adjusting array of float
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
read ASCII or binary stereo lithography files
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIncrementalPointLocator * Locator
vtkIncrementalPointLocator * NewDefaultLocator()
Create default locator.
vtkTypeBool ScalarTags
int GetSTLFileType(const char *filename)
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkUnsignedCharArray * BinaryHeader
static vtkSTLReader * New()
Construct object with merging set to true.
vtkTypeBool Merging
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual void SetBinaryHeader(vtkUnsignedCharArray *binaryHeader)
~vtkSTLReader() override
bool ReadASCIISTL(FILE *fp, vtkPoints *, vtkCellArray *, vtkFloatArray *scalars=nullptr)
bool ReadBinarySTL(FILE *fp, vtkPoints *, vtkCellArray *)
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270