VTK  9.7.1
vtkStaticCleanUnstructuredGrid.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
61 #ifndef vtkStaticCleanUnstructuredGrid_h
62 #define vtkStaticCleanUnstructuredGrid_h
63 
64 #include "vtkFiltersCoreModule.h" // For export macro
65 #include "vtkSmartPointer.h" // Pointer to locator
66 #include "vtkStaticPointLocator.h" // Locator
68 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
69 #include <vector> // API to vtkStaticCleanUnstructuredGrid
70 
71 VTK_ABI_NAMESPACE_BEGIN
72 class vtkCellArray;
73 class vtkCellData;
74 class vtkPointData;
75 class vtkPoints;
76 
79 {
80 public:
82 
87  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
92 
98  vtkSetMacro(ToleranceIsAbsolute, bool);
99  vtkBooleanMacro(ToleranceIsAbsolute, bool);
100  vtkGetMacro(ToleranceIsAbsolute, bool);
102 
104 
108  vtkSetClampMacro(AbsoluteTolerance, double, 0.0, VTK_DOUBLE_MAX);
109  vtkGetMacro(AbsoluteTolerance, double);
111 
113 
118  vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
119  vtkGetMacro(Tolerance, double);
121 
123 
134  vtkSetStringMacro(MergingArray);
135  vtkGetStringMacro(MergingArray);
137 
139 
146  vtkSetMacro(RemoveUnusedPoints, bool);
147  vtkBooleanMacro(RemoveUnusedPoints, bool);
148  vtkGetMacro(RemoveUnusedPoints, bool);
150 
152 
159  vtkSetMacro(ProduceMergeMap, bool);
160  vtkBooleanMacro(ProduceMergeMap, bool);
161  vtkGetMacro(ProduceMergeMap, bool);
163 
165 
173  vtkSetMacro(AveragePointData, bool);
174  vtkBooleanMacro(AveragePointData, bool);
175  vtkGetMacro(AveragePointData, bool);
177 
179 
184  vtkSetMacro(OutputPointsPrecision, int);
185  vtkGetMacro(OutputPointsPrecision, int);
187 
193  vtkGetObjectMacro(Locator, vtkStaticPointLocator);
194 
196  // This filter is difficult to stream. To produce invariant results, the
197  // whole input must be processed at once. This flag allows the user to
198  // select whether strict piece invariance is required. By default it is
199  // on. When off, the filter can stream, but results may change.
200  vtkSetMacro(PieceInvariant, bool);
201  vtkGetMacro(PieceInvariant, bool);
202  vtkBooleanMacro(PieceInvariant, bool);
204 
208  vtkMTimeType GetMTime() override;
209 
210  // These methods are made static so that other filters like vtkStaticCleanPolyData can use them
211  static void MarkPointUses(vtkCellArray* ca, vtkIdType* mergeMap, unsigned char* ptUses);
212  static vtkIdType BuildPointMap(
213  vtkIdType numPts, vtkIdType* pmap, unsigned char* ptUses, std::vector<vtkIdType>& mergeMap);
214  static void CopyPoints(
215  vtkPoints* inPts, vtkPointData* inPD, vtkPoints* outPts, vtkPointData* outPD, vtkIdType* ptMap);
216  static void AveragePoints(vtkPoints* inPts, vtkPointData* inPD, vtkPoints* outPts,
217  vtkPointData* outPD, vtkIdType* ptMap, double tol);
218 
219 protected:
221  ~vtkStaticCleanUnstructuredGrid() override = default;
222 
223  // Usual data generation method
226 
228  double Tolerance;
236 
237  // Internal locator for performing point merging
239 
240 private:
242  void operator=(const vtkStaticCleanUnstructuredGrid&) = delete;
243 };
244 
245 VTK_ABI_NAMESPACE_END
246 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
represent and manipulate point attribute data
Definition: vtkPointData.h:30
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
represent and manipulate cell attribute data
Definition: vtkCellData.h:31
static vtkUnstructuredGridAlgorithm * New()
int vtkIdType
Definition: vtkType.h:363
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce only unstructured grid as output.
quickly locate points in 3-space
merge duplicate points, removed unused points, in an vtkUnstructuredGrid
object to represent cell connectivity
Definition: vtkCellArray.h:177
vtkSmartPointer< vtkStaticPointLocator > Locator
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
represent and manipulate 3D points
Definition: vtkPoints.h:30