Navigation
API > API/Plugins > API/Plugins/DynamicMesh
FMeshResolveTJunctions splits edges to create matching vertices at T-Junctions in the mesh. T-Junctions are edge configurations where a border vertex lies on an opposing border edge. This frequently occurs in (eg) CAD meshes where the tessellator had bugs or simply did not bother to ensure that tessellations match on adjacent spline patches.
The simplest case would be, one side has two collinear edges [A,B] and [B,C], and the other side has edge [F,G] such that F/A and G/C are coincident. The implementation works by adding a matching vertex to [F,G], via an edge split at the projected location of B, to create a new vertex X that could be welded with B. F A F A So basically it | | | | turns this | B into this one X B configuration | | | | G C G C
If everything is within-tolerance, then after resolving all the T-Junctions, a FMergeCoincidentMeshEdges would successfully weld the new set of border edges back together (note: caller must do this, FMeshResolveTJunctions only splits, it does not weld!)
Caller can provide a subset of edges via BoundaryEdges, otherwise all boundary edges in Mesh will be used.
Current implementation is O(N*M) in the number of boundary edges (N) and boundary vertices (M). Could be improved with a spatial data structure.
| Name | FMeshResolveTJunctions |
| Type | class |
| Header File | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Operations/MeshResolveTJunctions.h |
| Include Path | #include "Operations/MeshResolveTJunctions.h" |
Syntax
class FMeshResolveTJunctions
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMeshResolveTJunctions
(
FDynamicMesh3* MeshIn |
Operations/MeshResolveTJunctions.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DEFAULT_TOLERANCE | const double | Default tolerance is float ZeroTolerance | Operations/MeshResolveTJunctions.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BoundaryEdges | TSet< int32 > | Subset of mesh boundary edges (otherwise all boundary edges are processed) | Operations/MeshResolveTJunctions.h | |
| DistanceTolerance | double | Distance threshold used for various checks (eg is vertex on edge, end endpoint tolerance, etc) | Operations/MeshResolveTJunctions.h | |
| Mesh | FDynamicMesh3 * | The mesh that we are modifying | Operations/MeshResolveTJunctions.h | |
| NumSplitEdges | int32 | Number of edges that were split to resolve T-junctions | Operations/MeshResolveTJunctions.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Apply() |
Run the resolve operation and modify .Mesh | Operations/MeshResolveTJunctions.h |