Imprinting and Curve Projection   

<<< Introduction To Imprinting and Booleans Chapters Introduction to Booleans >>>

Contents

[back to top]


50.1 Introduction

You can use Parasolid’s imprinting or projection functionality to imprint or project entities onto a body, sheet, surface or a set of faces. This chapter describes this functionality using:

 

Related Topics:

[back to top]


50.2 Curve projection and imprinting

You can use PK_CURVE_project for normal and vector projection or imprinting of a set of curves to a body, surface or a set of faces. A projection down the face normal is performed, unless a vector is supplied, in which case a projection in a vector direction is performed. The resultant projected curves and points are either orphan or construction geometry.

For examples of this functionality, see the code example in the C++\Code Examples\Modelling\Projecting Curves and Imprinting folder, located in example_applications in your Parasolid installation folder.

 

Note: Projection down the face normal is intended for use with close curves that are related in some way to the body or faces onto which they are being projected. Furthermore, it is recommended that you set max_projection_dist to avoid inconsistent results.

50.2.1 Received arguments

PK_CURVE_project receives the following arguments:

 

Argument

Description

n_curves

The number of tool curves

curves

An array describing the tool curves. It cannot contain self-intersecting curves or foreign geometry.

intervals

An array describing the curve intervals

n_targets

The number of target entities

targets

An array describing the target entities

options

A set of options to control the results of the curve projection or imprint. See Section 50.2.5, “Summary of options”, for an introduction to these options.

50.2.2 Returned arguments

PK_CURVE_project returns the following arguments:

 

Argument

Description

results

The resultant projected geometry.

tracking

Tracking information for the operation. See Section 50.2.16, “Tracking information”, for more information.

50.2.3 Update control

If your application relies on reproducing behaviour when updating models built using earlier versions of Parasolid, you can use the update option to preserve old behaviour and help eliminate differences in rebuild results. This option lets you turn off some of the projecting enhancements that have been added at different Parasolid versions. Doing this ensures that curve projection gives the same results in the latest version of Parasolid as in earlier versions. See PK_proj_update_t in the PK Interface Programming Reference Manual for more information on this update option.

 

Note: The default value is PK_proj_update_default_c which uses all appropriate projecting enhancements. Setting to a non-default value disables all appropriate projecting enhancements.

50.2.4 Project or imprint curves

You can choose to only project curves, only imprint curves or to project and imprint curves using the function option. This option takes the following values:

 

Value

Description

PK_proj_function_project_c

The input curves are projected onto the target producing new geometry. This new geometry can be returned as orphan geometry or associated with the body as construction geometry. The target topology and input curves are unaffected. This is the default value.

PK_proj_function_imprint_c

The input curves are projected onto the target and then imprinted producing new edges and vertices. No orphan or construction geometry is produced and the input curves are unaffected.

PK_proj_function_both_c

This combines the behaviour of PK_proj_function_project_c and PK_proj_function_imprint_c. Projected geometry is created, and a copy is made, thereby creating two identical sets of projected geometry. One set is imprinted, and attached to the edges and vertices created by the imprint. The other set is attached to the body as orphan or construction geometry.

Different options are available depending on what value of the function option you choose. See Section 50.2.5, “Summary of options” for more information.

Figure 50-1 illustrates the results of choosing different values of the function option.

 

Figure 50-1 Choosing whether to project, imprint, or project and imprint input curves

50.2.5 Summary of options

You can set a number of options when either projecting curves, imprinting curves or doing both operations simultaneously using the PK_CURVE_project_o_t option structure. All options are available for all values of function unless otherwise stated. This contains the following:

 

Option

Description

function

Whether to perform projection only, imprint only, or both a projection and an imprint (Default: PK_proj_function_project_c). See Section 50.2.4, “Project or imprint curves”, for more information.

method

Whether to perform a normal, vector, or perspective projection. See Section 50.2.6, “Choosing the projection method for the curve”, for more information. Default: PK_proj_method_unset_c

direction

The direction of the vector projection of the curve when method is set to PK_proj_method_vector_c. See Section 50.2.6, “Choosing the projection method for the curve”, for more information.

eye_position

If method is PK_proj_method_perspective_c, eye_position specifies the position for the source of rays needed to define the perspective projection. See Section 50.2.6, “Choosing the projection method for the curve”, for more information. Default: (0.0 0.0 0.0)

bidirectional

Whether the direction of the vector projection is both positive and negative (Default: PK_LOGICAL_false). See Section 50.2.6, “Choosing the projection method for the curve”, for more information.

use_max_dist

Whether to limit the curve projection to within max_dist of the input curve (Default: PK_proj_max_dist_no_c). See Section 50.2.7, “Limiting the distance of the projection”, for more information.

max_dist

The maximum distance of the curve projection from the input curve. The distance of a vector projection is measured along direction . See Section 50.2.7, “Limiting the distance of the projection”, for more information.

hidden

How to project to hidden faces. (Default: PK_proj_face_hidden_body_c). See Section 50.2.8, “Projecting to hidden faces”, for more information.

connect

How to connect disjoint components of the projection.This option can only be used for vector projections to faces or bodies (Default: PK_proj_connect_none_c). See Section 50.2.9, “Connecting disjoint components”, for more information.

banned_classes

An array of output curve classes that are not to be produced by the operation.This array cannot contain both PK_CLASS_bcurve and PK_CLASS_spcurve.

split_clash (projecting only)

