PK_BODY_check_o_t   

struct PK_BODY_check_o_s
    {
    int                       o_t_version; --- version number of option
                                           --- structure
    int                       max_faults;  --- limit on fault numbers (10)
    PK_check_geom_t           geom;        --- bad geometry
                                           --- (PK_check_geom_yes_c)
    PK_check_bgeom_t          bgeom;       --- bad B geometry
                                           --- (PK_check_bgeom_yes_c)
    PK_check_mesh_t           mesh;        --- bad meshes
                                           --- (PK_check_mesh_yes_c)
    PK_check_top_geo_t        top_geo;     --- topology/geometry inconsistency
                                           --- (PK_check_top_geo_yes_c)
    PK_check_size_box_t       size_box;    --- size box violation
                                           --- (PK_check_size_box_yes_c)
    PK_check_fa_X_t           fa_X;        --- face self intersection
                                           --- (PK_check_fa_X_yes_c)
    PK_check_loops_t          loops;       --- loop checks
                                           --- (PK_check_loops_yes_c)
    PK_check_fa_fa_t          fa_fa;       --- face face inconsistency
                                           --- (PK_check_fa_fa_yes_c)
    PK_check_sh_t             sh;          --- negated or inconsistent shells
                                           --- (PK_check_sh_yes_c)
    PK_check_corrupt_t        corrupt;     --- corrupt data or identifiers
                                           --- (PK_check_corrupt_yes_c)
    PK_check_nmnl_geom_t      nmnl_geom;   --- bad nominal geometry
                                           --- (PK_check_nmnl_geom_yes_c)
    PK_check_returns_t        returns;     --- return version of fault info
                                           --- (PK_check_returns_0_c)
    PK_check_extra_faults_t   extra_faults;--- expand PK_BODY_state_corrupt_c
                                           --- (PK_check_extra_faults_0_c)
    PK_check_attribs_t        attribs;     --- check for validity of system
                                           --- attributes
                                           --- (PK_check_attribs_no_c)
    };

typedef struct PK_BODY_check_o_s PK_BODY_check_o_t;



This structure holds optional controls for checking a body.

Used in:

PK_BODY_check


The option structure allows the caller to control which checks are performed;
if no options are supplied, all checks appropriate to the body will be made


max_faults
----------
The caller may set an upper limit on the number of faults found, in
the option 'max_faults'; if 'max_faults' is zero, the first fault found
is returned as a PK error: PK_ERROR_check_error, with the entity at fault
returned in the PK_ERROR_sf_t structure.


geom
----
This can be set to one of:

PK_check_geom_no_c     don't do any geometry validity checks
PK_check_geom_basic_c  check for invalid or degenerate geometry
PK_check_geom_lazy_c   check for invalid, self-intersecting or
                       degenerate geometry
PK_check_geom_full_c   check for invalid, self-intersecting or
                       degenerate geometry, ignore results of pre-V5 checks
PK_check_geom_yes_c    check for invalid, self-intersecting or
                       degenerate geometry, ignore previous checks

Geometry which passes these tests is marked so that the cost of these
tests need only be incurred once. Geometry which fails is also marked for
the same reason.

The option PK_check_geom_full_c behaves just like PK_check_geom_lazy_c,
except that it forces a re-check of geometry marked as valid by
pre-V5 versions of Parasolid.

The option PK_check_geom_yes_c behaves just like PK_check_geom_lazy_c,
except that it always forces a full check of the geometry,
overriding the interface parameter, even if the geometry has
been marked as valid by a previous check.

The check faults associated with these checks are as follows

'state'                    |     'entity_1'      |         'position'
-------------------------------------------------------------------------------
PK_ENTITY_state_invalid_c  | invalid geometric   |        null
                           |     entity          |
                           |                     |
PK_GEOM_state_self_int_c   |  self-intersecting  |     point on the
                           |  geometric entity   |   self-intersection
                           |                     |
PK_GEOM_state_degenerate_c |  geometric entity   |      point from
                           |                     |   degenerate region
                           |                     |
PK_TOPOL_state_no_geom_c   | topological entity  |       null
                           |  with no geometry   |
                           |                     |


bgeom
-----
This can be set to one of:

PK_check_bgeom_no_c     don't do any B-geometry validity checks
PK_check_bgeom_yes_c    do all B-geometry continuity checks


Special checks on B-curves and B-surfaces:

There are special checks performed on B-curves and B-surfaces.


curves:

The restrictions on B-curves are:

    i)  A B-curve cannot have any first derivative of zero length.

   ii)  A B-curve cannot self-intersect.

  iii)  A B-curve cannot have a cusp interior to a segment.

   iv)  A B-curve must be at least position (G0) continuous.


surfaces:

The restrictions on B-surfaces are:


    i)  A B-surface cannot contain any first derivative of zero length, except
        at a legal degeneracy (defined below).

   ii)  A B-surface cannot self-intersect.

  iii)  A B-surface cannot have a ridge or a cusp interior to a patch.

   iv)  A B-surface must be at least position (G0) continuous.

    v)  A B-surface may meet itself in either the u or the v direction or both
        to form a closed surface.  If it does meet itself, it must do so all
        along the boundary.  It is illegal for for the surface to meet itself
        at a single point.


   vi)  A legal degeneracy is one which occurs only on a boundary of the
        surface, and which reduces all the boundary between two
        or more knot values to a single point.

   vii) A corner of a B-surface cannot be degenerate in both parameters.

Special checks on offsets of B-surfaces:

Offset surfaces whose underlying surfaces are B-surfaces are also checked for
self intersection.

The check_fault associated with this check is as follows

'state'                        |     'entity_1'       |      'position'
-------------------------------------------------------------------------------
PK_TOPOL_state_not_G1_c        |    face or edge      |       null
                               |                      |


mesh 
-----
This can be set to one of:

PK_check_mesh_no_c      don't do any mesh validity checks
PK_check_mesh_basic_c   check for invalid mesh topology or geometry
PK_check_mesh_yes_c     do all mesh validity checks


Special checks on Meshes

There are special checks performed on meshes.

The restrictions on meshes are:


    i)  A mesh cannot be non-manifold.

   ii)  A mesh cannot have an mfacet with a zero length mfin
        (degenerate mfacet).

  iii)  A mesh cannot have an mfacet of zero area (flat mfacet).

   iv)  A mesh cannot have slits, that is laminar mfins that occupy the
        same position.

    v)  A mesh cannot self-intersect.

   vi)  A mesh cannot have an mvertex normal that is opposed to all adjacent
        mfacet normals.

  vii)  A mesh that is attached to a face must not be disjoint.

 viii)  A mesh that is attached to a face must have all its boundary mfins
        along each edge of that face matched to the segments of any
        polyline attached to the edge.


The check_faults associated with this check are as follows

'state'                        |  'entity_1'  |      'position'
-------------------------------------------------------------------------------
PK_MESH_state_bad_mvx_normal_c |     mesh     |  (u, v, 0) where u,v are
                               |              |  the parameters of the mvertex
PK_MESH_state_corrupt_c        |     mesh     |  (u, v, 0) where u,v are
                               |              |  the parameters of the
                               |              |  corruption if available
PK_MESH_state_degen_mfacet_c   |     mesh     |  (u, v, 0) where u,v are
                               |              |  the parameters in the mfacet
PK_MESH_state_flat_mfacet_c    |     mesh     |  (u, v, 0) where u,v are
                               |              |  the parameters in the mfacet
PK_MESH_state_non_manifold_c   |     mesh     |  (u, v, 0) where u,v are
                               |              |  the parameters in the
                               |              |  non manifold region
PK_MESH_state_self_int_c       |     mesh     |  position on the
                               |              |  self intersection
PK_MESH_state_slit_c           |     mesh     |  position on the slit
                               |              |
PK_FACE_state_bad_edge_c       |     face     |
                               |              |
PK_FACE_state_disjoint_mesh_c  |     face     |


top_geo
-------
This can be set to one of:

PK_check_top_geo_no_c     don't do any topology geometry consistency checks
PK_check_top_geo_edge_c   check for inconsistencies between topology and
                          geometry of edges
PK_check_top_geo_face_c   check for inconsistencies between topology and
                          geometry of faces
PK_check_top_geo_yes_c    both edge and face checks



Special checks on geometry attached to topology:

If any option but PK_check_top_geo_no_c is selected,
then additional checks on the geometry attached to the body are performed.

The checks performed on curves attached to edges are:

    i)  The curve must be G1 continuous.

   ii)  If the curve is closed then it must have a periodic parameterisation.

The checks performed on surfaces attached to faces are:

  iii)  The surface must be G1 continuous.

   iv)  The constant parameter lines of the surface must be G1 continuous.

    v)  If the surface is closed in either direction then it must have a
        periodic parameterisation in that direction.

   vi)  The surface may only contain degeneracies along one of its
        boundaries if all of that boundary is degenerate.

