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
26#ifndef vtkSTLReader_h
27#define vtkSTLReader_h
28
30#include "vtkIOGeometryModule.h" // For export macro
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkCellArray;
34class vtkFloatArray;
36class vtkPoints;
37
38class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
47 static vtkSTLReader* New();
48
54
56
59 vtkSetMacro(Merging, vtkTypeBool);
60 vtkGetMacro(Merging, vtkTypeBool);
61 vtkBooleanMacro(Merging, vtkTypeBool);
63
65
68 vtkSetMacro(ScalarTags, vtkTypeBool);
69 vtkGetMacro(ScalarTags, vtkTypeBool);
70 vtkBooleanMacro(ScalarTags, vtkTypeBool);
72
74
79 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
81
91 vtkGetStringMacro(Header);
92
99 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
100
101protected:
103 ~vtkSTLReader() override;
104
109
113 vtkSetStringMacro(Header);
114 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
115
119 char* Header;
121
124 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
125 int GetSTLFileType(const char* filename);
126
127private:
128 vtkSTLReader(const vtkSTLReader&) = delete;
129 void operator=(const vtkSTLReader&) = delete;
130};
131
132VTK_ABI_NAMESPACE_END
133#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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:29
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