How to split the projected curves at clashes and intersections (Default: PK_proj_split_clash_all_c). See Section 50.2.10, “Splitting output curves”, for more information.

create_points

How to project curves to points for point-like projections (Default: PK_proj_to_points_no_c). See Section 50.2.11, “Projecting curves to points”, for more information.

Note: When clashing the end-points of point-like projections, Parasolid considers the tolerance as applying to both ends which can lead to vertex tolerances (or achieved tolerances) that are up to twice the input tolerance .

construction (projecting or both)

Whether to add the projection as construction geometry. If the projection is to a surface or the option is set to PK_LOGICAL_false, orphan geometry is produced. This is in addition to nominal geomtery on tolerant edges controlled by the nominal option (Default: PK_LOGICAL_true).

tolerance

Controls the accuracy of resultant projected curves, where an accurate projection is not possible and conversion to a b-curve or SP-curve is necessary. Also used where conversion to a b-curve is requested ( banned_classes option), and in computing tolerant clashes ( split_clash option). All resultant curves will lie exactly in the surface into which they were projected unless banned_classes forces conversion to B-curves, in which case the resulting B-curves will lie within operation tolerance of the surface (Default: 1.0e-6).

imprint_precision (imprinting or both)

Controls how the precision of the imprinted edges and vertices is applied (Default: PK_imprint_precision_auto_c). See Section 50.2.12, “Setting precision of imprints”. for more information.

nominal (imprinting or both)

Whether to attach projected curves to tolerant imprinted edges as nominal geometry. This is in addition to any geometry controlled by the construction option (Default: PK_proj_nominal_no_c.) See Section 50.2.13, “Attaching nominal geometry”, for more information.

complete (imprinting or both)

How to complete the imprinted edges (Default: PK_proj_complete_no_c). See Section 50.2.14, “Completing imprints”. for more information.

update

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

tracking

Controls the format of the tracking records (Default: PK_proj_tracking_basic_c). See Section 50.2.16, “Tracking information”, for more information.

results_output

Whether to output results in the return structure or in the Parasolid Report. (Default: PK_results_output_return_c). See Section 50.2.17, “Reporting function results” for more information.

want_orig_intervals

Whether to return the originating intervals for each projection in the Parasolid Report. (Default: PK_LOGICAL_false). See Section 50.2.17, “Reporting function results” for more information.

50.2.6 Choosing the projection method for the curve

The method option allows you to choose whether to project a curve using a normal, vector, or perspective projection. All of these options are discussed in this section.

 

Note: We recommend that you do not leave the method option set to the default value.

50.2.6.1 Normal projection

To produce a normal projection, where a curve is projected down the normal of a face, the method option must be set to PK_proj_method_normal_c.

Although normal projections are performed down the face normal, they are also implicitly bidirectional. Therefore, if the projection curves are within the normal field of the face but lie behind it, they will project onto the target. Normal projections are best used when projecting curves that are close to and related to the faces that they are being projected onto. When performing a normal projection, we recommend that you limit the maximum distance to avoid unexpected projections on distant faces. See Section 50.2.7, “Limiting the distance of the projection” for more information on maximum distance.

 

Figure 50-2 Normal projection

50.2.6.2 Vector projection

To produce a vector projection, where a given point on the curve is projected from the curve in the direction specified by direction , the method option must be set to PK_proj_method_vector_c.

For vector projections, bidirectional allows you to project curves in the positive and negative direction . Figure 50-3 shows an upward vector projection of a curve onto a body.

 

Figure 50-3 Curve projection using the bidirectional option.

50.2.6.3 Perspective projection

To produce a perspective projection, where a curve is projected along a ray away from a given eye point onto a target, the method option must be set to PK_proj_method_perspective_c. The origin of the projection is specified by eye_position . This is illustrated in Figure 50-4.

 

Figure 50-4 Perspective projection

50.2.7 Limiting the distance of the projection

You can limit the distance of the projection from the input curve using the use_max_dist and max_dist options. The use_max_dist option takes the following values:

 

Value

Description

PK_proj_max_dist_no_c

Ignore the projection distance between the curve projection and the input curve. This is the default.

PK_proj_max_dist_whole_c

For each input curve, only produce projections which lie fully within the specified max_dist of its originating curve. If a projection is only partially within this distance, no projection curve is produced.

If use_max_dist is set to a non-default value, the value of max_dist must be greater than zero.

 

Note: This option does not support vector projections to surfaces.

50.2.8 Projecting to hidden faces

You can control how to project to hidden faces using the hidden option. This option takes the following values:

 

Value

Description

PK_proj_face_hidden_no_c

Faces cannot be hidden.

PK_proj_face_hidden_array_c

Faces can be hidden by faces in the input array

PK_proj_face_hidden_body_c

Faces can be hidden by the parent body.

Figure 50-5 shows three cases of a downward vector projection of a curve onto a body.

 

Figure 50-5 Vector projection of a curve using hidden option

50.2.9 Connecting disjoint components

You can control the connection of disjoint components of a curve projection using the connect option. With this option, resultant curves that would otherwise have been disjointed can be connected. This option takes the following values:

 

Values

Description

PK_proj_connect_none_c

Do not connect disjoint projected curves,

PK_proj_connect_side_c

Connect, if possible, with projections on faces that are side on when viewed in the direction of the projection.

PK_proj_connect_all_c

Connect with side and hidden faces if possible.

