Sectioning   

<<< Instancing And Patterning Chapters Intersections >>>

Contents

[back to top]


55.1 Introduction

This chapter explains how you section bodies using the sectioning operations available within Parasolid, and also how to clip lattices using a set of clipping entities. The sectioning functions support sectioning with surfaces (planar or cylindrical) or sheet bodies.

The sectioning operation is similar to the boolean subtract operation, except the functions receive slightly different options and return more section-related information. Apart from these differences, the rules regarding tag persistence are identical to that of the boolean operation.

Parasolid supports both global and local sectioning operations. These are described in the rest of this chapter.

 

Note: This functionality offers partial support for facet geometry.

Like global and local booleans, global and local sectioning can automatically look for regions between the target and tool that are nearly coincident to aid the sectioning operation. See Section 51.4.5, “Matched topology in local and global boolean operations”, for complete details.

The lattice clipping operation is similar to a sectioning operation and will return one or more new lattices that represent the portions of the supplied lattice that lie on the relevant side of the supplied clipping entities.

 

Related Topics:

[back to top]


55.2 Global sectioning

A global section is characterized by the comparison of all face pairs from the target and section entities. These section operations are supported by the PK_BODY_section_with_sheet_2 and PK_BODY_section_with_surf functions which require one target body, one tool entity and an options structure.

55.2.1 Sectioning with surfaces

PK_BODY_section_with_surf supports sectioning a body with a planar or cylindrical surface. The target body to be sectioned can be either a solid or sheet body. The effect is the same as subtracting a sheet tool with the same infinite surface.

This function receives an options structure that contains an option to specify whether resulting bodies in front of the sectioning tool, behind the sectioning surface or both should be returned by the function.

If generalised topology is enabled, then the target may be a general body. In cases where a general body cannot be successfully sectioned, error information is saved in a Parasolid Report. See the documentation for PK_BODY_section_with_surf for more details.

55.2.2 Sectioning with sheets

PK_BODY_section_with_sheet_2 supports sectioning a body with a sheet tool. The target body to be sectioned can be either a solid or sheet body. The tool may be disjoint.

After modifying the target body the sectioning sheet tool is deleted.

PK_BODY_section_with_sheet_2 receives an options structure which contains an option to specify whether result bodies in front of the sectioning tool, behind the sectioning tool or both should be returned by the function.

If generalised topology is enabled, then the target and the result body (or bodies) can be general but the tool body must be manifold.If it is not possible to classify the result body as being in front of or behind the sectioning tool, then a Parasolid Report of type PK_REPORT_record_1_t is generated.

See the documentation for PK_BODY_section_with_sheet_2 for more details.

See Chapter 11, “Using Reports”, for more information about the Parasolid Report mechanism.

[back to top]


55.3 Local sectioning

A local sectioning operation is characterized by the comparison of selected face pairs in the target and section bodies. This form of section is quicker than a global section but does not guarantee topological consistency on the resulting bodies.

This sectioning operation is supported by the PK_FACE_section_with_sheet_2 function, which requires one or more faces from the target and section bodies and an options structure.

55.3.1 Sectioning with faces

PK_FACE_section_with_sheet_2 supports sectioning particular faces of a target body with faces of a sheet body. The target body to be sectioned can be either a solid or sheet body. This function does not support generalised topology. It is similar to PK_FACE_boolean_2 in that it supports partial sectioning of bodies.

PK_FACE_section_with_sheet_2 receives an options structure similar to that of PK_FACE_boolean_2 and includes the option to specify whether resulting bodies in front of the sectioning tool, behind the sectioning tool or both should be returned by the function. The options structure also has the facility for the user to specify matched topology in the same way as for boolean operations.

[back to top]


55.4 Options for global and local sectioning

The behaviour of the sectioning functions, PK_BODY_section_with_sheet_2 (global), PK_BODY_section_with_surf (global) and PK_FACE_section_with_sheet_2 (local) is altered using options passed to these functions. The options structures for these functions are different, but overlap with respect to a number of options. The options are as follows:

 

