 |
PK_BODY_make_swept_body_2_o_t |
|
struct PK_BODY_make_swept_body_2_o_s
{
int o_t_version;
PK_BODY_sweep_alignment_t alignment; --- alignment of profile
--- (PK_BODY_sweep_align_normal_c)
PK_BODY_simplify_t simplify; --- simplify swept surfaces
--- (PK_BODY_simplify_analytic_c)
PK_BODY_topology_t topology_form;
--- topology of resultant body
--- (PK_BODY_topology_minimal_c)
int n_ignorable_vertices;
--- number of path vertices that may
--- be ignored (0)
const PK_VERTEX_t *ignorable_vertices;
--- array of path vertices to ignore
--- (NULL)
PK_BODY_vertex_matches_t matches; --- how to match vertices on
--- different profiles
PK_BODY_sweep_law_t twist; --- twist of sweep path
PK_LOGICAL_t have_twist_direction;
--- whether a direction is supplied
--- for twist in parallel sweeping
--- (PK_LOGICAL_false)
PK_VECTOR1_t twist_direction;
--- direction for twist in parallel
--- sweeping
PK_BODY_sweep_law_t scale; --- scale of sweep path
PK_BODY_sweep_scale_type_t scale_type; --- how any scaling should be
--- applied
--- (PK_BODY_sweep_scale_both_c)
PK_VECTOR_t scale_point;--- defining point for scale laws of
--- types PK_BODY_sweep_scale_posn_c
--- or PK_BODY_sweep_scale_size_c
--- (0,0,0)
PK_sweep_profile_law_t profile_law;--- whether profiles should be
--- assumed to have twist and scale
--- laws already supplied
--- (PK_sweep_profile_law_no_c)
double tolerance; --- tolerance (1.0e-5)
PK_LOGICAL_t minimise_tolerance;
--- minimise tolerances where
--- possible (PK_LOGICAL_true)
PK_LOGICAL_t allow_rationals;
--- allow bodies with rational
--- surfaces (PK_LOGICAL_true)
PK_LOGICAL_t want_edge_tracking;
--- whether to return tracking
--- information for edges
--- (PK_LOGICAL_false)
PK_LOGICAL_t have_lock_direction;
--- whether to lock the direction
--- (PK_LOGICAL_false)
PK_VECTOR1_t lock_direction;
--- lock direction
PK_sweep_lock_t lock_type; --- behaviour of the
--- 'lock_direction', if
--- 'have_lock_direction' is
--- PK_LOGICAL_true
--- (PK_sweep_lock_path_and_dir_c)
int n_lock_faces;
--- the number of lock faces (0)
const PK_FACE_t *lock_faces; --- the lock faces (NULL)
PK_continuity_t preferred_continuity;
--- the level of continuity along
--- the path direction to aim for
--- when generating the sweep
--- (PK_continuity_c1_c)
int n_guides; --- the number of guides (0)
const PK_BODY_t *guides; --- the guides (NULL)
const PK_sweep_guide_control_t
*guide_controls;
--- guide controls (NULL)
PK_sweep_guide_method_t guide_method;
--- method for sweeping with guides
--- (PK_sweep_guide_point_c)
PK_sweep_guide_scale_t guide_scale;--- scaling for sweep with guides
--- (PK_sweep_guide_uniform_c)
PK_sweep_guide_scope_t guide_scope;--- the amount of the sweep affected
--- by each guide
--- (PK_sweep_guide_scope_global_c)
PK_continuity_t profile_continuity;
--- the level of continuity to be
--- preserved across the sweep
--- (PK_continuity_g1_c)
int fixed_guide_index;
--- which guide is to be fixed, if
--- relevant (0)
PK_LOGICAL_t trim_to_guides;
--- whether to trim the resultant
--- body to the guide wires
--- (PK_LOGICAL_false)
PK_LOGICAL_t have_trim_point;
--- whether a trim point has been
--- specified (PK_LOGICAL_false)
PK_VECTOR_t trim_point; --- a point used to control how
--- the resultant body should be
--- trimmed (0,0,0)
int n_profile_derivs;
--- the number of profiles that have
--- derivative conditions
--- specified (0)
const PK_sweep_deriv_conds_t
*profile_derivs;
--- array of derivative conditions
--- (NULL)
const int *profile_indices;
--- array of profile indices
--- (NULL)
PK_sweep_output_xsect_t output_xsect;
--- whether to output cross-sections
--- (PK_sweep_output_xsect_no_c)
PK_sweep_group_xsect_t group_xsect;--- how to group cross-sections
--- (PK_sweep_group_xsect_per_vx_c)
int n_xsects; --- the number of cross-sections per
--- group (0)
PK_sweep_repair_t repair; --- whether to attempt self-
--- intersection repair
--- (PK_sweep_repair_no_c)
PK_sweep_corner_type_t corner_type;--- whether to produce mitred or
--- spun corners at non-G1 path
--- discontinuities
--- (PK_sweep_corner_type_mitre_c)
PK_sweep_deriv_mag_t deriv_mag; --- method used for calculating
--- derivative magnitudes
--- (PK_sweep_deriv_mag_smooth_c)
PK_BODY_sweep_update_t update; --- update flag
--- (PK_BODY_sweep_update_default_c)
};
typedef struct PK_BODY_make_swept_body_2_o_s PK_BODY_make_swept_body_2_o_t;
This structure holds optional controls on the construction of a swept body.
Specific Errors:
PK_ERROR_bad_combination The 'guide_scope' is
PK_sweep_guide_scope_local_c and either
fewer than three guides are being used,
one or more 'clamp_type' values have been
supplied in the 'guide_controls',
'guide_method' is not set to
PK_guide_point_c, or 'n_profile_derivs' is
not set to zero. If 'guide_scope' is
PK_sweep_guide_scope_global_c and three
guide wires are being used, either
'guide_method', 'guide_scale', a
'lock_direction', or guide clamps have been
supplied. (MILD)
PK_ERROR_bad_twist_law The data handed in for the twist law
could not be made to represent a valid
twist law. (MILD/SERIOUS)
PK_ERROR_bad_scale_law The data handed in for the scale law
could not be made to represent a valid
scale law. (MILD/SERIOUS)
PK_ERROR_bad_tolerance The value of tolerance is invalid. (MILD)
PK_ERROR_bad_value An unrecognised token was passed to request
the level of attempted simplification, the
value passed to specify the level of
'alignment' of the profile with respect to
the path was not recognised or was
incompatible with the number of guides,
'n_guides' was set to a non-zero value
without passing the corresponding
'guide_controls', or an unsupported level
of continuity was requested. (MILD)
PK_ERROR_bad_index The 'fixed_guide_index' or a member of
'profile_indices' was not a valid index of
its corresponding array. (MILD)
Used in:
PK_BODY_make_swept_body_2
The option structure for making a swept body has the following fields :
'alignment' If set to PK_BODY_sweep_align_parallel_c, the sweep
direction is a fixed vector.
If set to PK_BODY_sweep_align_normal_c, the sweep
direction will equal the path tangent (projected into
the plane perpendicular to the 'lock_direction', if one
is supplied and 'lock_type' equals
PK_sweep_lock_path_and_dir_c or PK_sweep_lock_path_c).
Otherwise, the sweep direction will be perpendicular to
a plane containing the corresponding path and guide
points (if two guides are supplied), or a plane
containing the corresponding guide points (if three
guides are supplied and 'guide_scope' is
PK_sweep_guide_scope_global_c). If 'guide_scope' is
PK_sweep_guide_scope_local_c, this must be either
PK_sweep_align_normal_c or PK_sweep_align_parallel_c.
The profiles will maintain a constant angle to the sweep
direction. This option also controls how points on the
path are matched to corresponding points on any guides
that are supplied.
See Controlling the profile alignment for more
information.
'simplify' A token used to indicate the level of simplification
to be attempted on the swept surfaces generated to
form the faces of the swept body. For a sweep of
multiple profiles this option must be set to
PK_BODY_simplify_no_c.
If set to PK_BODY_simplify_no_c, no simplification will
be attempted.
If set to PK_BODY_simplify_analytic_c, the function will
attempt to generate analytic surfaces that are within
session precision of the surface defined by the sweep.
If set to PK_BODY_simplify_swept_spun_c, the function
will attempt to generate analytic surfaces that are
within session precision of the surface defined by the
sweep. If no such analytic surface can be found, the
function will attempt to generate a swept or spun
surface that is within session precision of the surface
defined by the sweep.
(PK_BODY_simplify_analytic_c)
See Simplifying the final body for more
information.
'topology_form' A token used to indicate how the resultant body should
be divided into faces.
(PK_BODY_topology_minimal_c)
See Specifying final topology for more
information.
'n_ignorable_vertices' The number of vertices that may be ignored, for the
purposes of building topology.
(0)
'ignorable_vertices' An array of path and guide vertices that may be
ignored, for the purposes of building topology.
(NULL)
Edges in the profile direction corresponding to path
or guide vertices in this array will not be created,
where possible. It is an error to supply a vertex at the
start or end of an open path or guide, or where two
edges do not meet with G1-continuity.
'matches' A structure containing the profile vertex matching
information. The structure provides a map between the
vertices on one profile with those on the next.
See Matching.
'twist' A 1-dimensional LAW standard form or a discrete set
of values to be interpolated at vertices along the path.
For a sweep of a single profile, the values specify the
amount of rotation undergone by the profile as it moves
along the sweep path.
See Specifying twist for more information.
'have_twist_direction' This option may only be set to PK_LOGICAL_true if a
twist is specified, and 'alignment' is set to
PK_BODY_sweep_align_parallel_c.
In such cases, if set to PK_LOGICAL_true then the twist
rotation is about the fixed direction 'twist_direction'.
If set to PK_LOGICAL_false, then the twist rotation is
about the fixed direction that is the path tangent at
the first path vertex in 'path_vertices'.
(PK_LOGICAL_false)
'twist_direction' The direction to rotate the profile about, if
'have_twist_direction' is set to PK_LOGICAL_true.
'scale' A 1-dimensional LAW standard form or a discrete set
of values to be interpolated at vertices along the path.
For a sweep of a single profile, the values specify the
amount of magnification of the profile as it moves along
the sweep path. It is an error to specify a scale for a
sweep of multiple profiles.
See Specifying scale for more information.
'scale_type' Specifies how any scale law supplied in the 'scale'
option should be applied.
(PK_BODY_sweep_scale_both_c)
If 'scale_type' is 'PK_BODY_sweep_scale_posn_c', the
distance between the supplied 'scale_point' and the path
is modified according to the 'scale'. The profile is
translated to maintain a constant relationship with the
scaled image of the 'scale_point', but is not itself
scaled.
If 'scale_type' is 'PK_BODY_sweep_scale_size_c', the
size of the profile is modified according to the
'scale' about the 'scale_point'. The distance between
the 'scale_point' and the path remains constant.
If 'scale_type' is 'PK_BODY_sweep_scale_both_c', both
the size of the profile and its distance from the path
is modified according to the 'scale'. No 'scale_point'
should be provided. This is the default.
'scale_point' A position vector indicating the defining point for a
scale law. Its purpose depends on the specified
'scale_type': see 'scale_type' for details.
If no scale law is provided or the 'scale_type' is
'PK_BODY_sweep_scale_both_c' this option will be
ignored.
'profile_law' Whether or not profiles should be assumed to have twist
and scale laws already supplied. If set to
PK_sweep_profile_law_no_c, then each profile will be
transformed according to the corresponding twist and
scale values at that profile, and the resultant sweep
will pass through the transformed profile. If set to
PK_sweep_profile_law_yes_c, then the profiles are
assumed to be supplied with the corresponding twist and
scale already applied, and the resultant sweep will pass
through the supplied profiles.
(PK_sweep_profile_law_no_c)
'tolerance' The tolerance to which the sweeping operation may
approximate entities or assume that entities are
coincident.
(1.0e-5)
'minimise_tolerance' If set to PK_LOGICAL_true, topology will be created
with smaller tolerances than 'tolerance' if possible.
(PK_LOGICAL_true)
See Minimising sweep tolerances for more
information.
'allow_rationals' If set to PK_LOGICAL_false, rational B-surfaces will
never be used in the resultant body.
(PK_LOGICAL_true)
'want_edge_tracking' If set to PK_LOGICAL_true, then the returned
'tracking_info' will contain information about the
edges in the resultant body, as well as the faces. If
set to PK_LOGICAL_false, then only information about
the faces will be returned.
(PK_LOGICAL_false)
'have_lock_direction' If set to PK_LOGICAL_true, then the sweep direction will
be projected into the plane perpendicular to the
'lock_direction'. Further behaviour is controlled by the
option 'lock_type'. This option may not be set to
PK_LOGICAL_true when sweeping with three guide wires if
'guide_scope' is PK_sweep_guide_scope_global_c.
(PK_LOGICAL_false)
'lock_direction' The lock direction, used if 'have_lock_direction' is set
to PK_LOGICAL_true. It is an error to supply a direction
that is parallel to the path tangent at any point.
'lock_type' If 'have_lock_direction' is set to PK_LOGICAL_false,
this option has no effect and must be left at the
default.
If 'have_lock_direction' is set to PK_LOGICAL_true, then
this option controls the behaviour of the lock
direction.
PK_sweep_lock_path_and_dir_c and
PK_sweep_lock_rotation_c may not be used if two guides
are supplied and 'guide_method' is set to
PK_sweep_guide_curve_c. PK_sweep_lock_path_c may not be
used if less than two guides are supplied, or
'guide_method' is set to PK_sweep_guide_project_c.
(PK_sweep_lock_path_and_dir_c)
'n_lock_faces' The number of lock faces.
(0)
'lock_faces' Array of lock faces, of length 'n_lock_faces'. If lock
faces are supplied, then at each point along the path,
the swept cross-section will maintain a fixed
relationship to the sweep direction, and the normal of
whichever face that path point is coincident with.
(NULL)
'preferred_continuity' This option specifies the level of continuity along the
path direction to aim for when generating the sweep.
The allowed values are
PK_continuity_c1_c and PK_continuity_c2_c.
Discontinuities may still occur where being continuous
at that point would be inappropriate given the geometry
of the supplied path or profiles. If set to
PK_continuity_c2_c, in cases where there are c2
discontinuities in the result when the path is c2 at the
corresponding point, a status of PK_BODY_sweep_non_c2_c
will be returned. The positions on the path
corresponding to these c2 discontinuities will be
returned in the 'fault_locations' array, and the
corresponding edges or vertices will be returned in the
'fault_entities' array.
Note that if 'repair' is set to
PK_sweep_repair_report_c, c2 discontinuities may be
indicated under a status of PK_BODY_sweep_repaired_c
(see below).
(PK_continuity_c1_c)
'n_guides' The number of guides.
(0)
'guides' Array of guides, of length 'n_guides'. One of the guides
may be set equal to the path, if desired.
(NULL)
'guide_controls' An array of length 'n_guides'. This option provides
control over options specific to each guide.
(NULL)
'guide_method' This option controls the method to use, in the case of
sweeping with two guides. In other cases, this option
should be left at the default.
(PK_sweep_guide_point_c)
'guide_scale' This option controls in which directions the swept
cross-section should be scaled, in the case of sweeping
with two guides. In other cases, this option should be
left at the default.
(PK_sweep_guide_uniform_c)
'guide_scope' How the guides should act upon the sweep. By default,
the guides act in unison and may influence the entire
cross-section. If this option is instead set to
PK_sweep_guide_scope_local_c, each guide acts only on
the portions of the sweep bounded by it and its
neighbours. Each value introduces a set of restrictions
as listed in the documentation of
PK_BODY_make_swept_body_2.
(PK_sweep_guide_scope_global_c)
'profile_continuity' The level of continuity to preserve across the sweep
(i.e., in the profile direction) when using guides with
local 'guide_scope'. In other cases, this option should
be left at the default.
Supported values are PK_continuity_g1_c and
PK_continuity_g0_c.
(PK_continuity_g1_c)
'fixed_guide_index' For two guides, if the 'guide_method' is such that the
swept profile cannot remain in a fixed contact
relationship with both guides, this chooses the guide
that remains fixed.
(0)
'trim_to_guides' This option may only be set to PK_LOGICAL_true if all of
the following are true:
o 'n_guides' is equal to 2 and 'guide_method' is set to
PK_sweep_guide_curve_c,
o the profile is not disjoint,
o and 'output_xsect' is set to
PK_sweep_output_xsect_no_c.
If set to PK_LOGICAL_true, then the resultant body will
be trimmed - only the region between the two guide wires
will be returned. The resultant swept body in such cases
will always be a sheet body. The options
'have_trim_point' and 'trim_point' must be specified in
the ambiguous case where the profile is a closed body,
in order to specify which set of faces to return.
(PK_LOGICAL_false)
'have_trim_point' Indicates that a 'trim_point' has been specified. This
must be set to PK_LOGICAL_true if 'trim_to_guides' is
PK_LOGICAL_true, and the profile is a closed body.
If 'trim_to_guides' is set to PK_LOGICAL_false, then
this option must be left at PK_LOGICAL_false.
(PK_LOGICAL_false)
'trim_point' If 'have_trim_point' is set to PK_LOGICAL_true, then the
resultant trimmed body will contain the face closest to
the 'trim_point'.
'n_profile_derivs' The number of profiles that have derivative conditions
specified.
(0)
'profile_derivs' An array of length equal to 'n_profile_derivs'
specifying derivative conditions for each profile as
given in 'profile_indices'.
(NULL)
'profile_indices' An array of length equal to 'n_profile_derivs' giving
the index of the profile that has the derivative
conditions given by the corresponding entry in
'profile_derivs'.
(NULL)
'output_xsect' Whether to output a swept body, or a body representing
the cross-sections of the sweep.
(PK_sweep_output_xsect_no_c)
'group_xsect' If 'output_xsect' is set to PK_sweep_output_xsect_yes_c
or PK_sweep_output_xsect_on_fail_c, then this option
controls how the cross-sections should be grouped.
If 'output_xsect' is set to PK_sweep_output_xsect_no_c,
then this option must be left at the default.
(PK_sweep_group_xsect_per_vx_c)
'n_xsects' If 'group_xsect' is set to
PK_sweep_group_xsect_per_edge_c or
PK_sweep_group_xsect_no_c, then this value is the number
of cross-sections produced per group, and must be set to
a minimum value of 2.
Otherwise this must be left equal to 0.
(0)
'repair' Whether to attempt repair of self-intersecting swept
bodies. If set to PK_sweep_repair_no_c, the sweep
operation may fail if the path is too tightly curved for
the profiles. If set to PK_sweep_repair_yes_c or
PK_sweep_repair_report_c, the self-intersecting regions
will be replaced by valid surfaces. This option may
result in faces being split in the region of any self-
intersections.
Note that repaired surfaces will not in general be c2
even if 'preferred_continuity' is set to
PK_continuity_c2_c.
If set to PK_sweep_repair_report_c, then if any faces
are repaired, a status of PK_BODY_sweep_repaired_c will
be returned, and the repaired faces will be returned in
the 'fault_entities' array. If 'preferred_continuity' is
set to PK_continuity_c2_c, then any c2-discontinuities
on non-repaired surfaces will also be indicated as
follows: the positions on the path corresponding to
these c2 discontinuities will also be returned in the
'fault_locations' array, and the corresponding edges or
vertices will be returned in the corresponding entries
of the 'fault_entities' array.
(PK_sweep_repair_no_c)
'corner_type' Which type of corner to produce at non-G1
discontinuities in the path. The default value is
PK_sweep_corner_type_mitre_c. If set to
PK_sweep_corner_type_spin_c, the convex side of the
corner is produced by spinning the profile through the
angle between path sections.
(PK_sweep_corner_type_mitre_c)
'deriv_mag' This option specifies the algorithm used to calculate
derivative magnitudes when derivative conditions have
been specified. It is recommended that this is always
set to PK_sweep_deriv_mag_round_c, unless updating old
models. (PK_sweep_deriv_mag_smooth_c)
'update' The default value allows applications to take advantage
of the latest enhancements to the sweeping algorithm. To
maintain consistency when rebuilding models created in a
previous version of Parasolid, a non-default value
should be specified.
(PK_BODY_sweep_update_default_c)