PK_proj_connect_side_all_c

Project to all faces that are side on when viewed in the direction of the projection, even if they do not connect disjoint components of the projection.

PK_proj_connect_hidden_all_c

Project to all faces that are side on or hidden when viewed from the direction of the projection, regardless of whether they connect disjoint components of the projection.

Note: This value is not supported if use_max_dist is set to PK_proj_max_dist_whole_c.

 

Note: If use_max_dist is set to PK_proj_max_dist_whole_c, all connect projections must lie entirely within the max_dist of the input curve.

Figure 50-6 illustrates this option.

 

Figure 50-6 Curve projection using the connect option

 

Note: This option can only be used for vector projection of curves to faces or bodies.

50.2.10 Splitting output curves

Projected curves are split at G1 discontinuities.You can control how they are further split at clashes and self-intersections with the split_clash option. This option takes the following values:

 

Value

Description

PK_proj_split_clash_no_c

Do not split the projected curves at clashes or self-intersections.

PK_proj_split_clash_self_c

Only split individual projected curves at self-intersections.

PK_proj_split_clash_all_c

Split projection curves if they are individually self-intersecting or if multiple projected curves intersect. This is the default.

Figure 50-7 shows a B-curve and a line as the two input curves being projected onto a body. These input curves clash and the resultant projection shows this clash.

 

Figure 50-7 Curve projection using the split_clash option

If no split occurs, a record of type PK_REPORT_record_3_t will be written to a Parasolid Report with the following status:

 

Status

Description

PK_REPORT_3_proj_cu_split_c

The record lists information on clashes of projected curves

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

50.2.11 Projecting curves to points

You can control the projection of lines and linear B-curves to point-like projections using the create_points option. This option takes the following values:

 

Values

Description

PK_proj_to_points_no_c

Do not create point projections, unless it is necessary for the validity of the model. This is the default.

PK_proj_to_points_end_on_c

Create point projections and vertex imprints if the input line is a straight line that lies in the direction of the projection, or if it is necessary for the validity of the model.

PK_proj_to_points_tol_c

Create point projections and vertex imprints in all cases listed for PK_proj_to_points_end_on_c,and additionally for all projected curves that are tolerantly point-like, with respect to operation and local topological tolerances.

PK_proj_to_points_all_c

This value is deprecated and should not be used in new code. Use PK_proj_to_points_end_on_c instead.

Figure 50-8 illustrates a point-like projection from a line that is vertically projected down onto a body. By setting the option to PK_proj_to_points_no_c, no point-like projections are created. By setting PK_proj_to_points_end_on_c, a point-like projection is created where the input line intersects the target face.

 

Figure 50-8 Projecting a vertical line down onto a face to create a point-like projection

Figure 50-9 shows three input lines that are projected down onto an input body. With the option set to PK_proj_to_points_no_c, three edges are projected onto the body, one from each input line. With PK_proj_to_points_tol_c, two edges and a point (tolerant vertex) are projected. This is because the projection of the red line is shorter than two times the tolerance passed into PK_CURVE_project and is therefore projected as a point.

 

Figure 50-9 Creating point and line projections from three lines

50.2.12 Setting precision of imprints

You can control how precision is applied to imprinted edges and vertices using the imprint_precision option. This option takes the following values:

 

Value

Description

PK_imprint_precision_auto_c

Exact projections will result in accurate edges. Exact projections can occur in the following cases:

  • analytic to analytic projections
  • input curves that are coincident with the target
  • B-curves that are projected onto planes

Where a tolerance was used to compute the projected curve (see tolerance option) a precision equal to tolerance is applied to the corresponding edges and vertices resulting from the imprint of that curve. (Default)

PK_imprint_precision_accurate_c

All new imprinted edges are accurate. Imprinted vertices may be tolerant if this is necessary to ensure chaining of successive imprinted edges.

 

Note: This option controls the precision of imprinted topology only. It does not affect the accuracy of projected geometry.

50.2.13 Attaching nominal geometry

You can choose whether to attach the projected curves as nominal geometry using the nominal option. This option takes the following values:

 

Value

Description

PK_proj_nominal_yes_c

Attached projected curves to the tolerant imprinted edges as nominal geometry. If this value is set and nominal geometry is disabled for a body, an error will occur.

PK_proj_nominal_no_c

Do not attach the projected curves as nominal geometry. (Default)

50.2.14 Completing imprints

You can choose whether to complete an imprint such that the end vertices of the imprint lie on an edge of the body or face using the complete option. This option takes the following values:

 

Value

Description

PK_proj_complete_no_c

Do not complete the imprint. This is the default value.

PK_proj_complete_edge_c

Complete the imprint and stop at the first edge encountered.

PK_proj_complete_faceset_c

Complete the imprint and stop at the first laminar or boundary edge.

Figure 50-10 shows the effect of using the complete option for PK_CURVE_project. For PK_proj_complete_edge_c, the edge is extended to the first edge encountered in each direction; for PK_proj_complete_faceset_c, the edge is extended to the first laminar or boundary edge in each direction.

 

Figure 50-10 Effect of the complete option for PK_CURVE_project

See Section 50.2.15, “Limiting the distance of imprint completion” for information on how to limit the distance of the imprint completion.

50.2.15 Limiting the distance of imprint completion