Option

Description

fence
(global & local)

Determines which bodies, front and/or back, are returned when performing a section operation.

merge_imprinted
(global & local

Merge all mergeable imprinted edges created and/or located by the section operation. Note, mergeable edges which are adjacent to the new section faces are not merged.

merge_new_faces
(global & local)

Merge all mergeable imprinted edges created by the section operation, including edges adjacent to the new section faces.

selective_merge
(global & local)

Avoid merging imprinted edges that existed and were mergeable before the start of the section operation.

check_fa
(global & local)

Checks faces involved in the section operation. Only faces which are adjacent to imprinted edges are checked

default_tol
(global & local)

The default tolerance to which the section operation, if it has to, may approximate entities or assume that entities are coincident.

max_tol
(global & local)

The maximum tolerance which may be applied to any entity involved in the section operation.

tracking
(global)

Whether or not tracking information for imprinted edges and for vertices imprinted on wireframe edges on the target body is returned in the tracking structure.

Default: PK_LOGICAL_false.

Note: This option is used by PK_BODY_section_with_sheet_2 only

extend_face_list
(local)

A local boolean receives a subset of the faces of a target and/or a tool body. If the imprinting phase of the boolean results in incomplete loops of imprinted edges, then additional target and/or tool faces are used.

select_region
(local)

This option sub-structure is used to identify regions of the tool to be included or excluded in the boolean result. See Section 51.4.2, “Selecting regions in local booleans” for a description of the options.

matched_region
(global & local)

This option sub-structure describes matched regions between the target and tool bodies. See Section 51.4.5, “Matched topology in local and global boolean operations”, for a description of the options.

keep_target_edges
(global & local)

Control which edge survives when a target edge and tool edge coincide during a section operation. This can be one of:

  • PK_LOGICAL_false: The older edge (with the smallest tag) survives. This is the default.
  • PK_LOGICAL_true: The target edge survives, unless both
    • the target edge is a new edge imprinted during the boolean, and
    • the tool edge was already present

    in which case, the tool edge survives.

If both faces adjacent to the tool edge survive, then the tool edge survives, regardless of the value of this option. If generalised topology is on, the target edge always survives.

keep_as_facet
(global & local)

Controls whether to return a resulting body containing facet geometry only, or a mixture of classic and facet geometry. See Section 84.6, “Creating a mixture of facet and classic geometry”, for more information.

55.4.1 Effect of the fence options in sectioning operations

The fence option controls which regions of the target entities are returned.

Example 1:

Sectioning solid with sheet using the both fence option

 

Figure 55-1 Sectioning solid using the both fence option

Using the both fence option, all regions (in front and behind the sheet body are returned); i.e., three front bodies, one back body, three front faces and three back faces.

Example 2:

Sectioning solid with sheet using the front fence option

 

Figure 55-2 Sectioning solid using the front fence option

Using the front fence option, only regions in front of the sheet body are returned; i.e., three front bodies and three front faces.

Example 3:

Sectioning solid with sheet using the back fence option

 

Figure 55-3 Sectioning solid using the back fence option

Using the back fence option, only regions behind the sheet body are returned; i.e., one back body and three back faces.

55.4.2 Merging options in sectioning operations

Example:

Local section with two excluded regions and fence = back

 

Figure 55-4 Merge options in sectioning operations

55.4.3 Geometry sharing

Using the sectioning functions may break the geometry sharing by splitting a body into two with the result that there are faces on each body that used to share a common surface. Similarly, the functions may also create geometry sharing of the section surface in one of the bodies, and the sharing of a copy of it in the other body.

[back to top]


55.5 Non-destructive sectioning

The global and local sectioning operations described in Section 55.2, Section 55.3, and Section 55.4 all operate directly on the target body, either destroying it completely or splitting it up into several components and returning only the components requested.

Parasolid also offers support for non-destructive sectioning, where the target entities supplied to Parasolid are left unchanged. You can perform non-destructive sectioning using any of the following functions:

 

Function

Description

PK_BODY_make_section

Section a set of target bodies using a set of sheet bodies.

PK_BODY_make_section_with_surfs

Section a set of target bodies using a set of surfaces.

PK_FACE_make_sect_with_sfs

Section a set of target faces using a set of surfaces.

All of these functions take the following options:

 

Option

Description

tracking

Whether or not to return tracking information that relates new edges created in the tool body to their originating faces in the target body. Default: PK_LOGICAL_false.

allow_disjoint

Whether or not to allow disjoint bodies to be returned.

  • If PK_LOGICAL_false, a tool body that is disjoint after the operation is returned as several bodies, each with a single connected component.
  • If PK_LOGICAL_true, a tool body that is disjoint after the operation is returned as a single disjoint body with several disconnected components.

This behaviour occurs regardless of whether a tool body is disjoint when passed into the function. For example, if a disjoint tool body is passed in, and allow_disjoint is PK_LOGICAL_false, several non-disjoint bodies may be returned.

Default: PK_LOGICAL_false.

keep_as_facet

Controls whether to return a resulting body containing facet geometry only, or a mixture of classic and facet geometry. See Section 84.6, “Creating a mixture of facet and classic geometry”, for more information. Default: PK_BODY_keep_as_facet_yes_c.

Note: This field is ignored if the target entities contain classic geometry. This field is ignored in calls to PK_BODY_make_section.

PK_BODY_make_section and PK_BODY_make_section_with_surfs also take the following options:

 

Option

Description

default_tol

The default tolerance to which the boolean operation may approximate entities or assume that entities are coincident to. Default: 1.0e-5.

See the PK Reference documentation for PK_BODY_make_section_t for more information.

Note: This field is used by PK_BODY_make_section_with_surfs only.

max_tol

The maximum tolerance which may be applied to any entity involved in the boolean operation. By default, it is set to 0.0. If it is not set to the default, then it must be set to a value that is greater than that of default_tol .

See the PK Reference documentation for PK_BODY_make_section_t for more information.

Note: This field is used by PK_BODY_make_section_with_surfs only.

result_body_type

Whether tool bodies should be returned as sheet bodies or wire bodies (by deleting the faces from the returned sheet bodies). Default: PK_BODY_type_sheet_c.

update

Update switch to maintain consistency when rebuilding models built in earlier versions of Parasolid (Default: PK_boolean_update_default_c). See Section 51.4.19, “Update control”, for more information.

n_offsets
offsets

For slicing operations, the number of offsets to be applied to the supplied tool plane and the offset distances themselves. (Default: 0, NULL.) See Section 55.5.1, “Creating planar sections at multiple offsets” for more information.

Note: This field is used by PK_BODY_make_section_with_surfs only.

banned_classes

For slicing operations, an array of classes of curves that cannot appear in the resultant wire bodies. (Default: 0, NULL.) See Section 55.5.1, “Creating planar sections at multiple offsets” for more information.

Note: This field is used by PK_BODY_make_section_with_surfs only.

PK_FACE_make_sect_with_sfs differs from PK_BODY_make_section and PK_BODY_make_section_with_surfs in that it takes a set of target faces (rather than bodies) and tool surfaces as input and computes intersections between those faces and surfaces. The result is a set of imprinted edges that forms one or more wire bodies. These edges may or may not form a closed loop, depending on the input faces used. If you want to ensure that the returned edges always form a closed loop (regardless of the input faces used), you should set the extend_face_list field (described below) in the options structure to PK_LOGICAL_true; this will enable Parasolid to use additional target faces in order to return closed loops of edges.

 

Note: PK_FACE_make_sect_with_sfs never returns sheet bodies, even when the imprinted edges form a closed loop; the resulting bodies are always wire bodies.

Figure 55-5 shows an example of local sectioning using PK_FACE_make_sect_with_sfs, illustrating the effect of extend_face_list .

 

Option

Description

extend_face_list

Whether to use additional target faces to obtain a closed loop of imprinted edges.

Default: PK_LOGICAL_false.

 

Figure 55-5 Sectioning a body using target faces and surfaces

55.5.1 Creating planar sections at multiple offsets

The n_offsets, offsets and banned_classes options in PK_BODY_make_section_with_surfs allow you to create wire body sections from a single tool plane and an array of offset distances. Parasolid will generate a section for each offset value. Offset values can be positive or negative, and a value of zero will produce a section that is coincident with the tool plane. This functionality offers improved performance over sectioning with multiple tool planes, and can be useful for creating sections in Additive Manufacturing workflows in which models are sliced in preparation for printing,

Figure 55-6 shows an example in which a target body has been sectioned using a tool plane and an offsets array containing four non-zero values.

 

Figure 55-6 Sectioning a body using a tool plane and four non-zero offset values

The banned_classes option allows you to specify classes of curve that should not appear in the resulting wire bodies. When used, any resulting curves that are of a banned class are converted to polylines. This option could be used if your application (or others in the full workflow) cannot support certain classes of curve.

 

Note: When setting the n_offsets, offsets and banned_classes options to non-default values, the tool surfaces array must contain a single plane, keep_as_facet must be set to PK_BODY_keep_as_facet_no_c, and result_body_type must be PK_BODY_type_wire_c

[back to top]


55.6 Clipping Lattices

You can clip a lattice using either a single surface or one or more faces from bodies which are manifold and not disjoint with PK_LATTICE_clip. This function returns one or more lattices representing the portion of the input lattice that lies on the specified side of the clipping entities. The original lattice and the set of clipping entities are left unchanged.

This functionality allows you to trim Parasolid lattices so that they match the shape of a model, as shown in Figure 55-7

A lattice is clipped at the intersections of the centre lines of its lrods with the supplied clipping entities. A new lball will be created at the end of each clipped lrod, to close the lattice.

The result of a call to PK_LATTICE_clip is a set of lattices with information on their validity and, optionally, on the set of lballs that were created at the ends of any clipped lrods, and on any lballs that were incident with one or more clipping entities.

 

Figure 55-7 Clipping a lattice using a plane as the clipping entity

 

Related Topics:

55.6.1 Received and returned arguments

PK_LATTICE_clip receives a lattice and an options structure, which contains the following options:

 

Option

Description

n_clip_entities

The number of entities used to clip the lattice.

Default: 0.

clip_entities

An array of clipping entities which must be either a single surface or one or more faces from bodies which are manifold and not disjoint.

Default: NULL.

fence

A parallel array of flags that indicate which side of the corresponding entry in clip_entities should clip the lattice. All clip_entities from the same body should have the same fence value. See Section 55.6.2, “Effect of the fence option in lattice clipping”, for more information.

Default: NULL.

lrod_clip

Controls the behaviour of lrods that are clipped during the operation. See Section 55.6.4, “Controlling the behaviour of clipped ltopology”, for more information.

Default: PK_LROD_clip_keep_connected_c.

lrod_min_length

Controls the minimum length for an lrod to survive. See Section 55.6.4, “Controlling the behaviour of clipped ltopology”, for more information.

Default: 0.0.

lrod_coi

Controls whether lrods that are coincident with the clipping entities survive after a clipping operation. See Section 55.6.4.1, “Controlling the behaviour of ltopologies that are coincident with a clip entity”, for more information.

Default: PK_LROD_coi_keep_connected_c

lball_radius

Controls the radius of any new lballs that are created during the operation. See Section 55.6.4, “Controlling the behaviour of clipped ltopology”, for more information.

Default: PK_LBALL_radius_interpolate_c.

want_clipped_lballs

Controls whether to return information about lballs that were affected by the clipping operation. See Section 55.6.5, “Controlling returned information”, for more information.

Default: PK_LOGICAL_false.

merge_duplicates

Controls whether duplicate ltopologies created by the clipping operation should be merged. See Section 55.6.4.2, “Merging duplicate ltopologies when clipping lattices”, for more information.

Default: PK_LTOPOL_dup_merge_no_c

duplicate_tolerance

The tolerance used to merge duplicate ltopologies when merge_duplicate is set to PK_LTOPOL_dup_merge_yes_c. See Section 55.6.4.2, “Merging duplicate ltopologies when clipping lattices”, for more information.

The function returns the following arguments:

 

Returned

Description

result

A token giving information on the success of the operation

n_lattices

The number of lattices created

lattices

An array of n_lattices structures, each containing a result lattice and information about it. See Section 55.6.6, “Returned information on clipped lattices”, for more information.

55.6.2 Effect of the fence option in lattice clipping

The fence option in PK_LATTICE_clip allows you to specify whether lattice topology (ltopology) in front or behind each of the clipping entities should survive the operation. An ltopology is considered to be in front of a clipping entity if the entity’s normal points towards the ltopology, and behind the clipping entity if the ltopology lies in the direction opposite to the entity’s normal.

A fence token should be supplied for each of the clipping entities. The token may take one of the following values:

 

Value

Description

PK_clip_fence_front_c

Ltopology will survive if it lies in front of the clipping entity, and any ltopology behind the entity will be deleted.

PK_clip_fence_back_c

Ltopology will survive if it lies behind the clipping entity, and any ltopology in front of the entity will be deleted.

 

Note: All clipping entities from the same body should have the same fence value.

Figure 55-8 demonstrates the effect of the fence option when clipping a simple cube lattice using a planar face. In this figure, clipped lrods are retained in each of the results, and new lballs created by the operation are highlighted in blue.

 

Figure 55-8 Illustrates the effect of the fence option when clipping a cube lattice with a planar face.

55.6.3 Effect of clipping

Clipping entities act on the centre lines of the lattice’s lrods rather than on the volume of the lattice. Therefore, the fence option takes effect at the position where the clip entity intersects the axis of each lrod. This is illustrated in Figure 55-9, which shows two examples of a dumbbell lattice that forms a shallow angle of intersection with the supplied clip entity. The fence option is set so that ltopology will survive if it is below the clip entity in the figure.

 

 

Figure 55-9 Demonstrates how clip entities clip the axes of the lattice’s lrods.

When ltopology lies coincident with a clip entity this is treated as a special case. See Section 55.6.4.1, “Controlling the behaviour of ltopologies that are coincident with a clip entity”, for more information.

55.6.4 Controlling the behaviour of clipped ltopology

The behaviour of ltopology that interacts with a clipping entity is controlled by the lrod_clip , lrod_min_length , lball_radius and lrod_coi options.

The lrod_clip and lrod_min_length options work in collaboration and determine whether an lrod that interacts with the clipping entities should survive the operation. Primary control over the survival of lrods is given by the lrod_clip option, which can take the following values:

 

Value

Description

PK_LROD_clip_delete_c

Any lrods that interact with the clipping entity are deleted

PK_LROD_clip_keep_connected_c

The surviving portions of any lrods that interact with the clipping entity are retained provided that they have a surviving lball

PK_LROD_clip_keep_all_c

The surviving portions of any lrods that interact with the clipping entity are retained

Figure 55-10 shows the different results that can be obtained through varying the lrod_clip control. In this figure, the fence option has been set to PK_clip_fence_front_c, and new lballs created by the operation are highlighted in blue.

The lrod_min_length option allows you to specify a minimum length value for the surviving portions of lrods when lrod_clip is set to PK_LROD_clip_keep_connected_c or PK_LROD_clip_keep_c. If you supply a non-zero lrod_min_length clipped lrods will be retained if their length is greater than or equal to this value.

 

Figure 55-10 The effect of the lrod_clip option when clipping a lattice with two faces.

When an lrod is clipped and retained in the result, Parasolid will create a new lball to cap the open end of the lrod. The size of this lball is controlled by the lball_radius option. The radii of any new lballs can either be linearly interpolated from the radii of the original lballs, or set to the radius of the lrod at the clipping point.

 

Note: As all clipped lrods must be capped with a new lball, unavoidable self-intersections can sometimes occur in the resulting lattice(s) where, for example, a new lball clashes with its lrod-adjacent lball. Any clashing ltopologies in the result are reported to the application. See Section 55.6.6, “Returned information on clipped lattices”, for more information.

55.6.4.1 Controlling the behaviour of ltopologies that are coincident with a clip entity

When ltopology lies coincident with a clip entity this is treated as a special case. If the axis of an lrod lies coincident with a clip entity, the lrod_coi option can be used to determine whether the lrod survives the operation. It has the following values:

 

Value

Description

PK_LROD_coi_delete_c

All lrods that are coincident with the clipping entity are deleted

PK_LROD_coi_keep_connected_c

All lrods that are coincident with the clipping entity are retained provided they are connected to surviving non-coincident ltopology. This is the default.

PK_LROD_coi_keep_all_c

All lrods that are coincident with the clipping entity are retained

If an lball’s centre lies on a clip entity, its survival depends on the values of the lrod_coi option. If it survives, the lball will be marked as touched. See Section 55.6.6, “Returned information on clipped lattices”, for more information on touched lballs

Figure 55-11 shows an example where a planar clip entity is coincident with the axis of an lrod in a lattice. In both results the lrod_coi option is set to PK_LROD_coi_keep_all_c, and the coincident lrod is retained. The result lballs that are touched by the clip entity are highlighted in orange.

 

Figure 55-11 Clipping a lattice with a clip entity that lies coincident with an lrod of the lattice.

Figure 55-12 shows the different results that can be obtained through varying the lrod_coi control. The result lballs that are touched by the clip entity are highlighted in orange.

 

Figure 55-12 The effect of the lrod_coi option when clipping a lattice

55.6.4.2 Merging duplicate ltopologies when clipping lattices

When clipping lattices you can choose to merge any duplicate ltopologies created as a result of the clipping operation using the merge_duplicates and duplicate_tolerance options.

When merge_duplicates is set to PK_LTOPOL_dup_merge_yes_c, lballs created as a result of the clipping operation are merged with other lballs whose position, radius and lball_lrod_radius are within the tolerance supplied in duplicate_tolerance .

 

Note: Lballs will only be merged if at least one of them was created by the clip operation.

Figure 55-13 demonstrates a clip operation on a lattice where duplicate ltopologies are merged. In this example, the fence option is set to PK_clip_fence_back_c and merge_duplicate is set to PK_LTOPOL_dup_merge_yes_c.

 

Figure 55-13 The effect of the merge_duplicate option when clipping a lattice

55.6.5 Controlling returned information

If your application needs to return detailed information to the user on the ltopology that was affected by the clipping operation, you can use the want_clipped_lballs option to request that an array of affected lballs is returned for each result lattice.

55.6.6 Returned information on clipped lattices

PK_LATTICE_clip returns an array of structures containing information on the lattices that were created during the operation. Each structure contains the following fields:

 

Field

Description

status

The validity status of the resulting lattice

lattice

The resulting lattice

n_error_ltopols

The number of error_ltopols if any unavoidable self-intersections are present in the result

error_ltopols

The ltopologies in the lattice that clash with other ltopologies

n_clipped_lballs

The length of the clipped_lballs and lball_clip_types arrays, if requested using the want_clipped_lballs option. See Section 55.6.5, “Controlling returned information”, for more information.

clipped_lballs

The lballs in the resulting lattice that were affected by the clipping operation

lball_clip_types

A parallel array of tokens giving information on how the corresponding lball in the clipped_lballs array was affected. The information that is returned is as follows:

[back to top]

<<< Instancing And Patterning Chapters Intersections >>>