PK_BODY_create_sheet_planar   

PK_ERROR_code_t                        PK_BODY_create_sheet_planar
(
--- received arguments ---
int                                    n_vectors,  --- number of position
                                                   --- vectors
const PK_VECTOR_t                      vectors[],  --- position vectors
                                                   --- at vertices
const PK_BODY_create_sheet_planar_o_t *options,    --- option structure

--- returned arguments ---
PK_BODY_t                             *const body  --- sheet body returned
)


This function creates a planar sheet whose boundary is an irregular polygon.
The option also exists to create irregular polygonal holes within this sheet.


Specific Errors:
    PK_ERROR_bad_box               (MILD) at least one point lies outside of
                                   the size box
    PK_ERROR_edges_intersect       (SERIOUS) edges of a loop intersect with
                                   other edges of that loop
    PK_ERROR_unsuitable_loop       (SERIOUS) badly orientated loop,
    PK_ERROR_coincident_points     (SERIOUS) the same point occurs more than
                                   once within the loops
    PK_ERROR_lt_3_sides            (MILD) at least one loop has fewer than 3
                                   edges


Within its local coordinate system, this function creates a planar sheet body
with 'n_vectors' on a given plane.

The 'loops' allow for the construction of holes within the sheet body.  If the
'loops' field of the options structure is NULL (the default), then the
position vectors given clockwise (when viewed in the direction of the
surface normal) form a single loop which is the exterior of the sheet body.
Loops are always completed by joining the last position in the loop to the
first position in the loop. When multiple loops are input, the position vectors
of the exterior loop must be given in order clockwise (when viewed in the
direction of the surface normal).  All other loops are holes and must have
their position vectors input anticlockwise (when viewed in the direction of the
surface normal).  Each loop is assigned an arbitrary unique integer index.
The 'loops' field of the options structure is an array of the same length
as 'vectors'.  For each position vector in 'vectors', the corresponding entry
in 'loops' is the loop index for the loop to which the position belongs, the
position vectors for each loop must be contiguous and given in order around the
loop.

It is not possible to use this function for the creation of disjoint sheet
bodies.