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=========================================================================*/
96#ifndef vtkCleanPolyData_h
97#define vtkCleanPolyData_h
98
99#include "vtkFiltersCoreModule.h" // For export macro
100#include "vtkPolyDataAlgorithm.h"
101
103
104class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
105{
106public:
108 void PrintSelf(ostream& os, vtkIndent indent) override;
110
112
117 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
118 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
119 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
121
123
127 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
128 vtkGetMacro(Tolerance, double);
130
132
135 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
136 vtkGetMacro(AbsoluteTolerance, double);
138
140
143 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
144 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
145 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
147
149
152 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
153 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
154 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
156
158
161 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
162 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
163 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
165
167
173 vtkSetMacro(PointMerging, vtkTypeBool);
174 vtkGetMacro(PointMerging, vtkTypeBool);
175 vtkBooleanMacro(PointMerging, vtkTypeBool);
177
179
184 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
186
190 void CreateDefaultLocator(vtkPolyData* input = nullptr);
191
195 void ReleaseLocator() { this->SetLocator(nullptr); }
196
201
205 virtual void OperateOnPoint(double in[3], double out[3]);
206
210 virtual void OperateOnBounds(double in[6], double out[6]);
211
212 // This filter is difficult to stream.
213 // To get invariant results, the whole input must be processed at once.
214 // This flag allows the user to select whether strict piece invariance
215 // is required. By default it is on. When off, the filter can stream,
216 // but results may change.
217 vtkSetMacro(PieceInvariant, vtkTypeBool);
218 vtkGetMacro(PieceInvariant, vtkTypeBool);
219 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
220
222
227 vtkSetMacro(OutputPointsPrecision, int);
228 vtkGetMacro(OutputPointsPrecision, int);
230
231protected:
234
235 // Usual data generation method
238
240 double Tolerance;
247
250
251private:
252 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
253 void operator=(const vtkCleanPolyData&) = delete;
254};
255
256#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:49
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
int vtkTypeBool
Definition vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_DOUBLE_MAX
Definition vtkType.h:165