VTK  9.3.0
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
35#ifndef vtkSTLReader_h
36#define vtkSTLReader_h
37
39#include "vtkIOGeometryModule.h" // For export macro
40
41VTK_ABI_NAMESPACE_BEGIN
42class vtkCellArray;
43class vtkFloatArray;
45class vtkPoints;
46
47class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
48{
49public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
56 static vtkSTLReader* New();
57
63
65
68 vtkSetMacro(Merging, vtkTypeBool);
69 vtkGetMacro(Merging, vtkTypeBool);
70 vtkBooleanMacro(Merging, vtkTypeBool);
72
74
77 vtkSetMacro(ScalarTags, vtkTypeBool);
78 vtkGetMacro(ScalarTags, vtkTypeBool);
79 vtkBooleanMacro(ScalarTags, vtkTypeBool);
81
83
88 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
90
100 vtkGetStringMacro(Header);
101
108 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
109
110protected:
112 ~vtkSTLReader() override;
113
118
122 vtkSetStringMacro(Header);
123 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
124
128 char* Header;
130
133 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
134 int GetSTLFileType(const char* filename);
135
136private:
137 vtkSTLReader(const vtkSTLReader&) = delete;
138 void operator=(const vtkSTLReader&) = delete;
139};
140
141VTK_ABI_NAMESPACE_END
142#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:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:38
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