Module |
|
Header |
/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/Operations/MeshPlaneCut.h |
Include |
#include "Operations/MeshPlaneCut.h" |
class FMeshPlaneCut
Cut the Mesh with the Plane. The positive side, ie (p-o).n > 0, is removed. If possible, returns boundary loop(s) along cut (this will fail if cut intersected with holes in mesh). Also FillHoles() for a topological fill. Or use CutLoops and fill yourself.
Algorithm is: 1) find all edge crossings 2) optionally discard any triangles with all vertex distances < epsilon. 3) Do edge splits at crossings 4 option a) (optionally) delete all vertices on positive side 4 option b) (OR optionally) disconnect all triangles w/ vertices on positive side (if keeping both sides) 4 option c) do nothing (if keeping both sides and not disconnecting them) 5) (optionally) collapse any degenerate boundary edges 6) (optionally) change an attribute tag for all triangles on positive side 7) find loops through valid boundary edges (ie connected to splits, or on-plane edges) (if second half was kept, do this separately for each separate mesh ID label)
Name | Description | ||
---|---|---|---|
|
bCollapseDegenerateEdgesOnCut |
||
|
double |
DegenerateEdgeTol |
|
|
EdgeFilterFunc |
If set, only edges that pass this filter will be split |
|
|
HoleFillTriangles |
Triangle IDs of hole fill triangles. Outer array is 1:1 with the OpenBoundaries array. |
|
|
FDynamicMesh3 &... |
Mesh |
Inputs |
|
OnCutVertices |
Set of vertices lying on plane after calling SplitCrossingEdges |
|
|
OpenBoundaries |
Note: loops and spans within a single FOpenBoundary could be part of the same hole-fill triangulation separate open boundary structs will be considered separately and will not share hole fill triangles |
|
|
PlaneNormal |
||
|
PlaneOrigin |
||
|
double |
PlaneTolerance |
Tolerance distance for considering a vertex to be 'on plane' |
|
ResultRegions |
List of output cut regions (eg that have separate GroupIDs). |
|
|
float |
UVScaleFactor |
UVs on any hole fill surfaces are scaled by this amount |
Name | Description | |
---|---|---|
|
FMeshPlaneCut ( |
Cut mesh with plane. Assumption is that plane normal is Z value. |
Name | Description | |
---|---|---|
|
~FMeshPlaneCut() |
Name | Description | ||
---|---|---|---|
|
CollapseDegenerateEdges |
||
|
Cut() |
Compute the plane cut by splitting mesh edges that cross the cut plane, and then deleting any triangles on the positive side of the cutting plane. |
|
|
CutWithoutDelete ( |
Compute the plane cut by splitting mesh edges that cross the cut plane, but not deleting triangles on positive side. |
|
|
ExtractBoundaryLoops ( |
||
|
HoleFill |
Fill cut loops with FPlanarHoleFiller, using a caller-provided triangulation function |
|
|
SimpleHoleFill ( |
Fill cut loops with FSimpleHoleFiller |
|
|
SplitCrossingEdges |
||
|
SplitEdgesOnly ( |
Compute the plane cut by splitting mesh edges that cross the cut plane, and then optionally update groups |
|
|
TransferTriangleLabelsToHoleFillTriangles |
||
|
EOperationVa... |
Validate() |
Name |
Description |
|
---|---|---|
|
FCutResultRegion |
|
|
FOpenBoundary |
TODO support optionally restricting plane cut to a mesh selection MeshFaceSelection CutFaceSet; Outputs |