PK_TOPOL_eval_mass_props_o_t   

struct PK_TOPOL_eval_mass_props_o_s
    {
    int                 o_t_version;    --- version number of option structure
    PK_mass_t           mass;           --- required mass properties
                                        --- (PK_mass_m_of_i_c)
    PK_mass_periphery_t periphery;      --- periphery required
                                        --- (PK_mass_periphery_yes_c)
    PK_mass_bound_t     bound;          --- bounds on results required
                                        --- (PK_mass_bound_no_c)
    PK_LOGICAL_t        single;         --- whether to treat topols as
                                        --- single solid (PK_LOGICAL_false)
    PK_LOGICAL_t        use_facets;     --- whether to use alternative facetted
                                        --- method (PK_LOGICAL_false)
    double              facet_tol;      --- chordal tolerance to use for facets
                                        --- 0.0 requests the internal default
    PK_mass_local_density_t
                        same_dim_density;
                                        --- behaviour when dealing with local
                                        --- density attributes belonging to
                                        --- topologies of same dimension as
                                        --- 'topols'
                                        --- (PK_mass_local_density_unset_c)
    PK_mass_local_density_t
                        lower_dim_density;
                                        --- behaviour when dealing with local
                                        --- density attributes belonging to
                                        --- topologies of lower dimension than
                                        --- 'topols'
                                        --- (PK_mass_local_density_unset_c)
    int                 n_transfs;      --- number of transformations (0)
    const PK_TRANSF_t  *transfs;        --- array of transformations (NULL)
    PK_mass_eq_0_t      mass_eq_0;      --- behaviour when encountering a
                                        --- topology with zero mass
                                        --- (PK_mass_eq_0_fail_c)
    };

typedef struct PK_TOPOL_eval_mass_props_o_s PK_TOPOL_eval_mass_props_o_t;



Holds optional controls for evaluating the mass properties of a given set of
topological entities.


Specific Errors:
    PK_ERROR_bad_option_data (MILD)     The illegal value of
                                        PK_mass_local_density_override_c
                                        for the option 'lower_dim_density',
                                        exactly one set and one unset density
                                        option, a bad combination of density
                                        options with the 'single' option or
                                        invalid value of 'n_transfs' has
                                        been supplied.
     PK_ERROR_wrong_transf   (MILD)     A transformation supplied in the
                                        'transfs' array is not a rigid motion
                                        and not a reflection.

Used in:

PK_TOPOL_eval_mass_props


The option structure defines options applicable to evaluating the mass
properties of a given set of topological entities.

Description of fields:


'mass'                  The main mass properties form a hierarchy in that the
                        mass is needed to find the centre of gravity, and the
                        centre of gravity is needed to find the inertia.  One
                        token of type PK_mass_t controls the level to which
                        calculations are done.

                        Possible values are:
                          PK_mass_no_c:
                            No data in this hierarchy is to be found.
                          PK_mass_mass_c:
                            Finds the amount and mass of the entities only.
                          PK_mass_c_of_g_c:
                            Finds the centre of gravity as well.
                          PK_mass_m_of_i_c:
                            Finds the moment of inertia as well.

                        The default value is PK_mass_m_of_i_c.


'periphery'             Sets the level of periphery required.

                        Possible values are:
                          PK_mass_periphery_no_c:
                            No periphery data calculated.
                          PK_mass_periphery_yes_c:
                            Calculates the periphery of the entities.

                        The default value is PK_mass_periphery_yes_c.


'bound'                 For each returned array, the initial entries give the
                        calculated value, and subsequent entries give the
                        associated bounds. This option controls the type of
                        bounds output.

                        Possible values are:
                          PK_mass_bound_no_c:
                            No errors are given.
                          PK_mass_bound_modulus_c:
                            Range is given by value +/- a single modulus.
                          PK_mass_bound_interval_c:
                            Range is given as the value and an interval
                            bracketing the value.

                        In the latter two cases, the centre of gravity would
                        correspond to a sphere centred on the answer vector and
                        a box containing it respectively.

                        No error bounds are currently supported for the
                        facetted method.

                        The default value is PK_mass_bound_no_c.


'single'                If this flag is set to PK_LOGICAL_true, and the
                        supplied topologies are an array of faces or an array
                        of sheet bodies, they will be considered as forming
                        the boundary of a single solid.

                        Under this option the mass will not be returned, as
                        there is currently no way of unambiguously specifiying
                        a density for the calculation. The Moment of Inertia
                        will be returned, but will be calculated without
                        reference to any density attributes attached to the
                        supplied entities, effectively assuming a density of
                        one for the solid of which they form the boundary.

                        No checking is done that the faces or sheets provided
                        do form a valid solid boundary. If they do not, the
                        returned results are likely to be meaningless.

                        If this option is set, the options 'same_dim_density'
                        and 'lower_dim_density' must both be unset, or both
                        set to PK_mass_local_density_ignore_c.  Failure to
                        provide them as such will result in a
                        PK_ERROR_bad_option_data error being returned.

                        The default value is PK_LOGICAL_false.


