VTK  9.1.0
vtkCellQuality.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCellQuality.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=========================================================================*/
32#ifndef vtkCellQuality_h
33#define vtkCellQuality_h
34
35#include "vtkDataSetAlgorithm.h"
36#include "vtkFiltersVerdictModule.h" // For export macro
37
38class vtkCell;
39class vtkDataArray;
40class vtkIdList;
41class vtkPoints;
42
43class VTKFILTERSVERDICT_EXPORT vtkCellQuality : public vtkDataSetAlgorithm
44{
45
46 enum
47 {
48 NONE = 0,
49 AREA,
50 ASPECT_BETA,
51 ASPECT_FROBENIUS,
52 ASPECT_GAMMA,
53 ASPECT_RATIO,
54 COLLAPSE_RATIO,
55 CONDITION,
56 DIAGONAL,
57 DIMENSION,
58 DISTORTION,
59 EDGE_RATIO,
60 JACOBIAN,
61 MAX_ANGLE,
62 MAX_ASPECT_FROBENIUS,
63 MAX_EDGE_RATIO,
64 MED_ASPECT_FROBENIUS,
65 MIN_ANGLE,
66 NORMAL,
67 ODDY,
68 RADIUS_RATIO,
69 RELATIVE_SIZE_SQUARED,
70 SCALED_JACOBIAN,
71 SHAPE,
72 SHAPE_AND_SIZE,
73 SHEAR,
74 SHEAR_AND_SIZE,
75 SKEW,
76 STRETCH,
77 TAPER,
78 VOLUME,
79 WARPAGE
80 };
81
82public:
83 void PrintSelf(ostream& os, vtkIndent indent) override;
86
88
97 vtkSetMacro(QualityMeasure, int);
98 vtkGetMacro(QualityMeasure, int);
100
101 void SetQualityMeasureToArea() { this->SetQualityMeasure(AREA); }
102 void SetQualityMeasureToAspectBeta() { this->SetQualityMeasure(ASPECT_BETA); }
103 void SetQualityMeasureToAspectFrobenius() { this->SetQualityMeasure(ASPECT_FROBENIUS); }
104 void SetQualityMeasureToAspectGamma() { this->SetQualityMeasure(ASPECT_GAMMA); }
105 void SetQualityMeasureToAspectRatio() { this->SetQualityMeasure(ASPECT_RATIO); }
106 void SetQualityMeasureToCollapseRatio() { this->SetQualityMeasure(COLLAPSE_RATIO); }
107 void SetQualityMeasureToCondition() { this->SetQualityMeasure(CONDITION); }
108 void SetQualityMeasureToDiagonal() { this->SetQualityMeasure(DIAGONAL); }
109 void SetQualityMeasureToDimension() { this->SetQualityMeasure(DIMENSION); }
110 void SetQualityMeasureToDistortion() { this->SetQualityMeasure(DISTORTION); }
111 void SetQualityMeasureToJacobian() { this->SetQualityMeasure(JACOBIAN); }
112 void SetQualityMeasureToMaxAngle() { this->SetQualityMeasure(MAX_ANGLE); }
113 void SetQualityMeasureToMaxAspectFrobenius() { this->SetQualityMeasure(MAX_ASPECT_FROBENIUS); }
114 void SetQualityMeasureToMaxEdgeRatio() { this->SetQualityMeasure(MAX_EDGE_RATIO); }
115 void SetQualityMeasureToMedAspectFrobenius() { this->SetQualityMeasure(MED_ASPECT_FROBENIUS); }
116 void SetQualityMeasureToMinAngle() { this->SetQualityMeasure(MIN_ANGLE); }
117 void SetQualityMeasureToOddy() { this->SetQualityMeasure(ODDY); }
118 void SetQualityMeasureToRadiusRatio() { this->SetQualityMeasure(RADIUS_RATIO); }
119 void SetQualityMeasureToRelativeSizeSquared() { this->SetQualityMeasure(RELATIVE_SIZE_SQUARED); }
120 void SetQualityMeasureToScaledJacobian() { this->SetQualityMeasure(SCALED_JACOBIAN); }
121 void SetQualityMeasureToShapeAndSize() { this->SetQualityMeasure(SHAPE_AND_SIZE); }
122 void SetQualityMeasureToShape() { this->SetQualityMeasure(SHAPE); }
123 void SetQualityMeasureToShearAndSize() { this->SetQualityMeasure(SHEAR_AND_SIZE); }
124 void SetQualityMeasureToShear() { this->SetQualityMeasure(SHEAR); }
125 void SetQualityMeasureToSkew() { this->SetQualityMeasure(SKEW); }
126 void SetQualityMeasureToStretch() { this->SetQualityMeasure(STRETCH); }
127 void SetQualityMeasureToTaper() { this->SetQualityMeasure(TAPER); }
128 void SetQualityMeasureToVolume() { this->SetQualityMeasure(VOLUME); }
129 void SetQualityMeasureToWarpage() { this->SetQualityMeasure(WARPAGE); }
130
132
138 vtkSetMacro(UnsupportedGeometry, double);
139 vtkGetMacro(UnsupportedGeometry, double);
141
143
150 vtkSetMacro(UndefinedQuality, double);
151 vtkGetMacro(UndefinedQuality, double);
153
157
158protected:
159 ~vtkCellQuality() override;
161
179
209
230
256
264
271
273
275
282 static int GetCurrentTriangleNormal(double point[3], double normal[3]);
283 static double CurrentTriNormal[3];
285
287
288 // Default return value for unsupported geometry
290
291 // Default return value for qualities that are not well-defined for certain
292 // types of supported geometries. e.g. volume of a triangle
294
295private:
296 vtkIdList* PointIds;
297 vtkPoints* Points;
298
299 vtkCellQuality(const vtkCellQuality&) = delete;
300 void operator=(const vtkCellQuality&) = delete;
301};
302
303#endif // vtkCellQuality_h
Calculate functions of quality of the elements of a mesh.
double UnsupportedGeometry
double ComputeQuadQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of quadrilaterals.
double PixelArea(vtkCell *)
void SetQualityMeasureToCondition()
static int GetCurrentTriangleNormal(double point[3], double normal[3])
A function called by some VERDICT triangle quality functions to test for inverted triangles.
void SetQualityMeasureToShearAndSize()
void SetQualityMeasureToScaledJacobian()
void SetQualityMeasureToAspectRatio()
void SetQualityMeasureToRelativeSizeSquared()
double UndefinedQuality
void SetQualityMeasureToAspectBeta()
double PolygonArea(vtkCell *)
void SetQualityMeasureToAspectFrobenius()
void SetQualityMeasureToDistortion()
~vtkCellQuality() override
void SetQualityMeasureToShape()
void SetQualityMeasureToOddy()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetQualityMeasureToRadiusRatio()
void SetQualityMeasureToMaxAngle()
void SetQualityMeasureToDimension()
double ComputeTriangleStripQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of triangle strip.
void SetQualityMeasureToMaxEdgeRatio()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetQualityMeasureToCollapseRatio()
void SetQualityMeasureToTaper()
void SetQualityMeasureToShapeAndSize()
void SetQualityMeasureToWarpage()
double ComputeTriangleQuality(vtkCell *)
Set/Get the particular estimator used to function the quality of triangles.
double TriangleStripArea(vtkCell *)
void SetQualityMeasureToVolume()
void SetQualityMeasureToDiagonal()
void SetQualityMeasureToAspectGamma()
static vtkCellQuality * New()
void SetQualityMeasureToArea()
void SetQualityMeasureToJacobian()
void SetQualityMeasureToSkew()
void SetQualityMeasureToMaxAspectFrobenius()
void SetQualityMeasureToStretch()
double ComputeTetQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of tetrahedra.
void SetQualityMeasureToMinAngle()
void SetQualityMeasureToMedAspectFrobenius()
double ComputePixelQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of pixel.
double ComputeHexQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of hexahedra.
void SetQualityMeasureToShear()
abstract class to specify cell behavior
Definition: vtkCell.h:147
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
Superclass for algorithms that produce output of the same type as input.
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:143
@ point
Definition: vtkX3D.h:242