Class PlanarHoleFiller
Try to fill planar holes in a mesh. The fill is computed by mapping the hole boundary into 2D,
filling using 2D algorithms, and then mapping back to 3D. This allows us to properly handle cases like
nested holes (eg from slicing a torus in half).
PlanarComplex is used to sort the input 2D polyons.
MeshInsertUVPolyCurve is used to insert each 2D polygon into a generated planar mesh.
The resolution of the generated mesh is controlled by .FillTargetEdgeLen
In theory this approach can handle more geometric degeneracies than Delaunay triangluation.
However, the current code requires that MeshInsertUVPolyCurve produce output boundary loops that
have a 1-1 correspondence with the input polygons. This is not always possible.
Currently these failure cases are not handled properly. In that case the loops will
not be stitched.
Inheritance
PlanarHoleFiller
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class PlanarHoleFiller
Constructors
PlanarHoleFiller(DMesh3)
Declaration
public PlanarHoleFiller(DMesh3 mesh)
Parameters
Type |
Name |
Description |
DMesh3 |
mesh |
|
PlanarHoleFiller(MeshPlaneCut)
Declaration
public PlanarHoleFiller(MeshPlaneCut cut)
Parameters
Fields
FailedInsertions
Declaration
public int FailedInsertions
Field Value
FailedMerges
Declaration
Field Value
FillTargetEdgeLen
fill mesh will be tessellated to this length, set to
double.MaxValue to use zero-length tessellation
Declaration
public double FillTargetEdgeLen
Field Value
MergeFillBoundary
in some cases fill can succeed but we can't merge w/o creating holes. In
such cases it might be better to not merge at all...
Declaration
public bool MergeFillBoundary
Field Value
Mesh
Declaration
Field Value
OutputHasCracks
Declaration
public bool OutputHasCracks
Field Value
PlaneNormal
Declaration
public Vector3d PlaneNormal
Field Value
PlaneOrigin
Declaration
public Vector3d PlaneOrigin
Field Value
Methods
AddFillLoop(EdgeLoop)
Declaration
public void AddFillLoop(EdgeLoop loop)
Parameters
AddFillLoops(IEnumerable<EdgeLoop>)
Declaration
public void AddFillLoops(IEnumerable<EdgeLoop> loops)
Parameters
Fill()
Compute the fill mesh and append it.
This returns false if anything went wrong.
The Error Feedback properties (.OutputHasCracks, etc) will provide more info.
Declaration
Returns
SetPlane(Vector3d, Vector3d)
Declaration
public void SetPlane(Vector3d origin, Vector3d normal)
Parameters
SetPlane(Vector3d, Vector3d, Vector3d, Vector3d)
Declaration
public void SetPlane(Vector3d origin, Vector3d normal, Vector3d planeX, Vector3d planeY)
Parameters