UF_FACET_parameters_s (view source)
 
Defined in: uf_facet.h
 
Also known as:
 
Overview
From V14.0, the name of this structure was changed from
UF_FACET_faceting_params_s to UF_FACET_parameters_s. Programs written prior
to V14.0 that used this structure must be rewritten.

Please note the following items:

. When a solid body is faceted the faceter is always requested to ensure that
the vertices of facets in adjacent faces match along model edges.

. A macro (UF_FACET_INIT_PARAMETERS) is provided to initialize the structure
to some reasonable value. This macro initializes the version field to the
current version correctly. If this version field is set by the user's
program, the behavior of the program becomes unpredictable.

. The CAM users should ensure that the following guidelines are followed when
faceting to ensure that the model that is generated is marked for use by
CAM processors. If the model does not meet the minimum faceting parametric
requirements, the model is not useable for the CAM processors and the
processors might regenerate the model.

1. Set the variables in the UF_FACET_parameters_t structure as follows:
- max_facet_edges = 3
- number_storage_type = FACET_TYPE_DOUBLE
- specify_surface_tolerance = true
- surface_dist_tolerance <= 0.0381 (mm)
- curve_dist_tolerance <= 0.0381 (mm)
- surface_angular_tolerance <= 0.4
- specify_curve_tolerance = true
- curve_angular_tolerance <= 0.4
- specify_parameters = true
- specify_view_direction = true
- silh_view_direction[0] = tool_axis i component
- silh_view_direction[1] = tool_axis j component
- silh_view_direction[2] = tool_axis k component
- silh_chord_tolerance <= surface_dist_tolerance/2.0

2. Create the facet model on the geometry by using this module.

3. Use the function UF_CAM_PREPRO_mark_model_as_cam to mark the facet
model for recognition by CAM processors.

UF_FACET_faceting_params_s is used both for representing the default faceting
parameters, and for the faceting parameters used to facet a particular solid.
The default faceting parameters are inquired using
UF_FACET_ask_default_parameters and set with UF_FACET_set_default_parameters.

At the start of an Open API program the default faceting parameters are:

max_facet_edges = 3

specify_surface_tolerance = false

specify_curve_tolerance = false

specify_convex_facets = true

specify_max_facet_size = false

number_storage_type = UF_FACET_TYPE_FLOAT

specify_view_direction = false

specify_parameters = false

store_face_tags = false

The following string defined constants specify NULL values for all facet_ids,
vertex_ids, and edge_ids.

UF_FACET_NULL_FACET_ID

UF_FACET_NULL_VERTEX_ID

UF_FACET_NULL_EDGE_ID


Data Members

version
int
The version of this structure.
If UF_FACET_INIT_PARAMETERS macro
is used this field will be initialized
with the proper value. All calls to
the functions
UF_FACET_ask_default_parameters and
UF_FACET_ask_model_parameters
should be preceeded by the use of the
macro to ensure proper initialization of
this member.

max_facet_edges
int
The maximum number of edges allowed
in the facets that are to be generated.

specify_surface_tolerance
logical
If this value is true, then
values must be specified for
surface_dist_tolerance
and surface_angular_tolerance. If
this value is false then values for
surface_dist_tolerance and
surface_angular_tolerance will be
determined by the system based on the
body box or face box of the solid entity
being faceted.

surface_dist_tolerance
double
This is the maximum distance from
the surface to the facet.

surface_angular_tolerance
double
This is the maximum angular variation
in radians of the surface normal
over the facet. A value of zero
indicates no constraint.

specify_curve_tolerance
logical
This indicates that values are to be
specified for curve_dist_tolerance
and curve_angular_tolerance and
curve_max_length. If this value is false
then values for curve_dist_tolerance
and curve_angular_tolerance will be
determined by the system based on the
body box or face box of the solid
entity being faceted, and no restriction
will be placed on the maximum length
of curve that can be represented
by a single facet edge.

curve_dist_tolerance
double
This is the maximum distance between
the facet edge and the curve segment
represented by the facet edge. This
applies only to those facet edges lying
along solid edges.

curve_angular_tolerance
double
This is the maximum angular variation
in radians of the curve tangent along
the curve segment represented by the
facet edge. This applies only to those
facet edges lying along solid edges.
A value of zero indicates no constraint.

curve_max_length
double


specify_convex_facets
logical
This indicates that the facets
generated by the faceter should all be
convex

specify_max_facet_size
logical
This indicates that a maximum width of
facet is to be specified using
max_facet_size. If this field is false
then no maximum facet size is imposed.

max_facet_size
double
This is the maximum width of a facet.
This is only used if
specify_max_facet_size is TRUE.

number_storage_type
int
This indicates whether the real
numbers for facet vertices and facet
normals should be stored as floats
(UF_FACET_TYPE_FLOAT) or as doubles
(UF_FACET_TYPE_DOUBLE). Note that this
option applies only when a faceted model
is being created, and is ignored when the
model is updated.

specify_parameters
logical
This indicates that the model will be
created with the parametric information
for each vertex. Should parameters at
the vertices be obtained for the facets
of the model.

specify_view_direction
logical
Should we use a viewing direction
for denser faceting around
silhouettes. The denser faceting will
honor the tolerance specified by
silh_chord_tolerance in the silhouette
with respect to the view direction
specified by silh_view_direction vector.
If this is false, there is no special
consideration for any silhouette area.

silh_view_direction [ 3 ]
double
If use_view_direction is specified,
then this is the view direction to use.

silh_chord_tolerance
double
If use_view_direction is specified
then this is the tolerance which will be
used as a tighter surface tolerance
in the silhouette area specified
by the view direction.

store_face_tags
logical
Should this FACET body record face
tags or not. Note that this must be set
to "true" for the functions
UF_FACET_ask_solid_face_of_face_id,
UF_FACET_ask_solid_face_of_facet, and
UF_FACET_ask_face_id_of_solid_face to
return meaningful results.