PK_EDGE_reset_precision_2   

PK_ERROR_code_t                    PK_EDGE_reset_precision_2
(
--- received arguments ---
PK_EDGE_t                          edge,    --- edge
const PK_EDGE_reset_precision_o_t *options, --- options

--- returned arguments ---
PK_reset_prec_t             *const result
)


This function attempts to reset the precision of the given 'edge' to the
session precision: that is to make Parasolid regard the edge as exact.


The function aims to remove all fin curves and delete them if possible and
to represent the geometry of the edge by a single curve attached to the edge.
This operation may not always be possible - the level of success is indicated
by 'result' which can take the following values:

   PK_reset_prec_ok_c             geometry successfully replaced and precision
                                  set to session precision

   PK_reset_prec_tangent_c        geometry not replaced and precision
                                  unaltered because surfaces are approximately
                                  tangential at edge

   PK_reset_prec_missing_geom_c   not enough geometry present on edge or
                                  adjacent faces to recompute edge geometry

   PK_reset_prec_failure_c        recomputation of edge geometry failed.

The function attempts to replace geometry and precision as follows:

. if all adjacent faces of the edge have surface geometry attached, a
  3-space curve of intersection will be derived by re-intersection of
  these surfaces. Extensive pre-checks will be made to ensure that
  tangent or near-tangent configurations (such as boundaries of
  Variable Radius Blends) are not attempted in this way. In these cases
  the token PK_reset_prec_tangent_c will be returned, and the edge geometry and
  precision will be unchanged. There will also be cases where the edge is not
  a near tangency, but nevertheless a new curve of intersection could not be
  computed (for example, the adjacent surfaces may simply not intersect to
  Parasolid default precision); in such cases PK_reset_prec_failure_c
  will be returned.  If the function is successful, the 'result' will be set
  to PK_reset_prec_ok_c.

. if Parasolid can determine that one of the curves on a fin, or the nominal
  curve of the edge if present, lies on all the surfaces, then it will use
  that curve for the edge. This behaviour can be controlled by the 'method'
  option.

. if not all face geometries are present, as at the boundary of a
  sheet body, the SP-curve present on the relevant fin will be first
  simplified to its 3-space equivalent (if it was a constant parameter
  curve) and this new curve attached to the edge. If no simplification
  was possible, the SP-curve itself will be transferred to the edge.
  In either case PK_reset_prec_ok_c will be returned in 'result' if the
  geometry was successfully recomputed.

If insufficient geometry was present to successfully replace the precision
of the edge, PK_reset_prec_missing_geom_c will be returned.

The function will also attempt to set the precision of each vertex of the edge
to Parasolid default. It will only be able to do this if all the other
edges meeting at the vertex in question have Parasolid default precision
associated with them, and the new 3-space curve intersects at a unique
point with all the other edge curves meeting there.

The behaviour of the function can be controlled by the option structure.
See PK_EDGE_reset_precision_o_t for details.