VTK  9.7.20260731
vtkOCCTPDCReader.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
27
28#ifndef vtkOCCTPDCReader_h
29#define vtkOCCTPDCReader_h
30
32#include <vtkResourceStream.h> // For providing stream support
33#include <vtkSmartPointer.h> // For holding onto a provided stream
34
35#include "vtkIOOCCTModule.h" // For export macro
36
37VTK_ABI_NAMESPACE_BEGIN
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
45 enum Format : unsigned int
46 {
47 UNSUPPORTED, // This can result when trying to process an unsupported file or stream
53 };
54
56
66 vtkSetClampMacro(FileFormat, unsigned int, Format::AUTO, Format::XBF);
69
75
77
81 vtkSetSmartPointerMacro(Stream, vtkResourceStream);
82 vtkGetSmartPointerMacro(Stream, vtkResourceStream);
84
86
91 vtkSetMacro(LinearDeflection, double);
92 vtkGetMacro(LinearDeflection, double);
93
95
100 vtkGetMacro(RelativeDeflection, bool);
101 vtkSetMacro(RelativeDeflection, bool);
102 vtkBooleanMacro(RelativeDeflection, bool);
104
106
118 vtkGetMacro(CreateRedundantMap, bool);
119 vtkSetMacro(CreateRedundantMap, bool);
120 vtkBooleanMacro(CreateRedundantMap, bool);
122
124
129 vtkGetMacro(AngularDeflection, double);
130 vtkSetMacro(AngularDeflection, double);
132
134
138 vtkGetMacro(ReadWire, bool);
139 vtkSetMacro(ReadWire, bool);
140 vtkBooleanMacro(ReadWire, bool);
143
148 void SetRootNodeName(const char* name);
151
153
160 static bool CanReadFile(vtkResourceStream* stream);
161 static bool CanReadFile(vtkResourceStream* stream, Format& format);
163
167 static std::string FormatToString(unsigned int format);
168
169protected:
172
174
175private:
176 vtkOCCTPDCReader(const vtkOCCTPDCReader&) = delete;
177 void operator=(const vtkOCCTPDCReader&) = delete;
178
183 Format DetermineDataFormat();
184 class vtkInternals;
185 std::unique_ptr<vtkInternals> Internals;
186
187 char* FileName = nullptr;
189 std::string RootNodeName = "Root";
190 double LinearDeflection = 0.1;
191 double AngularDeflection = 0.5;
192 bool RelativeDeflection = false;
193 bool ReadWire = false;
194 unsigned int FileFormat = Format::AUTO;
195 bool CreateRedundantMap = false;
196};
197
198VTK_ABI_NAMESPACE_END
199#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkGetFilePathMacro(FileName)
Get/Set the file name.
void SetRootNodeName(const char *name)
Get/Set the name of the assembly's root node.
vtkGetCharFromStdStringMacro(RootNodeName)
Get/Set the name of the assembly's root node.
static bool CanReadFile(vtkResourceStream *stream)
Test to see if reader can the stream.
static vtkOCCTPDCReader * New()
static std::string FormatToString(unsigned int format)
Convert a format enum into a string.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static bool CanReadFile(vtkResourceStream *stream, Format &format)
Test to see if reader can the stream.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Methods for subclasses to override to handle different pipeline requests.
vtkSetFilePathMacro(FileName)
Get/Set the file name.
~vtkOCCTPDCReader() override
Abstract class used for custom streams.
Hold a reference to a vtkObjectBase instance.