PK_MESH_store_normals_o_t   

struct PK_MESH_store_normals_o_s
    {
    int                      o_t_version;    --- version number of
                                             --- option structure
    PK_LOGICAL_t             have_mesh_angle;--- whether a 'mesh_angle' is
                                             --- supplied (PK_LOGICAL_false)
    double                   mesh_angle;     --- mesh angle
    PK_MESH_replace_normal_t replace;        --- which currently stored
                                             --- normals should be replaced
                                             --- (PK_MESH_replace_normal_all_c)
    int                      n_mtopols;      --- number of 'mtopols' (0)
    PK_MTOPOL_t             *mtopols;        --- specified mtopols (NULL)
    int                     *mtopol_normal_indices;
                                             --- indices mapping normals to
                                             --- mtopols (NULL)
    int                      n_mtopol_normals;
                                             --- number of 'mtopol_normals'(0)
    PK_VECTOR1_t            *mtopol_normals; --- supplied normals (NULL)
    };
typedef struct PK_MESH_store_normals_o_s PK_MESH_store_normals_o_t;


This structure contains optional controls for PK_MESH_store_normals.



Specific Errors:
    PK_ERROR_mtopols_not_same_mesh 'mtopols' not all from same mesh (MILD)
                                   or
                                   'mtopols' not in 'mesh' (MILD)
    PK_ERROR_duplicate_array_item  'mtopols' contains duplicates (MILD)
    PK_ERROR_bad_combination       'replace' is PK_MESH_replace_normal_mtopol_c
                                   and 'n_mtopols' is zero. (MILD)
                                   or
                                   'replace' is PK_MESH_replace_normal_mtopol_c
                                   and the 'mesh' does not have stored
                                   normals. (MILD)
    PK_ERROR_bad_value             integer value in 'mtopol_normal_indices'
                                   array is not -1 and does not lie between 0
                                   and 'n_mtopol_normals'. (MILD)
    PK_ERROR_wrong_mtopol          element in 'mtopols' array is not of type
                                   PK_CLASS_mfin or PK_CLASS_mvertex (MILD)
                                   or
                                   'mtopols' contains a mfin and also the
                                   mfin's mvertex (MILD)
    PK_ERROR_bad_tolerance         'mesh_angle' is either < 0 or > pi (MILD)

Used in:

PK_MESH_store_normals



Mesh angle
    If 'have_mesh_angle' is set to PK_LOGICAL_true the supplied 'mesh_angle'
    will override the session mesh_angle returned by PK_SESSION_ask_mesh_angle.
    See the documentation of PK_SESSION_ask_mesh_angle for more information.

Replace
    For meshes that do not have stored normals the 'replace' option must be
    set to PK_MESH_replace_normal_all_c, otherwise the error
    PK_ERROR_bad_combination will be returned.

    For meshes with stored normals setting 'replace' to
    PK_MESH_replace_normal_all_c will result in all normals in the mesh being
    replaced.  Setting 'replace' to PK_MESH_replace_normal_mtopol_c will result
    in only those mtopols supplied in 'mtopols' having their normals replaced.

Specifying mtopols and associated normals
    The 'mtopols' field can be used to specify an array of unique mtopols
    (mfins and/or mvertices) for which the normal is to be replaced.  The
    normal can either be supplied or else Parasolid will calculate the
    normal using either the session mesh angle or the 'mesh_angle' option if
    given.

    For mfins the mvertex normal of the mfin will be replaced.  For mvertices
    the mvertex normals for each of the mfins at the given mvertex will be
    replaced.

    If the 'mtopols' array contains both an mfin and its mvertex the error
    PK_ERROR_wrong_mtopol is returned.

    'mtopol_normals'
    This field is an array of length 'n_mtopol_normals' containing all the
    supplied normals.  If set to NULL no normals are supplied and the normals
    for each of the 'mtopols' will be calculated by Parasolid.

    'mtopol_normal_indices'
    This field must either be NULL or of length 'n_mtopols'.  If NULL, all of
    the 'mtopols' will have their normals calculated.  If of length 'n_mtopols'
    it takes integer values corresponding to indexes into the 'mtopol_normals'
    array.  For each mtopol in 'mtopols', the corresponding entry in
    'mtopol_normal_indices' is the index into 'mtopol_normals' corresponding to
    the the normal to be stored.
    It is possible to supply an index of -1 indicating that the normal should
    be calculated by Parasolid rather than be set to one of the normals
    supplied in 'mtopol_normals'.

    For elements of 'mtopols' of class PK_CLASS_mvertex, if a normal is
    supplied all mfins at this mvertex will share this normal, whereas if the
    normal is calculated the mfins at the mvertex can have different normals.