As described in Section 50.2.14, “Completing imprints”, you can use the complete option to control whether imprint completion can be extended up to an edge, or to the boundary of a supplied faceset. You can also optionally choose to limit the distance of an imprint completion using the complete_bound and complete_bound_distance options. With these options, an imprint will not be extended if the completion distance is greater than the supplied bound distance.

The complete_bound option takes the following values:

 

Value

Description

PK_complete_bound_none_c

No bound is applied to the imprint completion. Default.

PK_complete_bound_if_within_c

The imprint will be extended only if the completion edge lies within the supplied complete_bound_distance of the vertex

The complete_bound_distance option is the distance used to bound the imprint completion. If complete_bound is set to a non-default value, complete_bound_distance must be greater than tolerance .

 

Note: The complete_bound option can only be set to a non-default value if the complete option is also set to a non-default value.

Figure 50-11 illustrates the result of using these options when complete is set to PK_proj_complete_edge_c. In (a) the completion edge is not within the bound limits and therefore the imprint will not be extended. In (b) the completion edge is within the bound limit set by complete_bound_distance and therefore the imprint will be extended.

 

Figure 50-11 Limiting the extension of the imprint using complete_bound and complete_bound_distance options

50.2.16 Tracking information

You can track edges produced by imprint completion from projected curves using the tracking option. This option takes the following values:

 

Value

Description

PK_proj_tracking_basic_c

Returns a track record with basic tracking information about entities arising from imprint completion. These entities have a zero tag as their originator curve to identify their origin (Default).

PK_proj_tracking_completion_c

Returns a track record that relates the imprinted edge to its original input curve. Edges arising from imprint completion will have at least three originators;

  • the tag of the originating curve
  • the tag of the face which the originating curve is imprinted into
  • a zero tag, to identify it as an imprint completion

 

Note: Only those edges that are imprinted as a result of the operation are returned by the tracking option. Existing edges or faces that are split as a result of the operation, are not returned.

Figure 50-12 illustrates the tracking information that is returned when a curve A is projected onto a face B creating two new edges, C and D. Two track records are returned, one for each edge created by the imprint:

 

Figure 50-12 Tracking information returned when projecting curves

50.2.17 Reporting function results

You can use the results_output option to choose whether to output the results of the operation in the return and tracking arguments of PK_CURVE_project, or in the Parasolid Report. This option has the following values:

 

Value

Description

PK_results_output_return_c

The results of the operation are output in the return and tracking arguments. Default.

PK_results_output_report_c

The results are output in the Parasolid Report via a record of type PK_REPORT_record_type_3_t with status PK_REPORT_3_proj_cu_map_c that contains all the projection results for each projection.

Note: If you choose to return information via the Parasolid Report, the tracking and return arguments will be empty.

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

If you choose to output the results to the Parasolid Report, you can optionally choose to return the originating intervals for each projection in the report using the want_orig_intervals option. When set to PK_LOGICAL_true, the parameter intervals on the input curves that produced the projection or imprint are returned. This is illustrated in Figure 50-13.

 

Note: Intervals will only be defined for direct imprints and they can only be returned when results_output is set to PK_results_output_report_c.

 

Figure 50-13 Returning the originating parameter interval of the input curve

[back to top]


50.3 Direct imprinting

Parasolid also provides imprinting functionality in the form of direct imprinting. Unlike the more general imprinting functionality provided by PK_CURVE_project (see Section 50.2), direct imprinting requires that the set of curves to be imprinted are coincident with the surface of the face onto which they are imprinted. Direct imprinting is a convenient way, for example, to create a set of profiles by imprinting sets of planar curves on planar sheets.

 

Figure 50-14 Creating profiles on a face using direct imprinting

You can perform direct imprinting using PK_FACE_imprint_curves_2. This function receives a face and a set of curves and intervals, and creates new edges and faces.

[back to top]


50.4 Boolean imprinting

Parasolid provides several imprinting tools that you can use for your own purposes. These tools can be used to implement your own manual boolean functionality, should you want to include unique features in your application that could not be done conveniently using the standard Parasolid boolean functionality. For example, using these tools you could add features such as a higher degree of user interaction, or some kind of preview functionality.

Two boolean tools are provided:

To implement your own manual boolean functionality, you could imprint edges on a target and tool, identify the distinct face sets on the target and tool, and then use PK_FACE_delete_2 to remove the ones you don’t want. Finally, you could use PK_BODY_apply_knit_pattern to fuse the remaining face sets into a single body.

Boolean tools could also be used for a range of other operations. For example, you could use them in conjunction with other Parasolid tools to remove unwanted areas of overlapping sheet bodies before sewing them.

 

Note: This functionality offers partial support for facet geometry.

50.4.1 Imprinting

The initial stage of a boolean operation is to intersect the target and tool entities and imprint edges and vertices on them where they intersect. These imprinted edges and vertices form the boundaries of intersection between target and tool entities.

You can create sets of imprinted edges and vertices on a target and tool entity using PK_BODY_imprint_body, PK_BODY_imprint_faces_2, and PK_FACE_imprint_faces_2. These functions create imprinted edges and vertices on the supplied entities and return these edges and vertices as paired sets.

 

Figure 50-15 Imprinting a cylindrical tool on a target cube resulting in four pairs of imprinted edges

These functions receive option structures to control the imprinting process. These contain the following options:

 

Option

Description

imprint_tool

Whether to imprint edges and vertices on the tool as well as the target. Default: PK_LOGICAL_true.

imprint_overlapping

