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=========================================================================*/
81#ifndef vtkCleanPolyData_h
82#define vtkCleanPolyData_h
83
84#include "vtkFiltersCoreModule.h" // For export macro
86
88
89class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
90{
91public:
93 void PrintSelf(ostream& os, vtkIndent indent) override;
95
97
102 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
103 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
104 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
106
108
112 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
113 vtkGetMacro(Tolerance, double);
115
117
120 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
121 vtkGetMacro(AbsoluteTolerance, double);
123
125
128 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
129 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
130 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
132
134
137 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
138 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
139 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
141
143
146 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
147 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
148 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
150
152
158 vtkSetMacro(PointMerging, vtkTypeBool);
159 vtkGetMacro(PointMerging, vtkTypeBool);
160 vtkBooleanMacro(PointMerging, vtkTypeBool);
162
164
169 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
171
175 void CreateDefaultLocator(vtkPolyData* input = nullptr);
176
180 void ReleaseLocator() { this->SetLocator(nullptr); }
181
186
190 virtual void OperateOnPoint(double in[3], double out[3]);
191
195 virtual void OperateOnBounds(double in[6], double out[6]);
196
197 // This filter is difficult to stream.
198 // To get invariant results, the whole input must be processed at once.
199 // This flag allows the user to select whether strict piece invariance
200 // is required. By default it is on. When off, the filter can stream,
201 // but results may change.
202 vtkSetMacro(PieceInvariant, vtkTypeBool);
203 vtkGetMacro(PieceInvariant, vtkTypeBool);
204 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
205
207
212 vtkSetMacro(OutputPointsPrecision, int);
213 vtkGetMacro(OutputPointsPrecision, int);
215
216protected:
219
220 // Usual data generation method
223
225 double Tolerance;
232
235
236private:
237 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
238 void operator=(const vtkCleanPolyData&) = delete;
239};
240
241#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:34
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:85
int vtkTypeBool
Definition vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_DOUBLE_MAX
Definition vtkType.h:165