VTK  9.3.0
vtkCleanPolyData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
75 #ifndef vtkCleanPolyData_h
76 #define vtkCleanPolyData_h
77 
78 #include "vtkFiltersCoreModule.h" // For export macro
79 #include "vtkPolyDataAlgorithm.h"
80 
81 VTK_ABI_NAMESPACE_BEGIN
83 
84 class VTKFILTERSCORE_EXPORT vtkCleanPolyData : public vtkPolyDataAlgorithm
85 {
86 public:
87  static vtkCleanPolyData* New();
88  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
92 
97  vtkSetMacro(ToleranceIsAbsolute, vtkTypeBool);
98  vtkBooleanMacro(ToleranceIsAbsolute, vtkTypeBool);
99  vtkGetMacro(ToleranceIsAbsolute, vtkTypeBool);
101 
103 
107  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
108  vtkGetMacro(Tolerance, double);
110 
112 
115  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
116  vtkGetMacro(AbsoluteTolerance, double);
118 
120 
123  vtkSetMacro(ConvertLinesToPoints, vtkTypeBool);
124  vtkBooleanMacro(ConvertLinesToPoints, vtkTypeBool);
125  vtkGetMacro(ConvertLinesToPoints, vtkTypeBool);
127 
129 
132  vtkSetMacro(ConvertPolysToLines, vtkTypeBool);
133  vtkBooleanMacro(ConvertPolysToLines, vtkTypeBool);
134  vtkGetMacro(ConvertPolysToLines, vtkTypeBool);
136 
138 
141  vtkSetMacro(ConvertStripsToPolys, vtkTypeBool);
142  vtkBooleanMacro(ConvertStripsToPolys, vtkTypeBool);
143  vtkGetMacro(ConvertStripsToPolys, vtkTypeBool);
145 
147 
153  vtkSetMacro(PointMerging, vtkTypeBool);
154  vtkGetMacro(PointMerging, vtkTypeBool);
155  vtkBooleanMacro(PointMerging, vtkTypeBool);
157 
159 
163  virtual void SetLocator(vtkIncrementalPointLocator* locator);
164  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
166 
170  void CreateDefaultLocator(vtkPolyData* input = nullptr);
171 
175  void ReleaseLocator() { this->SetLocator(nullptr); }
176 
180  vtkMTimeType GetMTime() override;
181 
185  virtual void OperateOnPoint(double in[3], double out[3]);
186 
190  virtual void OperateOnBounds(double in[6], double out[6]);
191 
192  // This filter is difficult to stream.
193  // To get invariant results, the whole input must be processed at once.
194  // This flag allows the user to select whether strict piece invariance
195  // is required. By default it is on. When off, the filter can stream,
196  // but results may change.
197  vtkSetMacro(PieceInvariant, vtkTypeBool);
198  vtkGetMacro(PieceInvariant, vtkTypeBool);
199  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
200 
202 
207  vtkSetMacro(OutputPointsPrecision, int);
208  vtkGetMacro(OutputPointsPrecision, int);
210 
211 protected:
213  ~vtkCleanPolyData() override;
214 
215  // Usual data generation method
218 
220  double Tolerance;
227 
230 
231 private:
232  vtkCleanPolyData(const vtkCleanPolyData&) = delete;
233  void operator=(const vtkCleanPolyData&) = delete;
234 };
235 
236 VTK_ABI_NAMESPACE_END
237 #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:29
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:80
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154