Failure to pass these any of these checks will result in an
PK_TOPOL_state_not_G1_c code.

Checks i), iii), iv) and vi) are only performed if 'bgeom' is set to
PK_check_bgeom_yes_c


The check faults associated with these checks are as follows

'state'                        |'entity_1'|'entity_2'|      'position'
-------------------------------------------------------------------
PK_EDGE_state_open_c           |  edge    |          |       null
                               |          |          |
PK_EDGE_state_bad_vertex_c     |  edge    |  vertex  |       null
                               |          |          |
PK_EDGE_state_reversed_c       |  edge    |          |       null
                               |          |          |
PK_EDGE_state_vertices_touch_c |  edge    |          |       null
                               |          |          |
PK_EDGE_state_bad_face_order_c |  edge    |          |       null
                               |          |          |
PK_FACE_state_bad_vertex_c     |  face    |  vertex  |       null
                               |          |          |
PK_FACE_state_bad_edge_c       |  face    |   edge   |       null
                               |          |          |
PK_FACE_state_bad_edge_order_c |  face    |          |       null
                               |          |          |
PK_FACE_state_no_vtx_at_sing_c |  face    |          | point at singularity
                               |          |          |


size_box
--------
This can be set to one of:

PK_check_size_box_no_c     don't do size box checks
PK_check_size_box_yes_c    check for size box violations

The check fault associated with this check is as follows

'state'                        |   'entity_1'         |   'position'
-------------------------------------------------------------------------------
PK_TOPOL_state_size_box_c      |    face or edge      |       null
                               |                      |

fa_X
----
This can be set to one of:

PK_check_fa_X_no_c     don't do face self-intersection checks
PK_check_fa_X_yes_c    check for face self-intersections

The check faults associated with this check are as follows

'state'                        |'entity_1'|'entity_2'|  'position'
-------------------------------------------------------------------------------
PK_FACE_state_self_int_c       |   face   |          |  point in region of
                               |          |          |    inconsistency
                               |          |          |
PK_FACE_state_bad_wire_fa_ed_c |   face   |   edge   |  point in region of
                               |          |          |    inconsistency
                               |          |          |
PK_EDGE_state_bad_wire_ed_ed_c |   edge   |   edge   |  point in region of
                               |                     |    inconsistency
                               |                     |



loops
-----
This can be set to one of:

PK_check_loops_no_c     don't do loop checks
PK_check_loops_yes_c    check for loop consistency of faces

The check fault associated with this check is as follows

'state'                        |      'entity_1'      |     'position'
-------------------------------------------------------------------------------
PK_FACE_state_bad_loops_c      |        face          |       null
                               |                      |


fa_fa
-----
This can be set to one of:

PK_check_fa_fa_no_c     don't do face-face checks
PK_check_fa_fa_yes_c    check for face-face inconsistencies

The check fault associated with this check is as follows

'state'                        |'entity_1'|'entity_2'|     'position'
-------------------------------------------------------------------------------
PK_FACE_state_bad_face_face_c  |   face   |   face   | point in region of
                               |          |          |    inconsistency
                               |          |          |

sh
--
This can be set to one of:

PK_check_sh_no_c     don't do shell checks
PK_check_sh_yes_c    check for inside-out or inconsistent shells

The check faults associated with this check are as follows

'state'                        |'entity_1'|'entity_2'|     'position'
-------------------------------------------------------------------------------
PK_BODY_state_inside_out_c     |   body   |          |     null
                               |          |          |
PK_REGION_state_bad_shells_c   |  region  |          |     null
                               |          |          |
PK_BODY_state_bad_regions_c    |   body   |          |     null
                               |          |          |
PK_SHELL_state_bad_topol_geom_c|  shell   |          |     null
                               |          |          |
PK_SHELL_state_bad_sh_sh_c     |  shell   |   shell  |  point in region of
                               |          |          |    inconsistency
                               |          |          |


corrupt
-------
This can be set to one of:

PK_check_corrupt_no_c     don't do data structure checks
PK_check_corrupt_yes_c    check for corrupt data structure and check
                          identifiers

The check faults associated with this check are as follows

'state'                        |     'entity_1'       |   'position'
-------------------------------------------------------------------------------
PK_BODY_state_corrupt_c        |      body            |     null
                               |                      |
PK_BODY_state_invalid_ident_c  |      body            |     null
                               |                      |


nmnl_geom
---------
This can be set to one of:

