|
MeshUtilsSplitMeshByIndexesOfTriangles Method |
SplitMeshByIndexesOfTriangles splits the originalMeshGeometry3D into mesh1 and mesh2 based on the list
of triangle indexes defined in indexesOfTriangles (can be get by
GetIntersectingTriangles(Rect3D, MeshGeometry3D, Transform3D) method).
When the triangle index is present in the indexesOfTriangles, then the triangle is added to mesh1, otherwise triangle is added to mesh2.
Note that mesh1 can be null (when indexesOfTriangles is null or empty).
mesh2 can be null when indexesOfTriangles contains the same number of triangles as the originalMeshGeometry3D.
Namespace: Ab3d.UtilitiesAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax public static void SplitMeshByIndexesOfTriangles(
MeshGeometry3D originalMeshGeometry3D,
List<int> indexesOfTriangles,
bool preserveOriginalPositionsCollection,
out MeshGeometry3D mesh1,
out MeshGeometry3D mesh2
)
Parameters
- originalMeshGeometry3D MeshGeometry3D
- MeshGeometry3D that will be split into mesh1 and mesh2
- indexesOfTriangles ListInt32
- list of integers that define the triangle indexes that will be added to mesh1
- preserveOriginalPositionsCollection Boolean
- when true, then the mesh1 and mesh2 use the original Positions collection. When false, new Positions collections is created for both meshes.
- mesh1 MeshGeometry3D
- out: created MeshGeometry3D with triangles that are specified in the indexesOfTriangles
- mesh2 MeshGeometry3D
- out: created MeshGeometry3D with triangles that are NOT specified in the indexesOfTriangles
See Also