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=========================================================================*/
196#ifndef vtkCleanPolyData_h
197#define vtkCleanPolyData_h
198
199#include "vtkFiltersCoreModule.h" // For export macro
200#include "vtkPolyDataAlgorithm.h"
201
203
204class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
205{
206public:
208 void PrintSelf(ostream& os, vtkIndent indent) override;
210
212
217 vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
218 vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
219 vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
221
223
227 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
228 vtkGetMacro(Tolerance, double);
230
232
235 vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
236 vtkGetMacro(AbsoluteTolerance, double);
238
240
243 vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
244 vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
245 vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
247
249
252 vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
253 vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
254 vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
256
258
261 vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
262 vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
263 vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
265
267
273 vtkSetMacro(PointMerging, vtkTypeBool);
274 vtkGetMacro(PointMerging, vtkTypeBool);
275 vtkBooleanMacro(PointMerging, vtkTypeBool);
277
279
284 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
286
290 void CreateDefaultLocator(vtkPolyData* input = nullptr);
291
295 void ReleaseLocator() { this->SetLocator(nullptr); }
296
301
305 virtual void OperateOnPoint(double in[3], double out[3]);
306
310 virtual void OperateOnBounds(double in[6], double out[6]);
311
312 // This filter is difficult to stream.
313 // To get invariant results, the whole input must be processed at once.
314 // This flag allows the user to select whether strict piece invariance
315 // is required. By default it is on. When off, the filter can stream,
316 // but results may change.
317 vtkSetMacro(PieceInvariant, vtkTypeBool);
318 vtkGetMacro(PieceInvariant, vtkTypeBool);
319 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
320
322
327 vtkSetMacro(OutputPointsPrecision, int);
328 vtkGetMacro(OutputPointsPrecision, int);
330
331protected:
334
335 // Usual data generation method
338
340 double Tolerance;
347
350
351private:
352 vtkCleanPolyData(const vtkCleanPolyData&) = delete;
353 void operator=(const vtkCleanPolyData&) = delete;
354};
355
356#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:119
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:200
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165