Class FaceGroupOptimizer
Given input mesh with a set of face groups, optimize the face group boundaries.
This involves flipping triangles between groups, and/or assigning to "background" group.
Also has Dilate/Contract functions to grow/shrink groups in various ways.
Inheritance
FaceGroupOptimizer
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class FaceGroupOptimizer
Constructors
FaceGroupOptimizer(DMesh3)
Declaration
public FaceGroupOptimizer(DMesh3 meshIn)
Parameters
Type |
Name |
Description |
DMesh3 |
meshIn |
|
Fields
BackgroundGroupID
Declaration
public int BackgroundGroupID
Field Value
DontClipEnclosedFins
Declaration
public bool DontClipEnclosedFins
Field Value
GetEnumeratorF
Declaration
public Func<IEnumerable<int>> GetEnumeratorF
Field Value
NoEarGroupSwaps
Declaration
public bool NoEarGroupSwaps
Field Value
Properties
Mesh
Declaration
public DMesh3 Mesh { get; }
Property Value
Methods
ClipFins(Boolean)
Declaration
public int ClipFins(bool bClipLoners)
Parameters
Type |
Name |
Description |
Boolean |
bClipLoners |
|
Returns
ContractAllGroups(Int32, Boolean)
Simultaneously contract all groups by N rings.
if bBackroundOnly=true, then non-background group borders stay connected,
otherwise they pull apart.
Declaration
public int ContractAllGroups(int nRings, bool bBackgroundOnly)
Parameters
Returns
DilateAllGroups(Int32)
Simultaneously grow all groups into areas with background group id, expanding
by N rings. does not expand across group borders.
Declaration
public int DilateAllGroups(int nRings)
Parameters
Type |
Name |
Description |
Int32 |
nRings |
|
Returns
FillEars(Boolean)
Declaration
public int FillEars(bool bFillTinyHoles)
Parameters
Type |
Name |
Description |
Boolean |
bFillTinyHoles |
|
Returns
LocalOptimize(Boolean, Boolean, Boolean, Boolean, Int32)
Do rounds of ear-filling and fin-clipping until we can't anymore
Returns true if group assignments were modified
Declaration
public bool LocalOptimize(bool bClipFins, bool bFillEars, bool bFillTinyHoles = true, bool bClipLoners = true, int max_iters = 100)
Parameters
Returns