 |
PK_EDGE_set_precision |
|
PK_ERROR_code_t PK_EDGE_set_precision
(
--- received arguments ---
PK_EDGE_t edge, --- edge
double precision, --- required precision
--- returned arguments ---
int *const n_new_edges, --- number of new edges
PK_EDGE_t **const new_edges --- new edges
)
This function sets the 'precision' of the given 'edge'.
NOTE: This function is deprecated and has been superseded by
PK_EDGE_set_precision_2.
Specific Errors:
PK_ERROR_general_body generalised topology not enabled (MILD)
PK_ERROR_missing_geom the adjacent faces have no surfaces (MILD)
PK_ERROR_bad_tolerance either the edge is too short or the
tolerance is too small (MILD/SERIOUS)
PK_ERROR_failed_to_create_sp SP-curve generator failed for unknown
reason (MILD)
PK_ERROR_tolerances_too_tight SP-curve generator could not achieve
tolerance (MILD/SERIOUS)
The action of this function depends on whether the 'edge' previously had no
geometry attached, the 'edge' previously had a non-default precision
associated with it or the 'edge' previously did not have a precision
associated with it (i.e. whether Parasolid regarded the edge as "exact").
The action for an edge with no geometry attached is as follows:
An edge with no geometry attached to it or any fin has special behaviour. On
such an edge, if 'precision' is greater than 5.0e-9 then the precision of the
edge will become 'precision' and the application will have the ability to
attach SP-curves to its fins. If 'precision' is less than or equal to 5.0e-9,
then the edge will be made accurate and the application will lose the ability
to attach SP-curves to the fins. The edge may belong to a general body.
The action for an exact edge is as follows:
The 3-space edge curve is used to create SP-curves on the adjacent
surfaces, which are subsequently attached to the fins of the edge.
The precision of the edge is to be viewed as a band of uncertainty within
which all defining SP-curves lie.
There will always be the following side-effects:
. The original 3-space curve will be detached and deleted if possible.
. The precisions of all vertices on the edge will be increased if
necessary so as to be greater than or at least equal to 'precision'.
The point on the vertex will be recomputed.
. It will be impossible to make the edge "exact" again by using
PK_EDGE_set_precision. Once this routine has been used on an edge,
it will continue to be represented geometrically by means of SP-curves
attached to the fins unless PK_EDGE_reset_precision is called.
Additionally, the following may occur:
. It may not always be possible to compute one SP-curve from the
original curve and the relevant face surface. This will be due
to G1 discontinuities (in the surface parameter space) which will
have to be represented as extra vertices. The edge may therefore
be split a number of times, once for every surface singularity or
discontinuity which lay on the original curve. Any new edges created
by this process will be returned to the application in 'new_edges'.
It is an error if the edge is shorter than twice the given 'precision'.
The action for an edge already possessing a precision is as follows:
The SP-curve(s) already present on the fins of the edge will be
unchanged. The precision of the edge will be set to 'precision'.
The precisions of vertices of the edge will be increased if
necessary so as to be greater than or at least equal to the supplied
precision. It should be noted that reducing the precision value on
an already inexact edge is not recommended, as the existing
SP-curve(s) will not be replaced in this case. Hence such an edge
may fail checking.
If the edge belongs to a general body and generalised topology is not enabled
(see PK function PK_SESSION_set_general_topology) the error
PK_ERROR_general_body will be returned.