For sheet bodies, whether to imprint the boundaries of overlapping areas of faces that share the same surface. See Section 51.4.7, “Imprinting the boundaries of overlapping areas”, for more information. Default: PK_LOGICAL_false.

extend_face_list

Whether to add neighboring faces from either the target or the tool to the list of imprint faces, in order to prevent open loops of edges. See Section 50.4.1.2, “Adding extra faces to face-imprints”, for more information.

Default: PK_imprint_face_list_no_c.

matched_region

Structure that supplies the function with matched topology, using the same format as the boolean option structure. See Section 51.4.5, “Matched topology in local and global boolean operations”.

imprint_complete_targ
imprint_complete_tool

Controls whether to complete the imprint such that end vertices of an imprinted edge may be extended until they meet an edge of the body or face. See Section 50.4.1.1, “Completing imprints” for more information.

Default: PK_imprint_complete_no_c.

imprint_extend_targ
imprint_extend_tool

The orientation in which to complete the imprint on the target or tool, respectively. See Section 50.4.1.1, “Completing imprints” for more information.

Default: PK_imprint_extend_tangent_c

update

This option lets you maintain consistency when rebuilding models built in older versions of Parasolid. See Section 52.4, “Specialised boolean operations” for more information.

Note: For the imprinting functions PK_BODY_imprint_body, PK_BODY_imprint_faces_2 and PK_FACE_imprint_faces_2, the update values PK_boolean_update_5_c and older give the same behaviour.

have_tolerance
tolerance

If have_tolerance is PK_LOGICAL_true, tolerance specifies a value to which the imprint operation can assume that entities are coincident.

The have_tolerance option (Default: PK_LOGICAL_false) should be used whenever you supply a tolerance (Default: 0.0).

In addition, PK_BODY_imprint_faces_2 and PK_FACE_imprint_faces_2 contain the following option:

Option

Description

imprint_dir

Whether imprinted edges should have consistent direction. See Section 50.4.1.3, “Ensuring imprinted edges have consistent direction”, for more information.

50.4.1.1 Completing imprints

You can complete an imprint on the target or tool - that is, extend the imprinted edge to another nearby edge on the body so as to create a closed loop of edges - from any vertex of an imprinted edge that has been created by an intersection with a laminar edge on the other body. Four options in PK_BODY_imprint_o_t, PK_BODY_imprint_faces_o_t, and PK_FACE_imprint_faces_o_t are used to control how this behaviour can be used.

 

To ...

Use ...

switch on imprint completion

the imprint_complete options, as follows:

  • Use imprint_complete_targ to complete imprinted edges on the target
  • Use imprint_complete_tool to complete imprinted edges on the tool (if imprint_tool is PK_LOGICAL_true).

Both these options can be set to any of the following:

Specified tools must come from sheet bodies. Specified targets can come from sheet or solid bodies, unless imprint_complete_targ is PK_imprint_complete_laminar_c.

control the direction in which imprinted edges are completed

the imprint_extend options, as follows:

  • Use imprint_extend_targ to control the direction of completions on the target.
  • Use imprint_extend_tool to control the direction of completions on the tool.

You can choose to extend along a plane that either lies tangential to or orthogonal to the imprinted edge.

The effect of these options is illustrated in Figure 50-16.

 

Figure 50-16 Completing imprinted edges on target bodies

The corresponding imprinted (or original) edges and vertices are returned in matching arrays contained within the results structure. In the case of PK_FACE_imprint_faces_2, where an entity has been created because of imprint completion, the matched element in the other list will be PK_ENTITY_null.

50.4.1.2 Adding extra faces to face-imprints

When using PK_FACE_imprint_faces_2, PK_BODY_imprint_faces_2, PK_FACE_boolean_2, or PK_FACE_instance_tools, you may also be able to prevent open loops of edges by adding neighboring faces from either the target or tool (or both) into the imprint. This is done using the following option:

 

Field

Description

extend_face_list

If the imprint operation results in incomplete loops of edges, include any neighboring faces and imprint them accordingly. Continue adding neighboring faces until either the loops are closed, or there are no more faces in the body to include.

You can choose between the following:

The default behaviour is not to add neighboring faces (PK_imprint_face_list_no_c).

Careful use of this option allows an effect similar to blend propagation. For example, you can pass a single tool face, and request that the tool faces are extended, and Parasolid creates a complete closed imprint on the target automatically.

The behaviour of extend_face_list is explained in Figure 50-17, which shows how an imprint on a target and tool may be extended. All four values for extend_face_list are illustrated.

 

Figure 50-17 Extending the list of faces in a face imprint on the target and the tool

The extend_face_list options take effect before any imprint_complete options (see Section 50.5.6, “Imprint completion”) that have been specified.

If, when using extend_face_list , you want to ensure that the results of imprint completion during a local boolean operation are limited to the target or tool faces specified in the function call, you should set imprint_complete_targ or imprint_complete_tool (as appropriate) to PK_imprint_complete_faceset_c. If you do not do this, extend_face_list adds neighboring faces up to the laminar edges of the body, as shown in Figure 50-18.

 

Figure 50-18 Combining imprint_complete_targ and extend_face_list options

 

Note: Parasolid also provides imprinting functionality for:

50.4.1.3 Ensuring imprinted edges have consistent direction

You can use the imprint_dir option in PK_BODY_imprint_faces_o_t and PK_FACE_imprint_faces_o_t to control whether the directions of any imprinted edges are consistent with the original topology that created them. This option takes the following values:

 

