|
VMTK
|
Remesh a triangulated surface into a mesh of more uniform, better-shaped ("quality") triangles. More...
#include <vtkvmtkPolyDataSurfaceRemeshing.h>
Public Types | |
| enum | { SUCCESS = 0 , EDGE_ON_BOUNDARY , EDGE_BETWEEN_ENTITIES , EDGE_LOCKED , NOT_EDGE , NON_MANIFOLD , NOT_TRIANGLES , DEGENERATE_TRIANGLES , TRIANGLE_LOCKED } |
| enum | { DO_CHANGE , DO_NOTHING } |
| enum | { TARGET_AREA , TARGET_AREA_ARRAY } |
| enum | { RELOCATE_SUCCESS , RELOCATE_FAILURE } |
| enum | { INTERNAL_POINT , POINT_ON_BOUNDARY , NO_NEIGHBORS } |
| typedef vtkPolyDataAlgorithm | Superclass |
Public Member Functions | |
| virtual int | IsA (const char *type) |
| vtkvmtkPolyDataSurfaceRemeshing * | NewInstance () const |
| void | PrintSelf (std::ostream &os, vtkIndent indent) override |
| void | SetElementSizeModeToTargetArea () |
| void | SetElementSizeModeToTargetAreaArray () |
| virtual void | SetAspectRatioThreshold (double) |
| virtual double | GetAspectRatioThreshold () |
| virtual void | SetInternalAngleTolerance (double) |
| virtual double | GetInternalAngleTolerance () |
| virtual void | SetNormalAngleTolerance (double) |
| virtual double | GetNormalAngleTolerance () |
| virtual void | SetCollapseAngleThreshold (double) |
| virtual double | GetCollapseAngleThreshold () |
| virtual void | SetRelaxation (double) |
| virtual double | GetRelaxation () |
| virtual void | SetTargetArea (double) |
| virtual double | GetTargetArea () |
| virtual void | SetTargetAreaFactor (double) |
| virtual double | GetTargetAreaFactor () |
| virtual void | SetTriangleSplitFactor (double) |
| virtual double | GetTriangleSplitFactor () |
| virtual void | SetMinAreaFactor (double) |
| virtual double | GetMinAreaFactor () |
| virtual void | SetMaxArea (double) |
| virtual double | GetMaxArea () |
| virtual void | SetMinArea (double) |
| virtual double | GetMinArea () |
| virtual void | SetNumberOfIterations (int) |
| virtual int | GetNumberOfIterations () |
| virtual void | SetNumberOfConnectivityOptimizationIterations (int) |
| virtual int | GetNumberOfConnectivityOptimizationIterations () |
| virtual void | SetTargetAreaArrayName (const char *) |
| virtual char * | GetTargetAreaArrayName () |
| virtual void | SetElementSizeMode (int) |
| virtual int | GetElementSizeMode () |
| virtual void | SetPreserveBoundaryEdges (int) |
| virtual int | GetPreserveBoundaryEdges () |
| virtual void | PreserveBoundaryEdgesOn () |
| virtual void | PreserveBoundaryEdgesOff () |
| virtual void | SetCellEntityIdsArrayName (const char *) |
| virtual char * | GetCellEntityIdsArrayName () |
| virtual void | SetExcludedEntityIds (vtkIdList *) |
| virtual vtkIdList * | GetExcludedEntityIds () |
Static Public Member Functions | |
| static vtkvmtkPolyDataSurfaceRemeshing * | New () |
| static int | IsTypeOf (const char *type) |
| static vtkvmtkPolyDataSurfaceRemeshing * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
| virtual vtkObjectBase * | NewInstanceInternal () const |
| vtkvmtkPolyDataSurfaceRemeshing () | |
| ~vtkvmtkPolyDataSurfaceRemeshing () | |
| virtual int | RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *) override |
| void | BuildEntityBoundary (vtkPolyData *input, vtkPolyData *entityBoundary) |
| int | EdgeFlipConnectivityOptimizationIteration () |
| int | EdgeFlipIteration () |
| int | EdgeCollapseIteration () |
| int | TriangleSplitIteration () |
| int | EdgeSplitIteration () |
| int | PointRelocationIteration (bool projectToSurface=true) |
| int | TestFlipEdgeValidity (vtkIdType pt1, vtkIdType pt2, vtkIdType cell1, vtkIdType cell2, vtkIdType pt3, vtkIdType pt4) |
| int | TestConnectivityFlipEdge (vtkIdType pt1, vtkIdType pt2) |
| int | TestDelaunayFlipEdge (vtkIdType pt1, vtkIdType pt2) |
| int | TestAspectRatioCollapseEdge (vtkIdType cellId, vtkIdType &pt1, vtkIdType &pt2) |
| int | TestTriangleSplit (vtkIdType cellId) |
| int | TestAreaSplitEdge (vtkIdType cellId, vtkIdType &pt1, vtkIdType &pt2) |
| int | IsElementExcluded (vtkIdType cellId) |
| int | GetEdgeCellsAndOppositeEdge (vtkIdType pt1, vtkIdType pt2, vtkIdType &cell1, vtkIdType &cell2, vtkIdType &pt3, vtkIdType &pt4) |
| int | SplitEdge (vtkIdType pt1, vtkIdType pt2) |
| int | CollapseEdge (vtkIdType pt1, vtkIdType pt2) |
| int | FlipEdge (vtkIdType pt1, vtkIdType pt2) |
| int | SplitTriangle (vtkIdType cellId) |
| int | CollapseTriangle (vtkIdType cellId) |
| int | RelocatePoint (vtkIdType pointId, bool projectToSurface) |
| int | IsPointOnBoundary (vtkIdType pointId) |
| int | IsPointOnEntityBoundary (vtkIdType pointId) |
| int | GetNumberOfBoundaryEdges (vtkIdType cellId) |
| double | ComputeTriangleTargetArea (vtkIdType cellId) |
| int | FindOneRingNeighbors (vtkIdType pointId, vtkIdList *neighborIds) |
Protected Attributes | |
| vtkPolyData * | Mesh |
| vtkPolyData * | InputBoundary |
| vtkPolyData * | InputEntityBoundary |
| vtkCellLocator * | Locator |
| vtkCellLocator * | BoundaryLocator |
| vtkCellLocator * | EntityBoundaryLocator |
| vtkIntArray * | CellEntityIdsArray |
| vtkDataArray * | TargetAreaArray |
| vtkIdList * | ExcludedEntityIds |
| double | AspectRatioThreshold |
| double | InternalAngleTolerance |
| double | NormalAngleTolerance |
| double | CollapseAngleThreshold |
| double | Relaxation |
| int | NumberOfConnectivityOptimizationIterations |
| int | NumberOfIterations |
| int | PreserveBoundaryEdges |
| int | ElementSizeMode |
| double | TargetArea |
| double | TargetAreaFactor |
| double | MaxArea |
| double | MinArea |
| double | MinAreaFactor |
| double | TriangleSplitFactor |
| char * | TargetAreaArrayName |
| char * | CellEntityIdsArrayName |
Remesh a triangulated surface into a mesh of more uniform, better-shaped ("quality") triangles.
vtkvmtkPolyDataSurfaceRemeshing iteratively improves a triangulated surface mesh through a combination of edge flipping (topology/Delaunay optimization), edge collapse (removing undersized or poorly shaped triangles), edge/triangle splitting (subdividing oversized triangles), and point relocation (Laplacian-like smoothing, optionally reprojected onto the original surface), aiming to bring every triangle's area close to a target element size while keeping triangle aspect ratio and internal angles within acceptable bounds. Target element size can be a single scalar (TargetArea, optionally scaled by TargetAreaFactor) or spatially varying, read from a point data array (TargetAreaArrayName) when ElementSizeMode is set to TARGET_AREA_ARRAY. Cell entity ids (CellEntityIdsArrayName) can be used to keep the boundaries between differently-tagged regions (e.g. inlets/outlets/wall) fixed during remeshing, and specific entities can be excluded from remeshing altogether (ExcludedEntityIds). This is the filter behind the vmtksurfaceremeshing pype script, commonly used to prepare a surface with well-shaped elements prior to volumetric mesh generation.
Definition at line 51 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| typedef vtkPolyDataAlgorithm vtkvmtkPolyDataSurfaceRemeshing::Superclass |
Definition at line 56 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| anonymous enum |
| Enumerator | |
|---|---|
| SUCCESS | |
| EDGE_ON_BOUNDARY | |
| EDGE_BETWEEN_ENTITIES | |
| EDGE_LOCKED | |
| NOT_EDGE | |
| NON_MANIFOLD | |
| NOT_TRIANGLES | |
| DEGENERATE_TRIANGLES | |
| TRIANGLE_LOCKED | |
Definition at line 248 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| anonymous enum |
| Enumerator | |
|---|---|
| DO_CHANGE | |
| DO_NOTHING | |
Definition at line 260 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| anonymous enum |
| Enumerator | |
|---|---|
| TARGET_AREA | |
| TARGET_AREA_ARRAY | |
Definition at line 265 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| anonymous enum |
| Enumerator | |
|---|---|
| RELOCATE_SUCCESS | |
| RELOCATE_FAILURE | |
Definition at line 270 of file vtkvmtkPolyDataSurfaceRemeshing.h.
| anonymous enum |
| Enumerator | |
|---|---|
| INTERNAL_POINT | |
| POINT_ON_BOUNDARY | |
| NO_NEIGHBORS | |
Definition at line 275 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 43 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 75 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
static |
|
static |
|
virtual |
|
static |
|
protectedvirtual |
| vtkvmtkPolyDataSurfaceRemeshing * vtkvmtkPolyDataSurfaceRemeshing::NewInstance | ( | ) | const |
|
override |
Definition at line 1905 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
virtual |
Set/get the maximum triangle aspect ratio (Frobenius-norm based, as used internally by TestAspectRatioCollapseEdge) tolerated before an edge of the triangle becomes a candidate for collapsing. Default: 1.2.
|
virtual |
Set/get the maximum triangle aspect ratio (Frobenius-norm based, as used internally by TestAspectRatioCollapseEdge) tolerated before an edge of the triangle becomes a candidate for collapsing. Default: 1.2.
|
virtual |
Set/get the tolerance, in radians, used when testing whether flipping an edge would improve the minimum internal angle of the two triangles sharing it (edge-flip optimization). Default: 0.0.
|
virtual |
Set/get the tolerance, in radians, used when testing whether flipping an edge would improve the minimum internal angle of the two triangles sharing it (edge-flip optimization). Default: 0.0.
|
virtual |
Set/get the maximum angle, in radians, allowed between the normals of the two triangles sharing an edge for that edge to remain a candidate for flipping or collapsing; edges bounding a sharp feature (larger normal angle) are preserved. Default: 0.2.
|
virtual |
Set/get the maximum angle, in radians, allowed between the normals of the two triangles sharing an edge for that edge to remain a candidate for flipping or collapsing; edges bounding a sharp feature (larger normal angle) are preserved. Default: 0.2.
|
virtual |
Set/get the maximum change in surface normal orientation, in radians, tolerated when collapsing an edge; if collapsing would tilt the normal of any triangle around the surviving point by more than this angle (protecting sharp geometric features from being flattened), the collapse is rejected. Default: 0.5.
|
virtual |
Set/get the maximum change in surface normal orientation, in radians, tolerated when collapsing an edge; if collapsing would tilt the normal of any triangle around the surviving point by more than this angle (protecting sharp geometric features from being flattened), the collapse is rejected. Default: 0.5.
|
virtual |
Set/get the relaxation factor used when relocating interior points towards the centroid of their one-ring neighborhood (Laplacian-like smoothing pass run as part of each remeshing iteration). Default: 0.5.
|
virtual |
Set/get the relaxation factor used when relocating interior points towards the centroid of their one-ring neighborhood (Laplacian-like smoothing pass run as part of each remeshing iteration). Default: 0.5.
|
virtual |
Set/get the uniform target triangle area used when ElementSizeMode is TARGET_AREA; triangles larger than this (scaled by TriangleSplitFactor) are split, and edges of triangles significantly smaller than this (scaled by MinAreaFactor) are candidates for collapsing. Default: 1.0.
|
virtual |
Set/get the uniform target triangle area used when ElementSizeMode is TARGET_AREA; triangles larger than this (scaled by TriangleSplitFactor) are split, and edges of triangles significantly smaller than this (scaled by MinAreaFactor) are candidates for collapsing. Default: 1.0.
|
virtual |
Set/get a multiplicative factor applied to the per-triangle target area read from TargetAreaArrayName when ElementSizeMode is TARGET_AREA_ARRAY (has no effect in TARGET_AREA mode). Default: 1.0.
|
virtual |
Set/get a multiplicative factor applied to the per-triangle target area read from TargetAreaArrayName when ElementSizeMode is TARGET_AREA_ARRAY (has no effect in TARGET_AREA mode). Default: 1.0.
|
virtual |
Set/get the multiplier applied to the local target area to decide when a triangle should be split: a triangle becomes a split candidate once its area exceeds TriangleSplitFactor times the target area. Default: 1.0.
|
virtual |
Set/get the multiplier applied to the local target area to decide when a triangle should be split: a triangle becomes a split candidate once its area exceeds TriangleSplitFactor times the target area. Default: 1.0.
|
virtual |
Set/get the multiplier applied to the local target area below which a triangle's shortest edge becomes a candidate for collapsing, in addition to the AspectRatioThreshold test. Default: 0.5.
|
virtual |
Set/get the multiplier applied to the local target area below which a triangle's shortest edge becomes a candidate for collapsing, in addition to the AspectRatioThreshold test. Default: 0.5.
|
virtual |
Set/get the hard upper bound clamped onto the computed local target triangle area, regardless of ElementSizeMode. Default: VTK_VMTK_LARGE_FLOAT (effectively unbounded).
|
virtual |
Set/get the hard upper bound clamped onto the computed local target triangle area, regardless of ElementSizeMode. Default: VTK_VMTK_LARGE_FLOAT (effectively unbounded).
|
virtual |
Set/get the hard lower bound clamped onto the computed local target triangle area, regardless of ElementSizeMode. Default: 0.0.
|
virtual |
Set/get the hard lower bound clamped onto the computed local target triangle area, regardless of ElementSizeMode. Default: 0.0.
|
virtual |
Set/get the number of outer remeshing iterations (edge flip/collapse/split/point-relocation passes) performed. Default: 10.
|
virtual |
Set/get the number of outer remeshing iterations (edge flip/collapse/split/point-relocation passes) performed. Default: 10.
|
virtual |
Set/get the number of edge-flip connectivity-optimization passes performed (improving vertex valence / Delaunay-ness) within each main remeshing iteration. Default: 20.
|
virtual |
Set/get the number of edge-flip connectivity-optimization passes performed (improving vertex valence / Delaunay-ness) within each main remeshing iteration. Default: 20.
|
virtual |
Set/get the name of the point data array holding a spatially varying target triangle area, used when ElementSizeMode is TARGET_AREA_ARRAY. Commonly named "TargetArea".
|
virtual |
Set/get the name of the point data array holding a spatially varying target triangle area, used when ElementSizeMode is TARGET_AREA_ARRAY. Commonly named "TargetArea".
|
virtual |
Set/get how the local target triangle area is determined: TARGET_AREA uses the uniform value TargetArea (times TargetAreaFactor); TARGET_AREA_ARRAY interpolates the per-point array named by TargetAreaArrayName at the triangle center (also scaled by TargetAreaFactor). Convenience setters SetElementSizeModeToTargetArea() and SetElementSizeModeToTargetAreaArray() are provided. Default: TARGET_AREA.
|
virtual |
Set/get how the local target triangle area is determined: TARGET_AREA uses the uniform value TargetArea (times TargetAreaFactor); TARGET_AREA_ARRAY interpolates the per-point array named by TargetAreaArrayName at the triangle center (also scaled by TargetAreaFactor). Convenience setters SetElementSizeModeToTargetArea() and SetElementSizeModeToTargetAreaArray() are provided. Default: TARGET_AREA.
|
inline |
Definition at line 208 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
inline |
Definition at line 210 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
virtual |
Toggle whether edges lying on an open boundary of the surface (or, when CellEntityIdsArrayName is set, on the boundary between two differently-tagged entities) are protected from flipping, collapsing, or splitting. When on, an EDGE_ON_BOUNDARY test always blocks the corresponding operation. Default: off.
|
virtual |
Toggle whether edges lying on an open boundary of the surface (or, when CellEntityIdsArrayName is set, on the boundary between two differently-tagged entities) are protected from flipping, collapsing, or splitting. When on, an EDGE_ON_BOUNDARY test always blocks the corresponding operation. Default: off.
|
virtual |
Toggle whether edges lying on an open boundary of the surface (or, when CellEntityIdsArrayName is set, on the boundary between two differently-tagged entities) are protected from flipping, collapsing, or splitting. When on, an EDGE_ON_BOUNDARY test always blocks the corresponding operation. Default: off.
|
virtual |
Toggle whether edges lying on an open boundary of the surface (or, when CellEntityIdsArrayName is set, on the boundary between two differently-tagged entities) are protected from flipping, collapsing, or splitting. When on, an EDGE_ON_BOUNDARY test always blocks the corresponding operation. Default: off.
|
virtual |
Set/get the name of the cell data array of the input holding an integer entity id per cell (e.g. distinguishing inlet/outlet/wall regions, such as produced by vtkvmtkCapPolyData). When set, the boundary between cells with different entity ids is treated like a mesh boundary and, together with ExcludedEntityIds, controls which triangles participate in remeshing. Commonly named "CellEntityIds".
|
virtual |
Set/get the name of the cell data array of the input holding an integer entity id per cell (e.g. distinguishing inlet/outlet/wall regions, such as produced by vtkvmtkCapPolyData). When set, the boundary between cells with different entity ids is treated like a mesh boundary and, together with ExcludedEntityIds, controls which triangles participate in remeshing. Commonly named "CellEntityIds".
|
virtual |
Set/get the list of CellEntityIdsArrayName entity ids whose triangles are left untouched by remeshing (skipped by all flip/collapse/split/relocation operations). Has no effect if CellEntityIdsArrayName is not set. If not set (default, NULL), no entities are excluded.
|
virtual |
Set/get the list of CellEntityIdsArrayName entity ids whose triangles are left untouched by remeshing (skipped by all flip/collapse/split/relocation operations). Has no effect if CellEntityIdsArrayName is not set. If not set (default, NULL), no entities are excluded.
|
overrideprotectedvirtual |
Definition at line 138 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 396 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 500 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 533 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 565 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 609 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 587 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 630 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1445 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1497 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1534 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1685 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1655 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1829 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 645 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 974 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1152 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1267 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1385 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1089 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1146 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 824 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 468 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 661 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 446 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 1607 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 698 of file vtkvmtkPolyDataSurfaceRemeshing.cxx.
|
protected |
Definition at line 325 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 326 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 327 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 328 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 329 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 330 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 331 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 332 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 333 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 335 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 336 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 337 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 338 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 339 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 340 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 341 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 343 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 345 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 346 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 347 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 348 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 349 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 350 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 351 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 352 of file vtkvmtkPolyDataSurfaceRemeshing.h.
|
protected |
Definition at line 354 of file vtkvmtkPolyDataSurfaceRemeshing.h.