'use_facets'            If this flag is set to PK_LOGICAL_true, then mass
                        properties of dimension 2 and 3 will be calculated by
                        generating a facet mesh for each face referenced and
                        then combining the contributions for each facet.  This
                        is intended to provide verification of the main
                        parameter space based method.

                        The user has the option of supplying a chordal
                        tolerance to use for the facetting; this is equivalent
                        to the 'curve_chord_tol' and 'surface_plane_tol' passed
                        to PK_TOPOL_facet.  If 0.0 is supplied, an internal
                        default will be used, taking into account the
                        'accuracy' parameter supplied to
                        PK_TOPOL_eval_mass_props.

                        Note that this is a backup method and will be slow and
                        memory hungry if large numbers of facets are generated;
                        a careful choice of facet tolerance is recommended.

                        The default value is PK_LOGICAL_false.


'facet_tol'             The chordal tolerance to use for facets, in conjunction
                        with the 'use_facets' option.

                        A value of 0.0 requests the internal default.


'same_dim_density'      Specifies the behaviour to be used when encountering
                        'local densities' (region, face, edge and vertex
                        specific densities) attached to topologies with the
                        same topological dimension as the maximum of the
                        topologies passed in as 'topols'.

                        Possible values are:
                          PK_mass_local_density_override_c:
                            When present, local densities are used
                            exclusively in mass property calculations. If
                            local density is absent, body density is used (or
                            1.0 if body density is also absent).
                          PK_mass_local_density_additive_c:
                            Topologies with local density attached have an
                            equivalent density of the sum of their local
                            density and the body density (or 1.0 if body
                            density is absent).
                          PK_mass_local_density_ignore_c:
                            Even if topology has a local density attached,
                            body density is used exclusively (or 1.0 if body
                            density is absent).
                          PK_mass_local_density_unset_c:
                            Same-dimensional local density behaviour is not
                            specified, and will be as legacy behaviour.

                        The default value is PK_mass_local_density_unset_c.


'lower_dim_density'     Specifies the behaviour to be used when encountering
                        'local densities' (region, face, edge and vertex
                        specific densities) attached to topologies with lower
                        topological dimension than the maximum of the
                        topologies passed in as 'topols'.

                        Possible values are:
                          PK_mass_local_density_additive_c:
                            Topologies with local density attached make an
                            additive contribution to the overall mass
                            property calculation, using that local density
                            value.  If no local density is present, the
                            topology makes no contribution to mass properties.
                          PK_mass_local_density_ignore_c:
                            Lower-dimensional topologies will make no
                            contribution to mass property calculations, even if
                            they have attached local density attributes.
                          PK_mass_local_density_unset_c:
                            Lower-dimensional local density behaviour is not
                            specified, and will be as legacy behaviour.

                        A value of PK_mass_local_density_override_c is not
                        permitted for this option, and will cause an error
                        PK_ERROR_bad_option_data if received.

                        The default value is PK_mass_local_density_unset_c.


The following table gives the values of the 'same_dim_density' and
'lower_dim_density' options which give the same mass property behaviour as
the default, unset values;

         'topols'        | 'same_dim_density' | 'lower_dim_density'
        -----------------|--------------------|---------------------
         Solid Bodies    | override_c         | additive_c
         Sheet Bodies    | override_c         | additive_c
         Wire Bodies     | override_c         | additive_c
         Assemblies      | override_c         | additive_c
         Regions         | ignore_c           | ignore_c
         Faces (*)       | ignore_c           | ignore_c
         Edges (*)       | ignore_c           | ignore_c

(*) It should be noted that in the case of faces and edges, any existing
body density attributes attached to the owning body will also need to be
removed or set equal to 1.0 for the duration of the calculation if identical
behaviour to unset options is desired.


'n_transfs'             Specifies the number of transformations supplied to be
                        used to transform input topologies passed in as
                        'topols'. 'n_transfs' must either be equal to
                        'n_topols' or 1, or if 'transfs' is NULL it must be 0.

                        The default value is 0.


'transfs'               An array of length equal to 'n_transfs' specifying
                        transformations to be used to transform input
                        topologies passed in as 'topols' for the purposes of
                        the mass properties calculation.

                        Each transformation must be a rigid motion, a
                        reflection, or PK_ENTITY_null (in which case it is
                        treated as the identity transformation).

                        If 'n_transfs' is equal to 'n_topols' then each
                        topology will be transformed by the corresponding
                        transformation. If 'n_transfs' is equal to 1 then each
                        topology will be transformed by the single input
                        transformation. If 'n_transfs' is equal to zero then no
                        topologies will be transformed.

                        The default value is NULL.


'mass_eq_0'             Specifies the behaviour to be used when at least one of
                        the supplied topologies is found to have zero mass.

                        Possible values are:
                          PK_mass_eq_0_fail_c:
                            The function will stop at the first topology for
                            which mass is found to be zero and will return an
                            error PK_ERROR_mass_eq_0.
                          PK_mass_eq_0_report_c:
                            The function will finish calculations for all
                            'topols' and will return the total mass of all
                            topologies whose mass is greater than zero. A
                            report will be produced in the Parasolid report
                            stream containing a record of type
                            PK_REPORT_record_type_3_c. This record will have a
                            status of PK_REPORT_3_mass_eq_0_c and will list all
                            topologies which were found to have zero mass. If
                            all topologies in 'topols' are found to have zero
                            mass, the function will return an error
                            PK_ERROR_mass_eq_0.

                        The default value is PK_mass_eq_0_fail_c.