PK_BODY_make_swept_tool_o_t   

struct PK_BODY_make_swept_tool_o_s
    {
    int                    o_t_version;
    double                 tolerance;      --- tolerance (1.0e-5)
    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_swept_tool_update_t update;         --- update flag
                                           --- (PK_swept_tool_update_default_c)
    PK_LOGICAL_t           have_lock_direction;
                                           --- whether to lock the direction
                                           --- (PK_LOGICAL_false)
    PK_VECTOR1_t           lock_direction; --- lock direction
    PK_VERTEX_t            tool_site;      --- vertex on the path corresponding
                                           --- to the tool 'location' at the
                                           --- beginning of the sweep
                                           --- (PK_ENTITY_null)
    int                    n_cap_faces;    --- number of elements in
                                           --- 'cap_faces' (0)
    const PK_FACE_t       *cap_faces;      --- cap faces of the tool for
                                           --- simpler geometry (NULL)
    PK_LOGICAL_t           place_tool_on_path;
                                           --- whether the tool should be
                                           --- placed on the path before
                                           --- sweeping (PK_LOGICAL_true)
    PK_sweep_boolean_t     sweep_boolean;  --- which operation to apply to the
                                           --- swept tool and target
                                           --- (PK_sweep_boolean_none_c)
    PK_BODY_t              target;         --- target body to use when
                                           --- specifying a 'sweep_boolean'
                                           --- operation (PK_ENTITY_null)
    PK_sweep_corner_type_t corner_type;    --- whether to produce mitred or
                                           --- spun corners at non-G1 path
                                           --- discontinuities
                                           --- (PK_sweep_corner_type_spin_c)
    PK_LOGICAL_t           have_turn_axis; --- whether a turn axis is supplied
                                           --- (PK_LOGICAL_false)
    PK_AXIS1_sf_t          turn_axis;      --- the supplied turn axis
    PK_EDGE_array_t        turn_edges;     --- path edges specified for the
                                           --- turn axis
    };

typedef struct PK_BODY_make_swept_tool_o_s PK_BODY_make_swept_tool_o_t;



This structure holds optional controls on the construction of a swept body.

Used in:

PK_BODY_make_swept_tool


The option structure for making a swept body has the following fields :

'tolerance'            The tolerance to which the sweeping operation may
                       approximate entities or assume that entities are
                       coincident. (1.0e-5)

'allow_rationals'      If set to PK_LOGICAL_false, rational bsurfaces 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)

'update'               The default value allows applications to take advantage
                       of the latest enhancements to the swept tool algorithm.
                       To maintain consistency when rebuilding models created
                       in a previous version of Parasolid, a non-default value
                       should be specified.
                       (PK_swept_tool_update_default_c)

