PK_BODY_offset_planar_wire   


PK_ERROR_code_t                       PK_BODY_offset_planar_wire
(
--- received arguments ---
PK_BODY_t                             wire_body,   --- planar wire body
double                                offset,      --- offset distance
PK_VECTOR1_t                          normal,      --- normal of the plane
PK_EDGE_t                             ref,         --- reference edge
const PK_BODY_offset_planar_wire_o_t *options,     --- options structure

--- returned arguments ---
int                            *const n_new_wires, --- number of new wires
PK_BODY_t                     **const new_wires,   --- new wires
PK_TOPOL_track_r_t             *const tracking     --- tracking information
)


This function offsets a planar wire body in the plane by a specified
distance. Edges of the new offset wire bodies are paired with their
originating edges or vertices in the tracking information.


Specific Errors:
    PK_ERROR_bad_value          An invalid input is detected.
    PK_ERROR_cant_offset        Unable to produce valid edges for offset body.
    PK_ERROR_check_error        An offset body failed local checking.
    PK_ERROR_not_implemented    An unavailable functionality is called.
    PK_ERROR_cant_get_point     Unable to get new vertex point to fill a gap.
    PK_ERROR_cant_get_curve     Unable to get offset curve of an edge.


wire_body must be a manifold connected wire body and lie on a plane whose
normal is normal.  The edge ref must be an edge of wire_body and it is
used to determine the direction of the offset.  If you stand on the plane
with normal pointing upwards, looking along ref, then a positive
offset is to your right.

Curves other than lines, circles and bcurves are converted to bcurves before
offsetting.  The application can set the required accuracy of the curve
conversion in the options structure.

The edges of new_wires and their originating edges or vertices in
wire_body are listed in the tracking information. Each new edge is either
the offset of a portion of an edge of wire_body or a segment that fills the
gap corresponding to a vertex of wire_body opened up by the offset operation.
See documentation for PK_TOPOL_track_r_t.

If the function fails, then an entity of wire_body will be placed in the
error standard form to indicate the location of the error.

The identity of the error locator defaults to wire_body and is then
modified during the offset operation when a traceable error is encountered.
For PK_ERROR_cant_get_point, the entity is set to the corresponding vertex
of wire_body where gap filling is required by the offset operation. For
PK_ERROR_cant_get_curve, the error locating entity is returned as the
edge of wire_body whose offset curve has not been successfully found.
For all other errors, the locating entity is reset to an edge or a
vertex of the input wire body if it originates the product entity of the
offset operation where the first error of the process is detected.