PK_check_nmnl_geom_no_c     don't do nominal geometry checks
PK_check_nmnl_geom_yes_c    do nominal geometry checks

The check faults associated with this check are as follows

'state'                        |'entity_1'|'entity_2'|   'position'
-------------------------------------------------------------------------------
PK_EDGE_state_open_nmnl_c      |   edge   |          |     null
                               |          |          |
PK_EDGE_state_bad_vertex_nmnl_c|   edge   |  vertex  |     null
                               |          |          |
PK_EDGE_state_reversed_nmnl_c  |   edge   |          |     null
                               |          |          |
PK_EDGE_state_bad_sp_nmnl_c    |   edge   |          |     null
                               |          |          |


returns
-------
This can be set to one of:

PK_check_returns_0_c        return version 0 check fault information
PK_check_returns_1_c        return version 1 check fault information
PK_check_returns_2_c        return version 2 check fault information
PK_check_returns_3_c        return version 3 check fault information
PK_check_returns_4_c        return version 4 check fault information
PK_check_returns_5_c        return version 5 check fault information
PK_check_returns_latest_c   return latest check fault information

The default value for this option is PK_check_returns_0_c. This returns
basic fault information. In particular:

    i)  If 'state' is PK_FACE_state_self_int_c, 'entity_1' is the face whose
        boundary is self-intersecting.

   ii)  For curves and surfaces that are closed but not periodic, 'state' is
        PK_TOPOL_state_not_g1_c.

  iii)  For SP-curves on edges and fins with discontinuous underlying 2D
        B-curves or surfaces, 'state' is PK_ENTITY_state_invalid_c.

When this option is set to PK_check_returns_1_c or later, the changes to the
returned check fault information are as follows:

    i)  For 'state' PK_FACE_state_self_int_c, 'entity_1' and 'entity_2' will
        be the pair of intersecting fins in the face unless one of the
        clashing topologies is an isolated vertex in which case the entities
        returned will be a fin and the loop of the isolated vertex.

   ii)  For closed but not periodic curves and surfaces, 'state' will be
        PK_TOPOL_state_bad_closed_c.

  iii)  For SP-curves on edges and fins with discontinuous underlying 2D
        bcurves or surfaces, 'state' will be PK_TOPOL_state_not_G1_c and
        'entity_2' will be the bad underlying bcurve or surface.

When this option is set to PK_check_returns_2_c or later, the changes to the
returned check fault information are as follows:

    i)  All enhancements for PK_check_returns_1_c.

   ii)  If the geometry attached to a topological entity contains an invalid
        degeneracy, 'state' is one of the following, as appropriate:
            o PK_TOPOL_state_u_parm_degen_c
            o PK_TOPOL_state_v_parm_degen_c
            o PK_TOPOL_state_parm_degen_c
            o PK_TOPOL_state_u_phys_degen_c
            o PK_TOPOL_state_v_phys_degen_c
            o PK_TOPOL_state_phys_degen_c

When this option is set to PK_check_returns_3_c or later, the changes to the
returned check fault information are as follows:

    i)  All enhancements for PK_check_returns_2_c.

   ii)  A more stringent check will be carried out to determine whether
        edges lie within tolerance of their associated surfaces. If an
        invalidity is found, 'state' will be PK_FACE_state_bad_edge_c.

When this option is set to PK_check_returns_4_c or later, the changes to the
returned check fault information are as follows:

    i)  All enhancements for PK_check_returns_3_c.

   ii)  A more thorough check will be carried out to determine whether
        different vertices of adjacent faces are coincident. If an
        invalidity is found, 'state' will be PK_FACE_state_bad_face_face_c.

When this option is set to PK_check_returns_5_c or later, the changes to the
returned check fault information are as follows:

    i)  All enhancements for PK_check_returns_4_c.

   ii)  If face-edge consistency checks identify cases of polylines
        that are reversed with respect to meshes they are supposed to
        be watertight with, 'state' will be PK_EDGE_state_reversed_c.

extra_faults
-------
This can be set to one of:

PK_check_extra_faults_0_c       return version 0 check fault states
PK_check_extra_faults_1_c       return version 1 check fault states
PK_check_extra_faults_latest_c  return the latest check fault states

When this option is set to PK_check_extra_faults_1_c or
PK_check_extra_faults_latest_c the faults which are returned as
PK_BODY_state_corrupt_c under PK_check_extra_faults_0_c are expanded and
returned as

