28 #ifndef __vtkvmtkPolyDataSurfaceRemeshing_h 29 #define __vtkvmtkPolyDataSurfaceRemeshing_h 31 #include "vtkObject.h" 32 #include "vtkPolyDataAlgorithm.h" 33 #include "vtkvmtkWin32Header.h" 34 #include "vtkIdList.h" 45 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 vtkSetMacro(AspectRatioThreshold,
double);
48 vtkGetMacro(AspectRatioThreshold,
double);
50 vtkSetMacro(InternalAngleTolerance,
double);
51 vtkGetMacro(InternalAngleTolerance,
double);
53 vtkSetMacro(NormalAngleTolerance,
double);
54 vtkGetMacro(NormalAngleTolerance,
double);
56 vtkSetMacro(CollapseAngleThreshold,
double);
57 vtkGetMacro(CollapseAngleThreshold,
double);
59 vtkSetMacro(Relaxation,
double);
60 vtkGetMacro(Relaxation,
double);
62 vtkSetMacro(TargetArea,
double);
63 vtkGetMacro(TargetArea,
double);
65 vtkSetMacro(TargetAreaFactor,
double);
66 vtkGetMacro(TargetAreaFactor,
double);
68 vtkSetMacro(TriangleSplitFactor,
double);
69 vtkGetMacro(TriangleSplitFactor,
double);
71 vtkSetMacro(MinAreaFactor,
double);
72 vtkGetMacro(MinAreaFactor,
double);
74 vtkSetMacro(MaxArea,
double);
75 vtkGetMacro(MaxArea,
double);
77 vtkSetMacro(MinArea,
double);
78 vtkGetMacro(MinArea,
double);
80 vtkSetMacro(NumberOfIterations,
int);
81 vtkGetMacro(NumberOfIterations,
int);
83 vtkSetMacro(NumberOfConnectivityOptimizationIterations,
int);
84 vtkGetMacro(NumberOfConnectivityOptimizationIterations,
int);
86 vtkSetStringMacro(TargetAreaArrayName);
87 vtkGetStringMacro(TargetAreaArrayName);
89 vtkSetMacro(ElementSizeMode,
int);
90 vtkGetMacro(ElementSizeMode,
int);
92 { this->SetElementSizeMode(TARGET_AREA); }
94 { this->SetElementSizeMode(TARGET_AREA_ARRAY); }
96 vtkSetMacro(PreserveBoundaryEdges,
int);
97 vtkGetMacro(PreserveBoundaryEdges,
int);
98 vtkBooleanMacro(PreserveBoundaryEdges,
int);
100 vtkSetStringMacro(CellEntityIdsArrayName);
101 vtkGetStringMacro(CellEntityIdsArrayName);
103 vtkSetObjectMacro(ExcludedEntityIds,vtkIdList);
104 vtkGetObjectMacro(ExcludedEntityIds,vtkIdList);
145 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
147 void BuildEntityBoundary(vtkPolyData* input, vtkPolyData* entityBoundary);
149 int EdgeFlipConnectivityOptimizationIteration();
150 int EdgeFlipIteration();
151 int EdgeCollapseIteration();
152 int TriangleSplitIteration();
153 int EdgeSplitIteration();
154 int PointRelocationIteration(
bool projectToSurface=
true);
156 int TestFlipEdgeValidity(vtkIdType pt1, vtkIdType pt2, vtkIdType cell1, vtkIdType cell2, vtkIdType pt3, vtkIdType pt4);
157 int TestConnectivityFlipEdge(vtkIdType pt1, vtkIdType pt2);
158 int TestDelaunayFlipEdge(vtkIdType pt1, vtkIdType pt2);
159 int TestAspectRatioCollapseEdge(vtkIdType cellId, vtkIdType& pt1, vtkIdType& pt2);
160 int TestTriangleSplit(vtkIdType cellId);
161 int TestAreaSplitEdge(vtkIdType cellId, vtkIdType& pt1, vtkIdType& pt2);
163 int IsElementExcluded(vtkIdType cellId);
164 int GetEdgeCellsAndOppositeEdge(vtkIdType pt1, vtkIdType pt2, vtkIdType& cell1, vtkIdType& cell2, vtkIdType& pt3, vtkIdType& pt4);
166 int SplitEdge(vtkIdType pt1, vtkIdType pt2);
167 int CollapseEdge(vtkIdType pt1, vtkIdType pt2);
168 int FlipEdge(vtkIdType pt1, vtkIdType pt2);
170 int SplitTriangle(vtkIdType cellId);
171 int CollapseTriangle(vtkIdType cellId);
173 int RelocatePoint(vtkIdType pointId,
bool projectToSurface);
175 int IsPointOnBoundary(vtkIdType pointId);
176 int IsPointOnEntityBoundary(vtkIdType pointId);
178 int GetNumberOfBoundaryEdges(vtkIdType cellId);
180 double ComputeTriangleTargetArea(vtkIdType cellId);
182 int FindOneRingNeighbors(vtkIdType pointId, vtkIdList* neighborIds);
vtkDataArray * TargetAreaArray
char * TargetAreaArrayName
vtkIntArray * CellEntityIdsArray
double InternalAngleTolerance
char * CellEntityIdsArrayName
vtkCellLocator * BoundaryLocator
double AspectRatioThreshold
void SetElementSizeModeToTargetArea()
double NormalAngleTolerance
double TriangleSplitFactor
vtkPolyData * InputBoundary
vtkPolyData * InputEntityBoundary
double CollapseAngleThreshold
vtkIdList * ExcludedEntityIds
remesh a surface using quality triangles.
int PreserveBoundaryEdges
int NumberOfConnectivityOptimizationIterations
void SetElementSizeModeToTargetAreaArray()
vtkCellLocator * EntityBoundaryLocator