Value

Description

PK_imprint_dir_no_check_c

Do not perform any checks on imprinted edge direction. This is the default.

PK_imprint_dir_consistent_c

Inspect imprinted edges and, where necessary, reverse the direction of any edges whose direction is inconsistent. Report any imprinted edges for which a direction cannot be determined using a report status of PK_REPORT_1_imp_dir_undef_c. See Chapter 11, “Using Reports”, for information on using the Parasolid report mechanism.

When identifying whether the edge direction is consistent, it is compared to various test directions derived from the edge's originating topology:

A consistent direction for an imprinted edge is produced by applying the following tests:

 

Figure 50-19 Imprinted edges arising from original edges

 

Figure 50-20 Imprinted edges due to touching cylinders

50.4.2 Identifying face sets

Once edges and vertices has been imprinted on a target and tool body, you need to identify which face sets (on both the target and tool) would survive a boolean operation.

PK_BODY_identify_facesets receives loops of coincident edges, points of contact and a boolean operation (unite, subtract and intersect) and then calculates which face sets would survive the operation and which face sets would be deleted. The loops of coincident edges and points of contact would typically be obtained via calls to the imprinting functions described in Section 50.4.1: PK_BODY_imprint_body and PK_FACE_imprint_faces_2.

 

Figure 50-21 Simulating a subtract operation based on imprinted edges from Figure 46-11.

[back to top]


50.5 Legacy curve imprinting

You can use Parasolid’s imprinting functionality to imprint curves, faces, or planes onto a sheet body.

In each of the methods described, edges created by the imprint operation are returned, including those existing edges along which the intersection occurred.

To solve any precision problems, a tolerance is supplied; this value may also be used in the creation of SP-curves on the imprinted edges.

 

Note: The behaviour of the imprint operations as described here applies specifically to their use with sheet bodies. In general, these imprinting functions can also be used with other body types.

 

Method

Description

Imprinting with finite curves

You can imprint curves on to a body using two different methods, by projecting them as follows:

Edges and vertices are added to the body which are the image of the curves under either projection method.

Imprinting with a set of faces

You can imprint a face on to a body using PK_BODY_imprint_faces_2. This adds edges and vertices to the body where the faces intersect with the body (except where they already exist). See Section 50.4.1, “Imprinting”, for more information.

Imprinting with a plane

You can imprint a plane on to a body using PK_BODY_imprint_plane_2. This adds edges and vertices to the body where the plane intersects with the body (except where they already exist). You can also demand that the imprinted edges have consistent direction. See Section 50.4.1, “Imprinting”, for more information.

 

Note: These functions are used to maintain old behaviour for the purpose of version updates. However, you are encouraged to use PK_CURVE_project in any new code.

50.5.1 Connecting disjoint components of an imprint

PK_BODY_imprint_cus_vec and PK_FACE_imprint_cus_vec support a connect option that you can use to connect together disjoint components that are created during a single call to those functions. This option lets you control the extent to which imprinted curves are connected together, giving you control over the creation of imprints on both side faces and back-facing faces. It takes the following values, which are illustrated in Figure 50-22:

 

Value

Description

PK_imprint_connect_none_c

Do not attempt to connect disjoint imprint components. This is the default.

PK_imprint_connect_side_c

If possible, connect disjoint imprint components by imprinting additional components that are side-on (i.e. parallel to the imprint direction) when viewed from the imprint direction. This will only imprint side-on components if they connect disjoint components.

PK_imprint_connect_side_all_c

Imprint all components that are side-on when viewed from the imprint direction, whether they connect disjoint components of the imprint or not.

PK_imprint_connect_all_c

If possible, connect disjoint imprint components by imprinting components that are side-on, or separated by back-facing faces, when viewed from the imprint direction.

PK_imprint_connect_hidden_all_c

Connect all disjoint imprint components by imprinting components that are side-on, or separated by back-facing faces, when viewed from the imprint direction. This option also imprints any back-facing components that cannot be connected to other components, such as those on a sheet boundary.

 

Figure 50-22 Connecting disjoint components of an imprint

 

Note: This behaviour applies when imprinting curves on to either solid or sheet bodies.

50.5.2 Imprinting in both directions at once

When creating vector imprints, you often want to imprint in both directions along the specified vector. Using the default options, you can only do this with two function calls, which as well as being a performance overhead may also introduce unwanted vertices into the imprint that you then have to remove.

PK_BODY_imprint_cus_vec and PK_FACE_imprint_cus_vec support a bidirectional option that let you imprint in both directions using a single function call. This improves performance, and also automatically removes any mergeable vertices that are created as a result of the imprint.

Figure 50-23 shows a simple example in which a curve is imprinted onto a sheet. Because the curve intersects the sheet, imprints in both directions need to be created in order to imprint the entire extent of the curve onto the sheet. Figure 50-23 shows the difference in the results obtained by making two function calls compared to using the bidirectional option.

 

Figure 50-23 Imprinting in both directions at once

50.5.3 Dealing with faces that obscure the imprint

When imprinting curves on faces using the local function PK_FACE_imprint_cus_vec, Parasolid provides additional control over the imprint operation with the hidden option. This option lets you control the effect of other faces that obscure the faces being imprinted. The hidden option can take any of the following values:

 

Value

Description

PK_FACE_imprint_hidden_no_c

