PK_BODY_make_section   

PK_ERROR_code_t                 PK_BODY_make_section
(
--- received arguments ---
int                             n_targets, --- number of target bodies
PK_BODY_t                       targets[], --- target bodies
int                             n_tools,   --- number of tool bodies
PK_BODY_t                       tools[],   --- tool bodies
const PK_BODY_make_section_o_t *options,   --- Sectioning options

--- returned arguments ---
PK_TOPOL_track_r_t       *const tracking,  --- tracking information
PK_BODY_make_section_r_t *const results    --- resultant bodies
)


This function generates sections of target bodies using set of tool bodies.
Target bodies remain unchanged.


Specific Errors:

    PK_ERROR_contradictory_request      Bad combination of options or bad value
                                        for option 'result_body_type'(MILD)
    PK_ERROR_missing_geom               Target or tool has incomplete
                                        geometry(SERIOUS)
    PK_ERROR_wire_body                  Target or tool is a wire body(MILD)
    PK_ERROR_non_manifold               Non-manifold result(SERIOUS)
    PK_ERROR_boolean_failure            Inconsistent arguments, or
                                        internal error(SERIOUS)
    PK_ERROR_general_body               Target or tool is a general body(MILD)
    PK_ERROR_not_sheet                  Tool is not a sheet body(MILD)
    PK_ERROR_same_tool_and_target       Tool body is also target body(MILD)




Introduction

The given set of tool bodies is used to generate sections of target bodies.
Target bodies remain unchanged.

Targets may be solid or sheet bodies. Tools must be sheet bodies.

When targets are imprinted on tools, faces of tools may be split to generate
new faces. After imprinting, any tool faces that are inside target bodies are
retained, and any tool faces that are outside target bodies are deleted. If
this results in the tool body being split into several disjoint manifold
components, 'allow_disjoint' in the options structure controls whether the
tool body is split or not.

The behaviour of the sectioning operation can be controlled via the options
structure 'options'.

See Non-destructive sectioning for more information.

Output of the operation is returned in the 'results' structure.

Section Options

If the 'tracking' option is set to PK_LOGICAL_true, then tracking information
for all faces and edges of 'bodies' in 'results' is returned.

If the 'allow_disjoint' option is set to PK_LOGICAL_true, then 'bodies' in
'results' may contain disjoint manifold components.
If this option is set to PK_LOGICAL_false, resultant bodies having disjoint
components will be split such that each body has a single connected
component.

'result_body_type' can either be PK_BODY_type_sheet_c or PK_BODY_type_wire_c.
If 'result_body_type' is PK_BODY_type_wire_c, attempts will be made to ensure
that 'bodies' contains valid wire bodies, i.e no vertex has more than three
edges meeting.

Returned Arguments

Tracking

The 'tracking' structure contains topology tracking information on the
operation. In the case of this function, tracking information for all the
faces and the edges from 'bodies' is returned.

For the faces, the PK_TOPOL_track_t structure in 'tracking' will be of type
PK_TOPOL_track_derive_c and 'original_topols' will contain the tag of the
original face from the 'tools'. For the faces 'n_original_topols' will be 1.

If the edge is newly created as a result of imprint of target and tool face
'PK_TOPOL_track_t' will be of type PK_TOPOL_track_create_c. 'original_topols'
will contain tags of these two faces. For such edges 'n_original_topols'
will be 2.

If the edge is result of imprint of target and tool face, but lies on existing
tool edge, 'PK_TOPOL_track_t' will be of type PK_TOPOL_track_derive_c and
'original_topols' will contain tag of the tool edge. For such edges
'n_original_topols' will be 2.

In both the above cases, if the edge is coincident with the target edge,
tag of the target edge will be returned. The first entity will be from the
target body and second from the tool body.

If the edge is not result of imprint and comes from the edge on tool body,
'PK_TOPOL_track_t' will be of type PK_TOPOL_track_derive_c. 'original_topols'
will contain tag of the tool edge. For such edges 'n_original_topols' will be
1.

Status and Fault Reporting

The 'results' structure contains resultant bodies and additional information,
if any about the operation.

If the function returns 'PK_ERROR_no_errors', then resultant bodies will be
contained within the 'bodies' array.

The 'reports' will provide information about non-manifold or other invalid
sections.

Each report structure contains a 'report' field indicating the reason for the
failure and, if possible, an array of entities. These entities may assist the
application in identifying the region or entities that resulted in the failure.
The 'entities' array may contain topology from the target and tool bodies. The
entities returned in the array will be members of the following classes :

   o PK_CLASS_body
   o PK_CLASS_shell
   o PK_CLASS_face
   o PK_CLASS_edge
   o PK_CLASS_vertex

If 'report' is PK_boolean_report_non_manifold_c, the invalid section body will
be returned in 'entities' array.

Function Restrictions

The following restrictions apply to the sectioning operation :

o Targets can be solid bodies or sheet bodies.

o Tools must be sheet bodies.

o This function does not support general bodies.


Option Restrictions
The following options within the input 'options' are
ignored by this function :
    o 'default_tol'
    o 'max_tol'