 |
PK_EDGE_repair |
|
PK_ERROR_code_t PK_EDGE_repair
(
--- received arguments ---
int n_edges, --- number of edges (may be zero)
const PK_EDGE_t edges[], --- edges
const PK_EDGE_repair_o_t *options, --- options structure
--- returned arguments ---
PK_TOPOL_track_r_t *const tracking --- tracking information
)
This function attempts to repair an array of edges, i.e. make them valid.
This function offers partial support for facet geometry [PF]
Specific Errors:
PK_ERROR_missing_geom either the edge has no curve or the
adjacent faces have no surfaces (MILD)
PK_ERROR_bad_tolerance either the edge is too short or
the required tolerance is greater than
the 'max_tolerance' option allows (MILD)
PK_ERROR_failed_to_create_sp SP-curve generator failed (MILD)
PK_ERROR_tolerances_too_tight SP-curve generator could not achieve
tolerance (SERIOUS)
PK_ERROR_cant_do_intersect The adjacent face surfaces could not be
intersected - probably due to tangency or
near tangency (SERIOUS)
PK_ERROR_facet_geometry A facet/mixed edge was either non-manifold
or caused an internal algorithm failure
(SERIOUS)
The method(s) employed to repair classic edges are controlled by setting
the 'ensure_on_surfs' and 'intersect' flags in the options structure.
These flags do not affect the repair of facet/mixed edges.
This function is primarily intended for use when a model is being imported into
Parasolid via a data exchange format.
Edges are split to remove G1 discontinuities.
Edges with facet/mixed geometry attached can only be repaired if they are
manifold, otherwise PK_ERROR_facet_geometry is returned.
If the option 'ensure_on_surfs' is set to PK_LOGICAL_true, a suitable
tolerance is applied to any classic edges if necessary, to ensure they each
lie on their adjacent surfaces.
If the option 'intersect' is set to PK_LOGICAL_true, a suitable accurate
curve is found for any classic edges where necessary and possible, by
intersecting the adjacent faces of each.
If both options are selected then the accurate method will be attempted first.
Note however that there are various circumstances in which the accurate
solution will not be attempted - for instance if the edge is laminar, has
surfaces which meet tangentially or has surfaces which need geometric repair
using PK_FACE_repair.
The returned 'tracking' contains a track record for each edge that has been
split.