VTK  9.1.0
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=========================================================================*/
181#ifndef vtkCleanPolyData_h
182#define vtkCleanPolyData_h
183
184#include "vtkFiltersCoreModule.h" // For export macro
185#include "vtkPolyDataAlgorithm.h"
186
188
189class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
190{
191public:
193 void PrintSelf(ostream& os, vtkIndent indent) override;
195
197
202 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
203 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
204 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
206
208
212 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
213 vtkGetMacro(Tolerance, double);
215
217
220 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
221 vtkGetMacro(AbsoluteTolerance, double);
223
225
228 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
229 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
230 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
232
234
237 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
238 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
239 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
241
243
246 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
247 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
248 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
250
252
258 vtkSetMacro(PointMerging, vtkTypeBool);
259 vtkGetMacro(PointMerging, vtkTypeBool);
260 vtkBooleanMacro(PointMerging, vtkTypeBool);
262
264
269 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
271
275 void CreateDefaultLocator(vtkPolyData* input = nullptr);
276
280 void ReleaseLocator() { this->SetLocator(nullptr); }
281
286
290 virtual void OperateOnPoint(double in[3], double out[3]);
291
295 virtual void OperateOnBounds(double in[6], double out[6]);
296
297 // This filter is difficult to stream.
298 // To get invariant results, the whole input must be processed at once.
299 // This flag allows the user to select whether strict piece invariance
300 // is required. By default it is on. When off, the filter can stream,
301 // but results may change.
302 vtkSetMacro(PieceInvariant, vtkTypeBool);
303 vtkGetMacro(PieceInvariant, vtkTypeBool);
304 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
305
307
312 vtkSetMacro(OutputPointsPrecision, int);
313 vtkGetMacro(OutputPointsPrecision, int);
315
316protected:
319
320 // Usual data generation method
323
325 double Tolerance;
332
335
336private:
337 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
338 void operator=(const vtkCleanPolyData&) = delete;
339};
340
341#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:113
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:195
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165