Class FaceGroupUtil
Inheritance
FaceGroupUtil
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public static class FaceGroupUtil
Methods
CountAllGroups(DMesh3)
count number of tris in each group in mesh
returned pairs are [group_id, tri_count]
Declaration
public static SparseList<int> CountAllGroups(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
FindAllGroups(DMesh3)
find the set of group ids used in mesh
Declaration
public static HashSet<int> FindAllGroups(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
Type |
Description |
HashSet<Int32> |
|
FindTrianglesByGroup(IMesh, Int32)
find list of triangles in mesh with specific group id
Declaration
public static List<int> FindTrianglesByGroup(IMesh mesh, int findGroupID)
Parameters
Type |
Name |
Description |
IMesh |
mesh |
|
Int32 |
findGroupID |
|
Returns
FindTriangleSetsByGroup(DMesh3, Int32)
collect triangles by group id. Returns array of triangle lists (stored as arrays).
This requires 2 passes over mesh, but each pass is linear
Declaration
public static int[][] FindTriangleSetsByGroup(DMesh3 mesh, int ignoreGID = -2147483648)
Parameters
Returns
Type |
Description |
Int32[][] |
|
SeparateMeshByGroups(DMesh3)
Declaration
public static DMesh3[] SeparateMeshByGroups(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
Returns
SeparateMeshByGroups(DMesh3, out Int32[])
split input mesh into submeshes based on group ID
does not separate disconnected components w/ same group ID
Declaration
public static DMesh3[] SeparateMeshByGroups(DMesh3 mesh, out int[] groupIDs)
Parameters
Returns
SetGroupID(DMesh3, IEnumerable<Int32>, Int32)
Set group id of subset of triangles in mesh
Declaration
public static void SetGroupID(DMesh3 mesh, IEnumerable<int> triangles, int to)
Parameters
SetGroupID(DMesh3, Int32)
Set group ID of all triangles in mesh
Declaration
public static void SetGroupID(DMesh3 mesh, int to)
Parameters
SetGroupToGroup(DMesh3, Int32, Int32)
Declaration
public static void SetGroupToGroup(DMesh3 mesh, int from, int to)
Parameters