'have_lock_direction'  If set to PK_LOGICAL_true, then the sweep direction will
                       be projected into the plane perpendicular to the
                       'lock_direction'. (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 interior
                       point of a path edge, unless the edge is entirely
                       parallel to the direction.

'tool_site'            This is a vertex on the path corresponding to the
                       starting 'location' of the 'tool_axis'. If
                       'place_tool_on_path' is set to PK_LOGICAL_true, the tool
                       will be transformed so that the 'location' is at the
                       'tool_site'. If it is set to PK_LOGICAL_false, the tool
                       is not moved and this defines the equivalent starting
                       position of the sweep. In this case, the 'location' must
                       lie in the plane normal to the path. (PK_ENTITY_null)

'n_cap_faces'          The number of cap faces of the tool. (0)

'cap_faces'            The array of cap faces of the tool. (NULL)

'place_tool_on_path'   If set to PK_LOGICAL_false, the 'tool_axis' is not moved
                       onto the path and the tool is instead swept from its
                       initial position. (PK_LOGICAL_true)

'sweep_boolean'        The Boolean function to employ when specifying a
                       'target'.  Valid values are PK_sweep_boolean_subtract_c,
                       to subtract the swept tool from the 'target',
                       PK_sweep_boolean_intersect_c, to intersect the 'target'
                       with the swept tool, and PK_sweep_boolean_none_c, which
                       performs no Boolean. (PK_sweep_boolean_none_c)

'target'               Target body to which to apply the generated swept tool.
                       (PK_ENTITY_null)

'corner_type'          Which type of corner to produce at non-G1
                       discontinuities in the path. The default value is
                       PK_sweep_corner_type_spin_c. If set to
                       PK_sweep_corner_type_mitre_c, the convex side of the
                       corner is produced by linearly extending each section
                       of the sweep at each non-G1 vertex. For this, the path
                       must be planar and lie in a plane orthogonal to the tool
                       axis and, if a lock_direction is set, it must be
                       parallel to the tool axis.
                       (PK_sweep_corner_type_spin_c)

'have_turn_axis'       If set to PK_LOGICAL_true, then edges of the path when
                       specified in 'turn_edges' will be treated as lying on
                       a body spun around the 'turn_axis'. The motion of the
                       tool when swept along 'turn_edges' will be determined
                       using 'lock_direction' and radial directions from
                       'turn_axis'. A 'lock_direction' must also be supplied
                       and the axis of 'turn_axis' must be equal to the
                       'lock_direction'.

'turn_axis'            The turn axis, used if 'have_turn_axis' is set to
                       PK_LOGICAL_true.

'turn_edges'           Path edges specified for 'turn_axis'. If left empty,
                       then all edges of the path are specified.


Effects of Lock Direction
If 'have_lock_direction' is set to PK_LOGICAL_true, then the sweep direction
and the tool orientation are both controlled by 'lock_direction'.  The sweep
direction is the path tangent projected into the plane perpendicular to
'lock_direction'.  The tool orientation is specified by aligning tool axis
according to 'lock_direction'.
When the 'lock_direction' is not the same as the tool axis direction, then
path is regarded as 3D and a vertex on the path must be supplied through
'tool_site' in order to place the tool on the path for sweeping. In this case,
Parasolid imposes a further requirement on the sweep path - each edge of the
wire body must be defined on a curve of one of the following types: analytic,
Parasolid helix, or C2 non-rational b-curve. Otherwise, a fault status of
PK_sweep_tool_path_bad_geom_c is returned with the tag of an offending edge of
the wire path. The value of 'tool_site' is ignored when it is not required.


Effects of Cap Faces
By default, the geometry generated for the returned 'swept_tool' is an
accurate representation (to 'tolerance') of that produced by sweeping the
spinning 'tool' along the path. However, there may be faces on the 'tool'
that generate faces on the 'swept_tool' that won't themselves remove material
in any downstream boolean. The swept geometry of such faces may also be
self-obscuring or self-intersecting. If you provide these as 'cap_faces',
Parasolid can create simpler geometry for the swept tool faces generated
by them.  This can increase the robustness of the sweep, and any downstream
operations, while maintaining the accuracy of the cut surfaces.

See here for more information.

Result faces produced from 'cap_faces' will be returned in the Parasolid
report stream. Each record will be of type PK_REPORT_record_type_3_c and
will have a status of PK_REPORT_3_sweep_tool_cap_c. It will contain:
  o A status of PK_sweep_tool_cap_t to indicate if the true swept volume
    is enclosed or undercut by simplifying the cap geometry.
  o A set of faces on the tool body specified in the option 'cap_faces'
    for simpler geometry.
  o The corresponding simpler swept faces on the result body.


Effects of Place Tool On Path
The default behaviour is for the tool to be moved onto the path before being
swept. Alternatively, if 'place_tool_on_path' is PK_LOGICAL_false, the tool
will be swept from its initial position. In this case, a start vertex for the
path must be specified using the 'tool_site' option and the 'tool_axis' must
intersect the plane perpendicular to the path at this vertex. If a
'lock_direction' has been specified, this plane is perpendicular to the
effective sweep direction instead. PK_ERROR_bad_value is returned if this
condition is not satisfied.


Effects of Sweep Boolean
The default behaviour is for no Boolean to be performed. Specifying a 'target'
but no Boolean function, or vice versa, will result in PK_ERROR_bad_value
being raised. If 'sweep_boolean' is set to PK_sweep_boolean_subtract_c, the
result body will be formed by subtracting the swept tool from the 'target'. If
'sweep_boolean' is set to PK_sweep_boolean_intersect_c, the result body will be
formed by intersecting the 'target' with the swept tool. In both cases, the
'swept_tool' returned will be the result of that Boolean, that is the 'target'
as altered by the Boolean operation rather than the tool produced by the sweep
operation.

If the Boolean operation fails, PK_ERROR_boolean_failure will be raised. If
the tool and the target do not clash, a PK_sweep_tool_fault_t of
PK_sweep_tool_missed_target_c will be returned. Disjoint results are not
supported so cases in which the swept tool would split the target body result
in PK_ERROR_disjoint being raised.

Only solid body targets are supported; any other body type will lead to the
error PK_ERROR_bad_type.