VTK  9.7.1
vtkCellValidator.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
77 #ifndef vtkCellValidator_h
78 #define vtkCellValidator_h
79 
80 #include "vtkCellStatus.h" // For enum class.
81 #include "vtkDataSetAlgorithm.h"
82 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_6_0.
83 #include "vtkFiltersGeneralModule.h" // For export macro.
84 
85 VTK_ABI_NAMESPACE_BEGIN
86 class vtkCell;
87 class vtkGenericCell;
88 class vtkEmptyCell;
89 class vtkVertex;
90 class vtkPolyVertex;
91 class vtkLine;
92 class vtkPolyLine;
93 class vtkTriangle;
94 class vtkTriangleStrip;
95 class vtkPolygon;
96 class vtkPixel;
97 class vtkQuad;
98 class vtkTetra;
99 class vtkVoxel;
100 class vtkHexahedron;
101 class vtkWedge;
102 class vtkPyramid;
103 class vtkPentagonalPrism;
104 class vtkHexagonalPrism;
105 class vtkQuadraticEdge;
107 class vtkQuadraticQuad;
108 class vtkQuadraticPolygon;
109 class vtkQuadraticTetra;
111 class vtkQuadraticWedge;
112 class vtkQuadraticPyramid;
113 class vtkBiQuadraticQuad;
121 class vtkCubicLine;
122 class vtkConvexPointSet;
123 class vtkPolyhedron;
124 class vtkLagrangeCurve;
125 class vtkLagrangeTriangle;
127 class vtkLagrangeTetra;
129 class vtkLagrangeWedge;
130 class vtkBezierCurve;
131 class vtkBezierTriangle;
133 class vtkBezierTetra;
134 class vtkBezierHexahedron;
135 class vtkBezierWedge;
136 
137 class VTKFILTERSGENERAL_EXPORT vtkCellValidator : public vtkDataSetAlgorithm
138 {
139 public:
141  void PrintSelf(ostream& os, vtkIndent indent) override;
142 
144  static vtkCellValidator* New();
145 
147 
148  static void PrintState(State state, ostream& os, vtkIndent indent);
149 
150  static State Check(vtkGenericCell*, double tolerance);
151  static State Check(vtkCell*, double tolerance);
152 
153  static State Check(vtkEmptyCell*, double tolerance);
154  static State Check(vtkVertex*, double tolerance);
155  static State Check(vtkPolyVertex*, double tolerance);
156  static State Check(vtkLine*, double tolerance);
157  static State Check(vtkPolyLine*, double tolerance);
158  static State Check(vtkTriangle*, double tolerance);
159  static State Check(vtkTriangleStrip*, double tolerance);
160  static State Check(vtkPolygon*, double tolerance);
161  static State Check(vtkPixel*, double tolerance);
162  static State Check(vtkQuad*, double tolerance);
163  static State Check(vtkTetra*, double tolerance);
164  static State Check(vtkVoxel*, double tolerance);
165  static State Check(vtkHexahedron*, double tolerance);
166  static State Check(vtkWedge*, double tolerance);
167  static State Check(vtkPyramid*, double tolerance);
168  static State Check(vtkPentagonalPrism*, double tolerance);
169  static State Check(vtkHexagonalPrism*, double tolerance);
170  static State Check(vtkQuadraticEdge*, double tolerance);
171  static State Check(vtkQuadraticTriangle*, double tolerance);
172  static State Check(vtkQuadraticQuad*, double tolerance);
173  static State Check(vtkQuadraticPolygon*, double tolerance);
174  static State Check(vtkQuadraticTetra*, double tolerance);
175  static State Check(vtkQuadraticHexahedron*, double tolerance);
176  static State Check(vtkQuadraticWedge*, double tolerance);
177  static State Check(vtkQuadraticPyramid*, double tolerance);
178  static State Check(vtkBiQuadraticQuad*, double tolerance);
179  static State Check(vtkTriQuadraticHexahedron*, double tolerance);
180  static State Check(vtkTriQuadraticPyramid*, double tolerance);
181  static State Check(vtkQuadraticLinearQuad*, double tolerance);
182  static State Check(vtkQuadraticLinearWedge*, double tolerance);
183  static State Check(vtkBiQuadraticQuadraticWedge*, double tolerance);
184  static State Check(vtkBiQuadraticQuadraticHexahedron*, double tolerance);
185  static State Check(vtkBiQuadraticTriangle*, double tolerance);
186  static State Check(vtkCubicLine*, double tolerance);
187  static State Check(vtkConvexPointSet*, double tolerance);
188  static State Check(vtkPolyhedron*, double tolerance);
189  static State Check(vtkLagrangeCurve*, double tolerance);
190  static State Check(vtkLagrangeTriangle*, double tolerance);
191  static State Check(vtkLagrangeQuadrilateral*, double tolerance);
192  static State Check(vtkLagrangeTetra*, double tolerance);
193  static State Check(vtkLagrangeHexahedron*, double tolerance);
194  static State Check(vtkLagrangeWedge*, double tolerance);
195  static State Check(vtkBezierCurve*, double tolerance);
196  static State Check(vtkBezierTriangle*, double tolerance);
197  static State Check(vtkBezierQuadrilateral*, double tolerance);
198  static State Check(vtkBezierTetra*, double tolerance);
199  static State Check(vtkBezierHexahedron*, double tolerance);
200  static State Check(vtkBezierWedge*, double tolerance);
201 
203 
208  vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
209  vtkGetMacro(Tolerance, double);
211 
221  vtkSetMacro(AutoTolerance, vtkTypeBool);
222  vtkGetMacro(AutoTolerance, vtkTypeBool);
223  vtkBooleanMacro(AutoTolerance, vtkTypeBool);
225 
242  static void SetPlanarityTolerance(double tolerance);
243  static double GetPlanarityTolerance();
245 protected:
247  ~vtkCellValidator() override = default;
248 
249  double Tolerance;
250  vtkTypeBool AutoTolerance = false;
251 
253 
254  static bool NoIntersectingEdges(vtkCell* cell, double tolerance);
255  VTK_DEPRECATED_IN_9_6_0("Do not use or make NoIntersectingFacesStatus protected and use it.")
256  static bool NoIntersectingFaces(vtkCell* cell, double tolerance);
257  static bool ContiguousEdges(vtkCell* twoDimensionalCell, double tolerance);
258  static State Convex(vtkCell* cell, double tolerance);
259  static bool FacesAreOrientedCorrectly(vtkCell* threeDimensionalCell, double tolerance);
260 
261 private:
262  vtkCellValidator(const vtkCellValidator&) = delete;
263  void operator=(const vtkCellValidator&) = delete;
264 
265  static State NoIntersectingFacesStatus(vtkCell* cell, double tolerance);
266 };
267 
268 VTK_ABI_NAMESPACE_END
269 #endif
cell represents a parabolic, 13-node isoparametric pyramid
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
a cell that represents a 3D point
Definition: vtkVertex.h:22
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:35
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:26
cell represents a parabolic, 9-node isoparametric quad
A 2D cell that represents an arbitrary order Bezier triangle.
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:27
A 3D cell that represents an arbitrary order Bezier hex.
cell represents a parabolic, 19-node isoparametric pyramid
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:21
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:24
A 3D cell that represents an arbitrary order Lagrange tetrahedron.
cell represents a parabolic, 18-node isoparametric wedge
provides thread-safe access to cells
cell represents a biquadratic, 24-node isoparametric hexahedron
a 3D cell that represents a prism with hexagonal base
cell represents a cubic , isoparametric 1D line
Definition: vtkCubicLine.h:34
int vtkTypeBool
Definition: vtkABI.h:64
a cell that represents a triangle strip
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:33
a 3D cell that represents a convex prism with pentagonal base
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
cell represents a 1D line
Definition: vtkLine.h:22
abstract class to specify cell behavior
Definition: vtkCell.h:50
#define VTK_DEPRECATED_IN_9_6_0(reason)
A 3D cell that represents an arbitrary order Lagrange wedge.
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:30
A 2D cell that represents an arbitrary order Lagrange triangle.
cell represents a parabolic, 8-node isoparametric quad
a simple class to control print indentation
Definition: vtkIndent.h:28
A 3D cell that represents an arbitrary order Bezier tetrahedron.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:39
validates cells in a dataset
cell represents a parabolic, isoparametric triangle
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:33
cell represents a parabolic, 10-node isoparametric tetrahedron
a 3D cell defined by a set of convex points
vtkCellStatus
Diagnostic values indicating how well-specified a cell is.
Definition: vtkCellStatus.h:16
A 3D cell that represents an arbitrary order Bezier wedge.
cell represents a parabolic, 27-node isoparametric hexahedron
a cell that represents a parabolic n-sided polygon
cell represents a parabolic, isoparametric edge
a cell that represents a triangle
Definition: vtkTriangle.h:27
cell represents a parabolic, 20-node isoparametric hexahedron
cell represents a parabolic, isoparametric triangle
cell represents a parabolic, 15-node isoparametric wedge
Store zero or more vtkInformation instances.
A 3D cell defined by a set of polygonal faces.
Superclass for algorithms that produce output of the same type as input.
A 3D cell that represents an arbitrary order Lagrange hex.
cell represents a, 12-node isoparametric wedge
static vtkDataSetAlgorithm * New()
cell represents a quadratic-linear, 6-node isoparametric quad
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:35
cell represents a set of 1D lines
Definition: vtkPolyLine.h:29