Imprint curves on the faces supplied to PK_FACE_imprint_cus_vec regardless of any other faces that may obscure the imprint.

PK_FACE_imprint_hidden_body_c

Imprint curves on the faces supplied, taking into account any other faces from the parent body of the supplied faces that obscure the imprint. This value produces a result similar to PK_BODY_imprint_cus_vec, but restricted to only the supplied faces. It is the default.

PK_FACE_imprint_hidden_array_c

Imprint curves on the faces supplied, taking into account any faces supplied to the parent function, but no others.

The effect of these values is shown in Figure 50-24, which shows the effect, in cross-section, of imprinting a subset of the faces of a body.

 

Figure 50-24 Allowing for faces that obscure the imprint

 

Note: If the bidirectional option is used as well as hidden , then the effect of the value for hidden is treated independently for each imprint direction: some faces may obscure the imprint in one direction but not the other. See Section 50.5.2, “Imprinting in both directions at once”, for more details about bidirectional .

50.5.4 Dealing with curves that intersect within the view direction

Sometimes, when projecting curves onto a face along a vector using PK_FACE_imprint_cus_vec or PK_BODY_imprint_cus_vec, one or more curves will appear to intersect when viewed along the projection vector. This can be problematic: to produce a valid body, additional vertices need to be imprinted at the points where the intersections occur. If you do not wish these vertices to be imprinted, there is no way for the imprint operation to complete successfully. Parasolid lets you control the behaviour in such circumstances using the process_intersections option, which can take the following values:

 

Value

Description

PK_imprint_intersect_fix_c

If the supplied curves appear to intersect when viewed along the projection vector, the curves at the points of intersection are broken up, and additional vertices imprinted so as to produce a valid body.

PK_imprint_intersect_fail_c

If the supplied curves appears to intersect when viewed along the projection vector, the function call fails with PK_ERROR_cant_do_imprint.

PK_imprint_intersect_update_c

This value is reserved for updating models built using Parasolid V22.1 or earlier (PK_FACE_imprint_cus_vec) or Parasolid V24.1 and earlier (PK_BODY_imprint_cus_vec), and preserves old behaviour. When working with models created in newer versions of Parasolid, you should not use this value. This is the default.

Figure 50-25 shows a simple example in which a single helical curve is imprinted onto a face. Because the helical curve appears to intersect itself when viewed in the direction of the project vector, a successful imprint is only possible if process_intersections is set to PK_imprint_intersect_fix_c.

 

Figure 50-25 Imprinting a helical curve onto a face

Figure 50-26 shows an example in which two curves that only appear to intersect when viewed along the projection vector can be successfully imprinted onto a body by setting process_intersections to PK_imprint_intersect_fix_c.

 

Figure 50-26 Imprinting several curves that only intersect along the projection vector

50.5.5 Restricting imprints to nearby faces

You can control which faces in a body receive imprints when imprinting down the face normal of the body using either PK_BODY_imprint_cus_normal or PK_FACE_imprint_cus_normal.

One way to do this is simply to pass in a specific subset of faces in a body to PK_FACE_imprint_cus_normal. However, in some circumstances this might not be possible or desirable. In such cases, you can restrict imprinting so that only faces that are within a specified distance of the imprinting curves receive imprints, using the following options:

 

Option

Description

use_max_projection_dist

Whether to restrict imprints to faces that are within a specified distance of the curves. This can take the following values:

max_projection_dist

A projection distance for the imprint operation. If use_max_projection_dist is PK_imprint_proj_dist_whole_c, then a face is only imprinted if the portion of the curve that imprints on the face is within this distance from the face.

Figure 50-27 illustrates a simple case where a curve is imprinted onto a block. By default, edges are imprinted on both the front and back faces of the block (A). By specifying a max_projection_dist , you can restrict the imprint so that only the nearest face is imprinted (B).

However, for an edge to be imprinted, max_projection_dist must be large enough such that the part of the curve that is imprinted is close enough to the nearest face:

 

Figure 50-27 Restricting imprints to nearby faces

50.5.6 Imprint completion

The functions PK_BODY_imprint_cus_normal, PK_FACE_imprint_cus_normal, PK_BODY_imprint_cus_vec and PK_FACE_imprint_cus_vec allow you to specify whether an edge imprinted on a body should be extended to meet an existing edge. This is done with the imprint_complete option, which takes the following values:

 

Value

Description

PK_imprint_complete_no_c

Do not extend the edge once it has been imprinted. This is the default.

PK_imprint_complete_edge_c

Extend the imprinted edge to the nearest existing edge.

PK_imprint_complete_laminar_c

Extend the imprinted edge to the nearest existing laminar edge.

Figure 50-28 and Figure 50-29 show the effect of the imprint_complete option for PK_BODY_imprint_cus_vec and PK_FACE_imprint_cus_vec, respectively. For PK_imprint_complete_edge_c, the edge is extended to the nearest existing edge in each direction; for PK_imprint_complete_laminar_c, the edge is extended to the nearest laminar edge in each direction. In all cases, the extension is tangential to the imprinted edge (i.e. in the direction of the imprinted edge). The difference in the two functions is only evident for PK_imprint_complete_laminar_c, where those edges that are considered laminar edges by PK_FACE_imprint_cus_vec are not laminar edges for PK_BODY_imprint_cus_vec.

 

Figure 50-28 Effect of the imprint_complete option for PK_BODY_imprint_cus_vec and PK_BODY_imprint_cus_normal

 

