 |
PK_TOPOL_facet_choice_2_o_t |
|
struct PK_TOPOL_facet_choice_2_o_s
{
int o_t_version; --- version of this PK option struct
int max_facets_per_strip; --- (10000)
PK_facet_split_strip_t --- whether to split strips so that
split_strips; --- no strip spans more than a
--- single period
--- (PK_facet_split_strip_no_c)
PK_facet_consistent_parms_t --- whether to force surface
consistent_parms; --- parameters for facet vertices
--- within a given facet on a
--- periodic surface to lie within
--- half a period of each other
--- (PK_facet_consistent_parms_no_c)
PK_facet_smp_t smp; --- whether to multi-thread
--- facetting(PK_facet_smp_no_c)
PK_TOPOL_facet_tables_cb_f_t --- callback function for returning
facet_tables_cb; --- facet tables (NULL)
PK_POINTER_t facet_tables_context; --- context for callback (NULL)
PK_LOGICAL_t thread_safe; --- whether the callback function is
--- thread safe(PK_LOGICAL_false)
PK_facet_pt_report_t
report_pts_off_topol; --- whether to report facet points
--- that lie off the model topology
--- (PK_facet_pt_report_no_c)
PK_LOGICAL_t facet_fin; --- (PK_LOGICAL_false)
PK_LOGICAL_t strip_boundary; --- (PK_LOGICAL_false)
PK_LOGICAL_t strip_zigzag; --- (PK_LOGICAL_false)
PK_LOGICAL_t fin_fin; --- (PK_LOGICAL_false)
PK_LOGICAL_t fin_data; --- (PK_LOGICAL_false)
PK_LOGICAL_t data_point_idx; --- (PK_LOGICAL_false)
PK_LOGICAL_t data_normal_idx; --- (PK_LOGICAL_false)
PK_LOGICAL_t data_param_idx; --- (PK_LOGICAL_false)
PK_LOGICAL_t data_deriv_idx; --- (PK_LOGICAL_false) [PF]
PK_LOGICAL_t data_curv_idx; --- (PK_LOGICAL_false)
PK_LOGICAL_t point_vec; --- (PK_LOGICAL_false)
PK_LOGICAL_t normal_vec; --- (PK_LOGICAL_false)
PK_LOGICAL_t param_uv; --- (PK_LOGICAL_false)
PK_LOGICAL_t deriv_dp; --- (PK_LOGICAL_false) [PF]
PK_LOGICAL_t deriv_d2p; --- (PK_LOGICAL_false) [PF]
PK_LOGICAL_t curv_dirs; --- (PK_LOGICAL_false)
PK_LOGICAL_t facet_face; --- (PK_LOGICAL_false)
PK_LOGICAL_t strip_face; --- (PK_LOGICAL_false)
PK_LOGICAL_t fin_edge; --- (PK_LOGICAL_false)
PK_LOGICAL_t point_topol; --- (PK_LOGICAL_false)
PK_LOGICAL_t fin_topol; --- (PK_LOGICAL_false)
PK_LOGICAL_t error_object; --- (PK_LOGICAL_false)
PK_LOGICAL_t incr_faces; --- For future use
--- (PK_LOGICAL_false)
};
typedef struct PK_TOPOL_facet_choice_2_o_s PK_TOPOL_facet_choice_2_o_t;
This structure selects how the facets are to be output and which tables are to
be returned. See here for more information.
Specific Errors:
PK_ERROR_o_t_version_incorrect (MILD) option structure not initialised
correctly
PK_ERROR_bad_combination (MILD) A bad combination of tables has been
requested, or an inappropriate
combination of options have been set
with 'report_pts_off_topol'.
See below for details.
PK_ERROR_callback_failed (MILD/SEVERE) Application callback function did
not return PK_ERROR_no_errors.
Severe error only returned if
'incremental_facetting' not set to
PK_facet_incr_no_c.
Used in:
PK_TOPOL_facet_2_o_t
The PK_TOPOL_facet_choice_2_o_t structure specifies how the application wishes
PK_TOPOL_facet_2 to return the facets generated and which tables should be
returned.
Facets may be output individually or as strips. A strip is a sequence of
connected triangular facets such that each facet has two immediately adjacent
facets except for the end facets, which have only one. The value of
'max_facet_sides' in PK_TOPOL_facet_mesh_o_t is ignored when facet strips are
output: the facets are always triangular.
Each of the PK_LOGICAL_t fields may be set by the application to the value
PK_LOGICAL_true or PK_LOGICAL_false indicating whether or not the application
wishes PK_TOPOL_facet_2 to return this particular table (via the returned
PK_TOPOL_facet_2_r_t structure).
A facet mesh is defined by tables of facet topology, geometry and tracking
data. Facet topology is described in terms of facet, strip, fin and vertex
indices.
The 'facet_fin', 'strip_boundary' and 'strip_zigzag' tables give indices into
the 'fin_data' table. The 'fin_data' table then gives indices into the
'data_point_idx', 'data_normal_idx', 'data_param_idx', 'data_deriv_idx' and
'data_curv_idx' tables. These tables in turn give indices into the geometry
tables: 'point_vec', 'normal_vec', 'param_uv', 'deriv_dp', 'deriv_d2p' and
'curv_dirs'. The tracking tables can be used to match facets, strips and fins
to faces and edges in the original part.
Note: for topology with facet geometry, derivatives are not meaningful. If
derivatives are requested for an entity with facet geometry an entry of
PK_facet_fault_topol_deriv_c will be returned in the 'error_object' table
(if requested) for this entity indicating that the dp and/or d2p values
referenced by this entity should not be used.
DERIVATIVES AND SURFACE NORMALS
If derivatives are requested, the cross product dPdu X dPdv points in the
same direction as the surface normal. This is true except in the case where
a transform is supplied for which calling PK_TRANSF_classify on the transform
returns a matrix_type of PK_matrix_type_reflection_c. In this case, each
dPdu X dPdv points in the opposite direction to the corresponding surface
normal.
MESH TOPOLOGY
Each topology entity (facet, strip, fin or vertex) in the facet mesh is
connected to other entities in the mesh. The complete connectivity data are
described as the facet mesh topology.
FACET STRIPS:
Requesting the 'strip_boundary' and/or the 'strip_zigzag' table will result in
facet strips being output via the tables. The 'max_facets_per_strip' option
can be used to limit the number of facets per strip.
The 'split_strips' option allows facet strips on periodic surfaces to be split
so that the strips do not span more than a single period on the surface. The
permitted values for the 'split_strips' option are:
PK_facet_split_strips_no_c (default)
PK_facet_split_strips_yes_c
The control of the parameterisation of the strip can be obtained via the
'consistent_parms' option described below.
The 'strip_face' table can only be requested if the 'strip_boundary' and/or
the 'strip_zigzag' tables have been requested. Otherwise the error
PK_ERROR_bad_combination is returned.
MULTI-THREADING:
The 'smp' option allows facetting to be multi-threaded. The permitted values
for the 'smp' option are:
PK_facet_smp_no_c (default)
PK_facet_smp_body_c
If set to PK_facet_smp_body_c then different bodies (or faces from different
bodies) may be facetted concurrently provided that multi-threading has been
enabled by a call to PK_SESSION_set_smp. Instances of a particular body (or
faces of a body) will appear consecutively in the tables but the order of the
bodies themselves may vary between calls to PK_TOPOL_facet_2.
FACET TABLE CALLBACK:
The option 'facet_tables_cb' enables the facet data to be returned via a
callback function on a body-by-body basis instead of through the usual faceting
tables.
If faceting an array of faces or a mixture of bodies and faces, faces from the
same body (with the same transform) will be output in the same callback. As
well as providing the facet data for a given body, the associated transform
will also be returned via the callback; this means that facets for different
instances of the same body will be output in different callbacks.
If no callback function is supplied, faceting data for all bodies/faces being
faceted will output through a single PK_TOPOL_facet_2_r_t which can only be
returned once all bodies/faces have been faceted.
The callback function returns a PK_ERROR_code_t to Parasolid to indicate
whether it wishes to continue or abort. If PK_ERROR_no_errors is returned,
Parasolid will continue the operation as usual. If any other error code is
returned, Parasolid will abort facetting and return PK_ERROR_callback_failed
from PK_TOPOL_facet_2. If incremental facetting is enabled, this error code
will be designated as a severe error, otherwise it will be designated as a mild
error.
The PK_LOGICAL_t 'thread_safe' specifies whether the callback function may be
called from more than one thread simultaneously. If set to PK_LOGICAL_true,
and SMP is enabled within Parasolid and the 'smp' option is set to
PK_facet_smp_body_c, then the callback may be called from multiple threads. In
this case, the application should ensure that both the callback function and
the PK_MEMORY_frustrum_t functionality are thread-safe. If set to
PK_LOGICAL_false, then Parasolid will ensure that the callback function is not
called simultaneously from multiple threads, even when SMP is switched on in
Parasolid.
The tables supplied to the callback will not be freed by Parasolid and must
instead be freed by the application. To do so, it must first call
PK_TOPOL_facet_2_r_f using the pointer provided, and then call PK_MEMORY_free
to free the PK_TOPOL_facet_2_r_t structure itself.
REPORT POINTS OFF TOPOL:
The 'report_pts_off_topol' option controls whether facet points that lie off
the model topology are reported in the 'error_object' table. The options are:
PK_facet_pt_report_no_c (default)
PK_facet_pt_report_off_eds_c
PK_facet_pt_report_off_tpl_c
If set to PK_facet_pt_report_off_eds_c, any facet points that lie off the model
edges are reported in the 'error_object' table.
If set to PK_facet_pt_report_off_tpl_c, any facet points that lie off the model
edges and any internal facet points (i.e. facet points that do not lie on a
face boundary) that lie off the model faces are reported in the 'error_object'
table.
NOTE: If 'report_points_off_topol' is set to PK_facet_pt_report_off_eds_c or
PK_facet_pt_report_off_tpl_c the 'error_object' table must be requested; the
'match' option in PK_TOPOL_facet_mesh_2_o_t must be set to
PK_facet_match_topol_c; and the 'quality' option in PK_TOPOL_facet_mesh_2_o_t
must be set to PK_facet_quality_improved_c; otherwise the error
PK_ERROR_bad_combination will be returned.
CONSISTENT PARAMETERS:
The 'consistent_parms' option only has an effect on periodic surfaces, setting
this to either PK_facet_consistent_parms_su_c or PK_face_consistent_parms_fa_c
ensures surface parameters for facet vertices within a given facet lie within
half a period of each other.
If facets are being output as strips each strip will be composed of
consistently parameterised triangular facets. All triplets of vertices
within the strip will have surface parameters that lie within half a period of
each other.
If the 'consistent_parms' option is set to PK_facet_consistent_parms_su_c then
one facet vertex within the facet or strip will have parameters in the first
period and all other vertices within the facet or strip will be made
consistent with this.
Setting 'consistent_parms' to PK_facet_consistent_parms_fa_c only produces
different results from PK_facet_consistent_parms_su_c if the facets do not
cover the whole of the period. In this case each facet vertex is given a
unique parameter value. Facet vertices that fall within the face uvbox, as
returned from PK_FACE_find_uvbox, will have parameters lying inside this box.
All other facet vertices will be made consistent with those inside the face's
uvbox. In cases where the facets do not span the whole of the period but the
face uvbox is the whole period, some facet vertices may not lie inside the
face's uvbox.
The permitted values for the 'consistent_parms' option are:
PK_facet_consistent_parms_no_c (default)
PK_facet_consistent_parms_su_c
PK_facet_consistent_parms_fa_c
TABLES:
In the table below if 'field' is set to PK_LOGICAL_true the corresponding
'table' will be returned.
type field table
-------- ------------------- ---------------------------------
topology 'facet_fin' PK_TOPOL_fctab_facet_fin_t
topology 'strip_boundary' PK_TOPOL_fctab_strip_boundary_t
topology 'strip_zigzag' PK_TOPOL_fctab_strip_zigzag_t
topology 'fin_fin' PK_TOPOL_fctab_fin_fin_t
topology 'fin_data' PK_TOPOL_fctab_fin_data_t
topology 'data_point_idx' PK_TOPOL_fctab_data_point_t
topology 'data_normal_idx' PK_TOPOL_fctab_data_normal_t
topology 'data_param_idx' PK_TOPOL_fctab_data_param_t
topology 'data_deriv_idx' PK_TOPOL_fctab_data_deriv_t
topology 'data_curv_idx' PK_TOPOL_fctab_data_curv_t
geometry 'point_vec' PK_TOPOL_fctab_point_vec_t
geometry 'normal_vec' PK_TOPOL_fctab_normal_vec_t
geometry 'param_uv' PK_TOPOL_fctab_param_uv_t
geometry 'deriv_dp' PK_TOPOL_fctab_deriv_dp_t
geometry 'deriv_d2p' PK_TOPOL_fctab_deriv_d2p_t
geometry 'curv_dirs' PK_TOPOL_fctab_curv_dirs_t
tracking 'facet_face' PK_TOPOL_fctab_facet_face_t
tracking 'strip_face' PK_TOPOL_fctab_strip_face_t
tracking 'fin_edge' PK_TOPOL_fctab_fin_edge_t
tracking 'point_topol' PK_TOPOL_fctab_point_topol_t
tracking 'fin_topol' PK_TOPOL_fctab_fin_topol_t
tracking 'error_object' PK_TOPOL_fctab_error_object_t