VTK  9.2.20230327
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 
202 VTK_ABI_NAMESPACE_BEGIN
204 
205 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
206 {
207 public:
209  void PrintSelf(ostream& os, vtkIndent indent) override;
211 
213 
218  vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
219  vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
220  vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
222 
224 
228  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
229  vtkGetMacro(Tolerance, double);
231 
233 
236  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
237  vtkGetMacro(AbsoluteTolerance, double);
239 
241 
244  vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
245  vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
246  vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
248 
250 
253  vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
254  vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
255  vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
257 
259 
262  vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
263  vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
264  vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
266 
268 
274  vtkSetMacro(PointMerging, vtkTypeBool);
275  vtkGetMacro(PointMerging, vtkTypeBool);
276  vtkBooleanMacro(PointMerging, vtkTypeBool);
278 
280 
284  virtual void SetLocator(vtkIncrementalPointLocator* locator);
285  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
287 
291  void CreateDefaultLocator(vtkPolyData* input = nullptr);
292 
296  void ReleaseLocator() { this->SetLocator(nullptr); }
297 
301  vtkMTimeType GetMTime() override;
302 
306  virtual void OperateOnPoint(double in[3], double out[3]);
307 
311  virtual void OperateOnBounds(double in[6], double out[6]);
312 
313  // This filter is difficult to stream.
314  // To get invariant results, the whole input must be processed at once.
315  // This flag allows the user to select whether strict piece invariance
316  // is required. By default it is on. When off, the filter can stream,
317  // but results may change.
318  vtkSetMacro(PieceInvariant, vtkTypeBool);
319  vtkGetMacro(PieceInvariant, vtkTypeBool);
320  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
321 
323 
328  vtkSetMacro(OutputPointsPrecision, int);
329  vtkGetMacro(OutputPointsPrecision, int);
331 
332 protected:
334  ~vtkCleanPolyData() override;
335 
336  // Usual data generation method
339 
341  double Tolerance;
348 
351 
352 private:
353  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
354  void operator=(const vtkCleanPolyData&) = delete;
355 };
356 
357 VTK_ABI_NAMESPACE_END
358 #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:120
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:201
int vtkTypeBool
Definition: vtkABI.h:71
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:282
#define VTK_DOUBLE_MAX
Definition: vtkType.h:166