Synopsis

PDX_MSGT gdx_FaceSealLoopGaps(long option, MDA_PTR gdx_face_ptr, double ms_gap_tol)

Description

This function is intended for use on independent faces only. The closing of gaps may result in the modification of parm curves and model curves such that the integrity of a solid would be compromised. This function requires that the face already have parm curves. If needed, call gdx_FaceGenerateParmCurves prior to calling this function. This function closes all gaps in loops on a face that are greater than ms_gap_tol in model space. Once a gap is detected between two edges or endpoints of the sole edge in a loop, the gap is fixed by modifying the parm curves or adding a edge to to fill the gap. The model curves in the loop are then regenerated from the new parm curves. If the option is set to GDX_MODEL_ONLY then the function will look for gaps between model curves only. If the option is set to GDX_PARM_ONLY then the function will look for gaps between parm curves. The gap however is still measured in model space. If the option is set to GDX_MODEL_PARM_BOTH then the function will look for gaps between parm curves and model curves. If a gap is measured to be larger than than ms_gap_tol parm curves will be modified to close the gap. Specifically, if the gap is less than 10* ms_gap_tol the function will fix the gap by moving the parm curve end points closer together and then regenerate the model curve from the modified parm curves. Otherwise, if the gap is larger than 10*ms_gap_tol it will add a small edge to fill the gap.

ms_gap_tol defines the minimal gap to be closed. The value of ms_gap_tol should be small enough such that all gaps to be closed are larger than this value in model space. At the same time it should not be too small as degenerate curves (edges) could be result. The optimal value of ms_gap_tol is specific to the face data, specifically, the gaps measured verses length of edges. In general, the minimum recommended value for ms_gap_tol is gdx_ModelSpacePntTol. Values of 10 to 100 times gdx_ModelSpacePntTol are probably better.

Input

option

GDX_MODEL_ONLY

Check for gaps between model curves only

GDX_PARM_ONLY

Check for gaps between parm curves only.

GDX_MODEL_PARM_BOTH

Check for gaps in model and parm curves

gdx_face_ptr

Database pointer of the GDX face.

ms_gap_tol

Tolerance for checking gaps

Output

gdx_face_ptr

Database pointer of the modified GDX face.

Return

      GDX_NOERR
      Low level error return
      .fi