VTK  9.2.6
vtkCleanPolyData.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCleanPolyData.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
87#ifndef vtkCleanPolyData_h
88#define vtkCleanPolyData_h
89
90#include "vtkFiltersCoreModule.h" // For export macro
92
94
95class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
96{
97public:
99 void PrintSelf(ostream& os, vtkIndent indent) override;
101
103
108 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
109 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
110 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
112
114
118 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
119 vtkGetMacro(Tolerance, double);
121
123
126 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
127 vtkGetMacro(AbsoluteTolerance, double);
129
131
134 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
135 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
136 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
138
140
143 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
144 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
145 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
147
149
152 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
153 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
154 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
156
158
164 vtkSetMacro(PointMerging, vtkTypeBool);
165 vtkGetMacro(PointMerging, vtkTypeBool);
166 vtkBooleanMacro(PointMerging, vtkTypeBool);
168
170
175 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
177
181 void CreateDefaultLocator(vtkPolyData* input = nullptr);
182
186 void ReleaseLocator() { this->SetLocator(nullptr); }
187
192
196 virtual void OperateOnPoint(double in[3], double out[3]);
197
201 virtual void OperateOnBounds(double in[6], double out[6]);
202
203 // This filter is difficult to stream.
204 // To get invariant results, the whole input must be processed at once.
205 // This flag allows the user to select whether strict piece invariance
206 // is required. By default it is on. When off, the filter can stream,
207 // but results may change.
208 vtkSetMacro(PieceInvariant, vtkTypeBool);
209 vtkGetMacro(PieceInvariant, vtkTypeBool);
210 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
211
213
218 vtkSetMacro(OutputPointsPrecision, int);
219 vtkGetMacro(OutputPointsPrecision, int);
221
222protected:
225
226 // Usual data generation method
229
231 double Tolerance;
238
241
242private:
243 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
244 void operator=(const vtkCleanPolyData&) = delete;
245};
246
247#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:40
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:91
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165