PK_SURF_offset   


PK_ERROR_code_t  PK_SURF_offset
(
--- received arguments ---
PK_SURF_t        underlying_surf,   --- underlying surface
double           offset_distance,   --- offset distance

--- returned arguments ---
PK_SURF_t *const surf               --- surface returned
)


This function creates a surface offset from the underlying_surf by
offset_distance.



Specific Errors:
    PK_ERROR_cant_offset            underlying surface cannot be offset
    PK_ERROR_su_self_intersect      surface would be self intersecting
    PK_ERROR_distance_too_small     the offset distance was too small
    PK_ERROR_sum_of_offsets_eq_0    the given surface was an offset surface and
                                    the accumulative offset distance was zero


The underlying_surf should be a smooth, continuous(G1) surface. The
offset_distance should be non-zero. The surface returned is coincident
with that obtained by adding to each point on the underlying_surf
a unit normal vector scaled by the offset_distance.

The offset_distance is positive in the normal direction as provided by
PK_SURF_eval_with_normal and negative in the opposite direction.

PK_SURF_offset will not allow the application to supply an offset distance
such that the resulting surface would be inside out. For example, a sphere
cannot be offset inwards by more than its radius.

Parasolid will attempt to return the simplest surface which satisfies the
offset condition

For surfaces of class PK_CLASS_fsurf the surface will only be created if the
underlying surface is not degenerate.

For surfaces of class PK_CLASS_bsurf, PK_CLASS_swept and PK_CLASS_spun,
the surface created will be checked for self intersections caused by
degeneracies on the underlying surface.

For surfaces of class PK_CLASS_offset, the offset distance of the newly created
offset surface must be non-zero.