Figure 50-29 Effect of the imprint_complete option for PK_FACE_imprint_cus_vec and PK_FACE_imprint_cus_normal

 

Note: The value PK_imprint_complete_faceset_c should only be used when completing imprints created by local booleans, as described in Section 51.4.13, “Imprint completion”. If you use this value with one of the local imprinting functions described here, it has the same effect as PK_imprint_complete_laminar_c.

50.5.7 Controlling how curves are imprinted along a vector

By default, the positions on a body of edges and vertices that are imprinted from curves along a vector are calculated by projecting the curves along that vector.

Sometimes, for example if curves are close to or coincident with the model, this can introduce unnecessary tolerance information into the model. To avoid this, you can use the following options to ensure that the edges and vertices imprinted on a model are exact.

These options are available to both PK_FACE_imprint_cus_vec and PK_BODY_imprint_cus_vec:

 

Option

Description

imprint_coi_exactly

A switch that controls whether curves that are coincident with the body are imprinted using an exact method:

  • If PK_LOGICAL_false (Default), all imprinted edges and vertices for coincident curves are calculated by projecting the supplied curves onto the body.
  • If PK_LOGICAL_true, then any curves that are coincident with the surface geometry of the body are imprinted onto the body exactly, rather than by projection. Curves that are not coincident are imprinted by projection in the normal manner.

Imprinting exactly is usually faster than imprinting by projection.

imprint_exactly

A switch that controls whether the imprinted edges and vertices are exact (regardless of whether the imprinting curves are coincident with the body):

  • If PK_LOGICAL_false (the default), edges and vertices imprinted onto the body may not be exact.
  • If PK_LOGICAL_true, edges and vertices imprinted on the body are exact, irrespective of the setting of imprint_coi_exactly .

 

Note: The imprint_coi_exactly option is also available in PK_BODY_imprint_cus_normal and PK_FACE_imprint_cus_normal. You should ensure that the curves to be imprinted are close to the body when using the option from these functions. The imprint_exactly option is not available in either PK_BODY_imprint_cus_normal or PK_FACE_imprint_cus_normal.

50.5.8 Controlling continuity when imprinting along face normals

You can specify the continuity of projection curves that are imprinted using either of the normal imprinting functions PK_BODY_imprint_cus_normal and PK_FACE_imprint_cus_normal. You do this using the preferred_continuity option, which can take the following values:

 

Value

Description

PK_continuity_g1_c

Any projected curves are G1 continuous, unless they have been imprinted exactly. This is the default.

PK_continuity_c2_c

Any projected curves are C2 continuous, unless they have been imprinted exactly (in which case they have the continuity of the original curve). You should also set tracking_type to PK_imprint_tracking_curves_c when using this value; see Section 50.5.9, “Tracking information for imprint functions”, for more details.

 

Note: The preferred_continuity option takes a value of type PK_continuity_t. This datatype contains a number of additional values that are not listed here, and should not be used in the context of this option.

50.5.9 Tracking information for imprint functions

All four of the curve imprinting functions - PK_BODY_imprint_cus_normal, PK_FACE_imprint_cus_normal, PK_BODY_imprint_cus_vec, and PK_FACE_imprint_cus_vec - can return detailed tracking information that relates the curves used for the imprinting function to both the edges imprinted and the topology on which those edges were imprinted.

Figure 50-30 shows the tracking information returned in the track_records sub-structure when imprinting two curves onto the sheet body shown. One curve creates an imprinted edge on a face in the body, and the other curve creates an imprinted edge on an existing edge. Two track records are returned, as follows:

 

Figure 50-30 Tracking the results of imprint operations

If you use the imprint_complete option (as described in Section 50.5.6, “Imprint completion”), then any edges that are created as a result of the completion are also returned in product_topols . The corresponding original_topols contains the topology on which the completion has been imprinted, but it does not contain a corresponding originating curve, since no such curve exists. Figure 50-31 illustrates the tracking information that is returned when a curve A is imprinted onto a face B and imprint completion is turned on, creating two new edges, C and D. Two track records are returned, one for each edge created by the imprint:

 

Figure 50-31 Tracking information returned when using imprint completion

This tracking information is available by default in PK_BODY_imprint_cus_vec and PK_FACE_imprint_cus_vec. In PK_BODY_imprint_cus_normal and PK_FACE_imprint_cus_normal, it needs to be enabled using the following option:

 

Option

Description

tracking_type

Choose the amount of tracking information returned by the imprint operation. This can take the following values:

  • PK_imprint_tracking_basic_c: Return a single track record that contains only basic tracking information about the edges created by the imprint operation. Using this value does not return tracking information that relates the imprinted edges to the original entities. This is the default setting.
  • PK_imprint_tracking_curves_c: Return multiple track records that contain full tracking information for the imprint operation.

50.5.10 Imprinting vertices

PK_EDGE_imprint_point adds a vertex to an edge at specified coordinates, providing that a vertex does not already exist at that position. The added vertex splits all edges, except for a ring edge, into two.

PK_FACE_imprint_point adds a vertex to a face on a sheet, solid or general body. The new vertex is an isolated vertex, and a new loop is created to contain it.

PK_REGION_imprint_point adds a vertex to a region of a general body. The new vertex is an acorn vertex in the region, and a corresponding acorn shell is created to contain it.

 

[back to top]

<<< Introduction To Imprinting and Booleans Chapters Introduction to Booleans >>>