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 =========================================================================*/
72 #ifndef vtkCleanPolyData_h
73 #define vtkCleanPolyData_h
74 
75 #include "vtkFiltersCoreModule.h" // For export macro
76 #include "vtkPolyDataAlgorithm.h"
77 
79 
80 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
81 {
82 public:
83  static vtkCleanPolyData* New();
84  void PrintSelf(ostream& os, vtkIndent indent) override;
86 
88 
93  vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
94  vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
95  vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
97 
99 
103  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
104  vtkGetMacro(Tolerance, double);
106 
108 
111  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
112  vtkGetMacro(AbsoluteTolerance, double);
114 
116 
119  vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
120  vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
121  vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
123 
125 
128  vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
129  vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
130  vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
132 
134 
137  vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
138  vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
139  vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
141 
143 
149  vtkSetMacro(PointMerging, vtkTypeBool);
150  vtkGetMacro(PointMerging, vtkTypeBool);
151  vtkBooleanMacro(PointMerging, vtkTypeBool);
153 
155 
159  virtual void SetLocator(vtkIncrementalPointLocator* locator);
160  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
162 
166  void CreateDefaultLocator(vtkPolyData* input = nullptr);
167 
171  void ReleaseLocator() { this->SetLocator(nullptr); }
172 
176  vtkMTimeType GetMTime() override;
177 
181  virtual void OperateOnPoint(double in[3], double out[3]);
182 
186  virtual void OperateOnBounds(double in[6], double out[6]);
187 
188  // This filter is difficult to stream.
189  // To get invariant results, the whole input must be processed at once.
190  // This flag allows the user to select whether strict piece invariance
191  // is required. By default it is on. When off, the filter can stream,
192  // but results may change.
193  vtkSetMacro(PieceInvariant, vtkTypeBool);
194  vtkGetMacro(PieceInvariant, vtkTypeBool);
195  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
196 
198 
203  vtkSetMacro(OutputPointsPrecision, int);
204  vtkGetMacro(OutputPointsPrecision, int);
206 
207 protected:
209  ~vtkCleanPolyData() override;
210 
211  // Usual data generation method
214 
216  double Tolerance;
223 
226 
227 private:
228  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
229  void operator=(const vtkCleanPolyData&) = delete;
230 };
231 
232 #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.
static vtkCleanPolyData * New()
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
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:86
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165