ZLab.Discrete ZLab.Discrete
ZLab.Discrete ZLab.Discrete
Developed by Zeke Zhang

Search Results for

    Edit this page

    Method Weld

    | Edit this page View Source

    Weld(float)

    Welds (merges) vertices that are within the specified tolerance.

    Declaration
    public void Weld(float tolerance = 1E-06)
    Parameters
    Type Name Description
    float tolerance

    Distance tolerance for welding vertices. Must be a positive finite number. Default is 1e-6.

    Remarks

    This method modifies the mesh in place by merging vertices that are closer than the specified tolerance. It is essential for Fill3D(OccupancyGrid) to work correctly on meshes with duplicate or near-duplicate vertices. Call RecomputeBounds() and RecomputeWaterTight() afterward if you rely on bounds or watertight checks.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if tolerance is not a positive finite number.