VTK  9.3.0
vtkCleanPolyData.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
84#ifndef vtkCleanPolyData_h
85#define vtkCleanPolyData_h
86
87#include "vtkFiltersCoreModule.h" // For export macro
89
90VTK_ABI_NAMESPACE_BEGIN
92
93class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
94{
95public:
97 void PrintSelf(ostream& os, vtkIndent indent) override;
99
101
106 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
107 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
108 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
110
112
116 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
117 vtkGetMacro(Tolerance, double);
119
121
124 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
125 vtkGetMacro(AbsoluteTolerance, double);
127
129
132 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
133 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
134 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
136
138
141 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
142 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
143 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
145
147
150 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
151 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
152 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
154
156
162 vtkSetMacro(PointMerging, vtkTypeBool);
163 vtkGetMacro(PointMerging, vtkTypeBool);
164 vtkBooleanMacro(PointMerging, vtkTypeBool);
166
168
173 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
175
179 void CreateDefaultLocator(vtkPolyData* input = nullptr);
180
184 void ReleaseLocator() { this->SetLocator(nullptr); }
185
190
194 virtual void OperateOnPoint(double in[3], double out[3]);
195
199 virtual void OperateOnBounds(double in[6], double out[6]);
200
201 // This filter is difficult to stream.
202 // To get invariant results, the whole input must be processed at once.
203 // This flag allows the user to select whether strict piece invariance
204 // is required. By default it is on. When off, the filter can stream,
205 // but results may change.
206 vtkSetMacro(PieceInvariant, vtkTypeBool);
207 vtkGetMacro(PieceInvariant, vtkTypeBool);
208 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
209
211
216 vtkSetMacro(OutputPointsPrecision, int);
217 vtkGetMacro(OutputPointsPrecision, int);
219
220protected:
223
224 // Usual data generation method
227
229 double Tolerance;
236
239
240private:
241 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
242 void operator=(const vtkCleanPolyData&) = delete;
243};
244
245VTK_ABI_NAMESPACE_END
246#endif
merge duplicate points, and/or remove unused points and/or remove degenerate cells
virtual void OperateOnPoint(double in[3], double out[3])
Perform operation on a point.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ReleaseLocator()
Release locator.
virtual void OperateOnBounds(double in[6], double out[6])
Perform operation on bounds.
vtkTypeBool PointMerging
vtkTypeBool ConvertPolysToLines
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator.
vtkTypeBool ConvertLinesToPoints
static vtkCleanPolyData * New()
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkCleanPolyData() override
void CreateDefaultLocator(vtkPolyData *input=nullptr)
Create default locator.
virtual void SetLocator(vtkIncrementalPointLocator *locator)
Set/Get a spatial locator for speeding the search process.
vtkIncrementalPointLocator * Locator
vtkTypeBool ConvertStripsToPolys
vtkTypeBool ToleranceIsAbsolute
vtkTypeBool PieceInvariant
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.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:89
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_DOUBLE_MAX
Definition vtkType.h:154