PK_BODY_state_bad_type_c
PK_BODY_state_no_region_c
PK_BODY_state_no_shell_c
PK_BODY_state_no_solid_reg_c
PK_BODY_state_region_1_solid_c
PK_BODY_state_shell_not_first_c
PK_BODY_state_wrong_ext_reg_c
PK_BODY_state_wrong_num_regs_c
PK_EDGE_state_bad_fins_c
PK_EDGE_state_bad_tol_c
PK_EDGE_state_fin_bad_ring_c
PK_EDGE_state_fin_ed_next_pos_c
PK_EDGE_state_fin_ed_not_ed_c
PK_EDGE_state_fin_not_pos_c
PK_EDGE_state_single_vertex_c
PK_EDGE_state_wire_corrupt_c
PK_ENTITY_state_bad_owner_c
PK_ENTITY_state_has_att_group_c
PK_ENTITY_state_shared_c
PK_FACE_state_diff_sh_same_rg_c
PK_FACE_state_edge_moebius_c
PK_FACE_state_wrong_sense_c
PK_FIN_state_bad_c
PK_FIN_state_bad_ed_fins_c
PK_FIN_state_corrupt_c
PK_FIN_state_ed_next_is_fin_c
PK_FIN_state_edge_diff_vertex_c
PK_FIN_state_no_ed_next_in_sh_c
PK_FIN_state_non_zero_ident_c
PK_FIN_state_not_ed_next_prev_c
PK_FIN_state_not_lp_next_prev_c
PK_FIN_state_vx_not_vx_c
PK_FIN_state_wrong_vertex_c
PK_GEOM_state_bad_dep_type_c
PK_GEOM_state_bad_geom_owner_c
PK_GEOM_state_bad_owner_c
PK_GEOM_state_bad_topol_owner_c
PK_GEOM_state_dup_geom_owner_c
PK_GEOM_state_not_owners_dep_c
PK_GEOM_state_not_owning_dep_c
PK_GROUP_state_bad_c
PK_LOOP_state_isolated_has_cu_c
PK_PART_state_bad_attrib_c
PK_PART_state_bad_attrib_list_c
PK_PART_state_bad_state_c
PK_PART_state_corrupt_c
PK_PART_state_has_key_c
PK_PART_state_no_key_c
PK_REGION_state_no_shell_c
PK_REGION_state_wrongly_solid_c
PK_SHELL_state_bad_body_c
PK_SHELL_state_bad_fa_orient_c
PK_SHELL_state_bad_wf_acorn_c
PK_SHELL_state_bad_wf_c
PK_SHELL_state_closed_bad_fa_c
PK_SHELL_state_ed_fa_in_acorn_c
PK_SHELL_state_eds_fragmented_c
PK_SHELL_state_fas_fragmented_c
PK_SHELL_state_no_vx_ed_fa_c
PK_SHELL_state_not_owning_vx_c
PK_SHELL_state_open_bad_fa_c
PK_SHELL_state_reg_meet_at_ed_c
PK_SHELL_state_reg_meet_at_vx_c
PK_SHELL_state_sheet_no_fa_c
PK_SHELL_state_too_many_fas_c
PK_TOPOL_state_bad_box_c
PK_TOPOL_state_bad_geom_share_c
PK_TOPOL_state_bad_owner_type_c
PK_TOPOL_state_share_no_geom_c
PK_VERTEX_state_bad_fin_c
PK_VERTEX_state_bad_isolated_c
PK_VERTEX_state_bad_tol_c
PK_VERTEX_state_fin_chains_c
PK_VERTEX_state_non_manifold_c
PK_VERTEX_state_not_dep_of_sh_c
PK_VERTEX_state_owner_not_sh_c
PK_VERTEX_state_sheet_corrupt_c
PK_VERTEX_state_too_many_eds_c
PK_VERTEX_state_wf_ed_bad_sh_c

or possibly PK_BODY_state_corrupt_c if none of the above applies.

attribs
-------
This can be set to one of:

PK_check_attribs_no_c     Do not perform validity checks on attached system
                          attributes.
PK_check_attribs_yes_c    Perform system attribute validity checks.

The only check fault associated with this check is the following:

'state'                        | 'entity_1'  | 'entity_2'    | 'position'
-------------------------------------------------------------------------------
PK_ATTRIB_state_invalid_att_c  |  attribute  |  attrib owner |   null

If any faults are found with the system attributes present, the user is
encouraged to use PK_ENTITY_check_attribs to discover more information on
the faulty attribute(s).