Extending Sheets And Surfaces   

<<< Mid-Surface Generation Chapters Introduction To Imprinting and Booleans >>>

Contents

[back to top]


48.1 Extending sheets

48.1.1 Introduction

You can use PK_BODY_extend to extend across a set of laminar edges on a body. The body may contain non-manifold components, so long as the supplied laminar edges are locally manifold.

 

Note: This functionality offers partial support for facet geometry.

PK_BODY_extend receives the following arguments:

 

Received

Description

body

A body, which may contain non-manifold components.

n_boundary_edges

The number of edges to extend across.

boundary_edges

An array of laminar edges belonging to the body: the body is extended across these edges. The edges do not need to form a single chain.

The function has the following options:

 

Field

Description

modify

Whether or not to modify the original faces of the body when extending. The default is to create new faces for the extension. See Section 48.1.6, “Changes to topology”, for more information.

extension_type

Whether to extend across the specified laminar edges of the body by a specified distance, or by extending across those edges until they meet a specified target body. See Section 48.1.2, “Different extension methods”, for more information.

extension_shape

The shape that the extension should have. You can choose between linear, soft and reflective extension. See Section 48.1.4, “Specifying the shape of the extension”, for more information.

extension_distance

The distance by which the body should be extended across the boundary edges, relative to the underlying surfaces of the body, when extending by a specified distance. See Section 48.1.2, “Different extension methods”, for more information.

target

A target body that intersects the extended body and is used to define the new boundary for the body. See Section 48.1.2, “Different extension methods”, for more information.

target_limit

Controls that let you specify where an extension to a target should stop. See Section 48.1.3, “Controlling extension to a target”, for more information.

preserve_internal_smoothness

Whether to preserve the smoothness across internal edges of the body after extension. See Section 48.1.5, “Preserving smoothness of extended edges”, for more information.

track_laminar

Provides control over the tracking information for new split laminar edges. See Section 48.1.9, “Tracking new edges”, for more information.

track_internal

Whether to track non-laminar side edges in the same way as laminar side edges. See Section 48.1.9, “Tracking new edges”, for more information.

extend_create

Whether to create new topology, or extend by splitting existing topology. See Section 48.1.6, “Changes to topology”.

extension_boundary

Whether or not to create precise extension boundaries. See Section 48.1.7, “Creating precise boundaries”.

extend_side
extend_side_data

Whether extensions should follow adjacent edges and/or their extension on the body, or whether they should be created orthogonally to the base edge being extended. See Section 48.1.8, “Controlling the shape of sheet extensions”.

update

Update switch to maintain consistency when rebuilding models built in older versions of Parasolid. See Section 62.5.2, “Update control”, for information.

Default: PK_local_ops_update_default_c.

results_output

Whether the local status and associated entities are returned as a return argument or in a Parasolid Report. See Section 48.1.10, “Return information”, for more information.

Default: PK_results_output_return_c

 

Related Topics:

48.1.2 Different extension methods

PK_BODY_extend provides the following methods for extending a body:

You control which extension method is used with the extension_type option in PK_BODY_extend_o_t.

 

Method

Description

Distance

This is the default extension method for PK_BODY_extend. The body is extended across each of the boundary_edges received by PK_BODY_extend by a distance specified in the extension_distance option. When using this method, make sure that a non-zero distance is supplied in extension_distance .

Extend to target

The body is extended across each of the boundary_edges received by PK_BODY_extend until it intersects a target body specified in the target option. When using this method, make sure that a suitable surface, sheet, solid or general body is supplied in target . The target itself remains unmodified.

Note: You can extend a body to a general target body so long as the extension does not intersect non-manifold topology.

 

Figure 48-1 Extending a body across locally manifold edges

Figure 48-2 shows a simple example in which a body is extended across two boundary edges of a sheet by a specific distance. New faces are created for the extension, although this behaviour can be controlled (see Section 48.1.6, “Changes to topology” for details).

 

Figure 48-2 Extending sheets by a specified distance

Figure 48-3 shows several cases where a sheet is extended to a specified target. In the first example, a sheet is extended until it intersects the swept surface of a nearby sheet target. In the other examples, a sheet is extended until it intersects a solid target that wholly encloses the sheet.

 

Figure 48-3 Extending sheets to a target body

48.1.3 Controlling extension to a target

If you extend a sheet body to a target, the sheet may often be able to intersect the target several times, for example if the target is a solid body. This can lead to different possible results for the extension operation. You can use the target_limit option to control which of those results is used.

The target_limit option can control the extension shape as follows:

 

Value

Description

PK_extension_limit_minimal_c

Extend the sheet by the minimum distance required for each boundary edge to intersect the target. This is the default, and in many cases produces the same result as one of the other values.

PK_extension_limit_inside_c

Extend the sheet across each boundary edge until it reaches the inside of the target.

PK_extension_limit_outside_c

Extend the sheet across each boundary edge until it reaches the outside of the target.

Figure 48-4 shows a simple example in which the side faces from an open sheet cube are extended until they intersect a solid target body. Two results are possible:

In this example, the default extension to the target would produce the same result as PK_extension_limit_inside_c.

 

Figure 48-4 Extending a sheet until it reaches the inside or outside of a target body

In some cases, for example if you are extending to a hollow body target that intersects the sheet body, the default extension may produce the same result as PK_extension_limit_outside_c. For example, consider the sheet body shown in Figure 48-5. Here, a U-shaped sheet is extended to a hollow target that the sheet already intersects. As well as being hollow, the target body contains a through hole that effects the shape of the resulting extended sheet.

 

Figure 48-5 Extending a sheet to a hollow target body

 

Note: The result bodies for both the PK_extension_limit_outside_c case and default case in Figure 48-5 contain a notch. This is because the through hole in the target body causes no extension to be created in the sheet across the extent of the hole: the body is already outside the target in this area, and so does not need to be extended. The result body for PK_extension_limit_inside_c, however, does not contain this notch, because in this case the sheet needs to be extended until it reaches the inside of the target body.

48.1.4 Specifying the shape of the extension

When extending faces in a sheet, PK_BODY_extend follows the shape of any underlying surface as far as possible. In particular, analytic surfaces are preserved. For example, Figure 48-6 shows the effect of extending a sheet body whose underlying surface is a sphere.

 

Figure 48-6 Using the underlying surface to extend a sheet

When the requested extension lies beyond the scope of the underlying surface, Parasolid has to create its own surface. You can use the extension_shape field to determine the shape that PK_BODY_extend follows when this is the case. This field takes the following values:

 

Value

Description

PK_extension_shape_linear_c

Parasolid extends the sheet in a linear direction. This is the default.

PK_extension_shape_soft_c

Parasolid extends the sheet using a “softer” algorithm that ensures the extension is C2-continuous at the boundary of the underlying surface, and tends toward linear after a small change of direction.

PK_extension_shape_reflective_c

Parasolid extends the sheet using an algorithm that ensures the extension is C2-continuous at the boundary of the underlying surface, and which also mirrors the existing geometry of the sheet.

 

Note: The values PK_extension_shape_arc_c and PK_extension_shape_natural_c, as used in PK_BCURVE_extend and PK_SURF_extend, are not valid for use with PK_BODY_extend.

Figure 48-7 illustrates the difference between these types of extension shape. In this figure, the underlying surface of the sheet body is a B-surface that resembles an incomplete sphere. Beyond the B-surface, the sheet has been extended linearly in the first example, softly in the second and reflectively in the third.

 

Figure 48-7 The difference between various shapes of extension

For the sake of clarity, the soft extension diagram in Figure 48-7 is exaggerated. In practice, the angular deviation between a linearly extended surface and a softly extended surface is about 3°. Figure 48-8 illustrates the effect of linear extension and soft extension on a constant parameter that is extended.

 

Note: When extending linearly, a G2 discontinuity may be created at the boundary of the underlying surface.

 

Figure 48-8 The difference between linear and soft extension for curves

 

Note: In general, the shape of the underlying surface outside the range of an unextended face can have a noticeable effect on the shape of the extended face. In particular, if two faces that appear to be identical have different underlying surfaces (for example, an analytic and a b-surface), performing the same extension on each face can lead to very different results.

The geometry immediately surrounding the edge to extend across can also have an effect on the shape of the final extended body.

48.1.5 Preserving smoothness of extended edges

By default, if you extend an edge that is smooth (that is, the faces on either side of the edge are tangent to each other at the point where the edge intersects the edge to extend across), that smoothness is not preserved in the extended body. You can set the preserve_internal_smoothness field to PK_extension_smoothness_g1_c in order to preserve G1 smoothness whenever possible, as shown in Figure 48-9.

 

Figure 48-9 Preserving the smoothness of extended internal edges

48.1.6 Changes to topology

Parasolid can modify the topology of the resulting sheet, depending on the setting of the modify field, which takes the following values:

 

Value

Description

PK_LOGICAL_false

Where possible, no faces in the original sheet body are modified. Instead, the edges to extend across are preserved and new faces are created for the extension. This is the default

PK_LOGICAL_true

Where possible the edges to extend across are removed and the original faces modified.

 

Note: When modify is PK_LOGICAL_true, the configuration of boundary edges and vertices depends on the geometry of the body to be extended. Where possible, boundary edges are merged in the extended body, but if B-curves or SP-curves need to be constructed in order to extend the body, there will generally be vertices present in the resulting edges.

In addition, you can use the extend_create option to control how topology is created with respect to the way attributes attached to the topology are processed. This takes the following values:

 

Value

Description

PK_extend_create_new_c

Topology is newly created for the extension, without any attributes from the original topology. This is the default.

PK_extend_create_split_c

New topology is split from the original topology. Any attributes attached to the original topology are processed according to the attributes’ rules for split events: they will either be deleted from both entities or propagated to both entities. See Section 95.4.4, “Split”, for information about split events.

In both cases if the new topology is subsequently merged with original topology during the extend, then any attributes are processed according to their rules for merge events.

The modify and extend_create options combine to create different effects. These are shown in Figure 48-10, which shows how a single face with an attached colour attribute (blue) can be extended using all possible combinations of modify and extend_create . The resulting faces are either shown in blue, to indicate the propagation of the colour attribute, or yellow, to indicate that no attribute is attached to that face. The settings for each resulting body are described in the following table:

 

Body

Option values

Behaviour

A

modify : PK_LOGICAL_true
extend_create : PK_extend_create_split_c

A new face is split from the original and then merged back in. Attributes are processed for split and merge events.

B

modify : PK_LOGICAL_false
extend_create : PK_extend_create_split_c

A new face is split from the original. Attributes are processed for split events.

C

modify : PK_LOGICAL_true
extend_create : PK_extend_create_new_c

A new face is created from the original and then merged back in. Attributes are processed for merge events.

D

modify : PK_LOGICAL_false
extend_create : PK_extend_create_new_c

A new face is created from the original. Attributes are not processed. This is the default behaviour.

 

Figure 48-10 The effect of the modify and extend_create options when extending sheets

 

Note: In the example shown in Figure 48-10, processed attributes are shown as being copied onto new faces. For attributes of type 1, 4, 6, or 7, (e.g., colour, density), this is the expected behaviour. However, for attributes of type 2, 3, or 5, (e.g. incremental faceting) whose behaviour is that they are deleted when a split event occurs, then the results will be different to those shown.

48.1.7 Creating precise boundaries

Sometimes when you are extending sheets by distance, the exact shape of the boundary of the extended sheet may be irrelevant for your needs. This is particularly true if you intend to trim away some of the extension using subsequent modelling operations. In these circumstances, you only need to ensure that you create an extension that is large enough for your requirements, and creating a precise extension can be costly in terms of performance.

PK_BODY_extend provides the extension_boundary option for use in this type of case. The behaviour of this option is shown in Figure 48-11.

 

Figure 48-11 Creating precise and loose boundaries when extending sheets

48.1.8 Controlling the shape of sheet extensions

You can use the extend_side and extend_side_data options to control the shape of the extension when extending sheets across laminar edges. These options let you choose how to construct the side edges required, so that extensions either follow adjacent edges and/or their extension in the body, or are orthogonal to the base edge being extended.

Two options are provided so that you can control the extension shape in two ways, as follows:

 

Option

Description

extend_side

Controls the shape of extensions across laminar edges for the whole body by constructing side edges in different ways. This can take any of the following values:

  • PK_extend_side_follow_adj_c: construct side edges so that they always follow adjacent edges and/or their extension in the body.
  • PK_extend_side_ortho_base_c: construct side edges so that they are always orthogonal to the base edge being extended.
  • PK_extend_side_default_c: let Parasolid decide whether to extend side edges along the line of adjacent edges or orthogonally to the base edge. This is the default.
extend_side_data

This structure allows you to specify different extension shapes at selected terminal vertices of edge chains in the body. It allows you to override the behaviour specified by extend_side at those vertices. The structure contains the following fields:

  • n_vertices , vertices : an array of vertices representing the terminal vertices of edge chains whose behaviour you want to specify. Defaults: 0, NULL.
  • extend_sides : an array of tokens of type PK_extend_side_t specifying how to control the extension shape at each terminal vertex specified in vertices. Each token can be one of the values taken by extend_side . Default: NULL.

Extensions at any terminal vertices of edge chains that are not specified here are controlled according to the value of extend_side .

Figure 48-12 shows the different results that can be achieved by setting extend_side and extend_side_data while extending two laminar edges on a face:

 

Figure 48-12 Controlling the shape of extensions across laminar edges

48.1.9 Tracking new edges

PK_BODY_extend returns tracking information for end edges and side edges that are created during the extend operation, allowing you to associate these new edges with the topology that they originated from.

PK_BODY_extend associates any end edges created by the extend operation with the original edges that they were created from, as shown in Figure 48-13.

 

Figure 48-13 Tracking end edges

By default, PK_BODY_extend associates any laminar side edges created by the extend operation with the vertex that the side edge was created from, together with the unique originating side edge, if there is one. This is illustrated in Figure 48-14.

 

Figure 48-14 Tracking laminar side edges

Sometimes, a laminar side edge cannot be tracked to a single unique edge. In such cases, PK_BODY_extend associates the new side edge with the vertex that it was created from by default. However, you can return additional tracking information using the track_laminar option. PK_BODY_extend_o_t also provides the track_internal option for tracking non-laminar side edges. You use these options as follows:

 

Option

Description

track_laminar

Controls the amount of tracking information returned for new side edges. It takes the following values:

  • PK_extend_track_laminar_basic_c (the default): return only basic tracking information. This associates the new side edge with the originating vertex from which it was created.
  • PK_extend_track_laminar_edges_c: return extended tracking information. This associates the new side edge with both the originating vertex, and the set of edges that were incident to that vertex before the extend operation.

Figure 48-15 illustrates the difference between the two values.

Note: The setting of this option has no effect on the tracking information returned for side edges that are created from a unique edge, such as the example shown in Figure 48-14.

track_internal

Whether or not to return tracking information for non-laminar side edges that are created. This takes the following values:

 

Figure 48-15 Tracking side edges that cannot be associated with a single unique edge

48.1.10 Return information

You can return information using the results_output option. This allows you to choose to either return the local status and associated entities as a return argument or in a Parasolid Report using the following values:

 

Value

Description

PK_results_output_return_c

Return the information as a return argument (Default).

PK_results_output_report_c

Return a complete list of multiple fault entities and fault types in a Parasolid Report.

In addition, when the operation succeeds report records with the following statuses are generated:

These provide information on the edges that were not extended across because those extensions were not needed.

See the PK Interface Programming Reference Manual for PK_BODY_extend for more information on the local statuses returned.

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

[back to top]


48.2 Extending surfaces

48.2.1 Introduction

You can extend surfaces of any class (except foreign geometry surfaces) using PK_SURF_extend. This function take as arguments a surface to modify and an options structure that specifies the type of extension required. It returns a status flag that indicates the outcome of the operation.

 

Note: This functionality offers partial support for facet geometry.

You can extend a surface in any of four ways:

 

Figure 48-16 Extending a surface (a) to a specified point (b) to a specified box

Each type is specified using fields in the options structure, as described in the table below. The default values for these fields are set such that no extension is performed to a surface supplied to PK_SURF_extend.

 

Field

Description

extension_type

The type of extension to perform. This is one of:

  • PK_SURF_extension_none_c: No extension requested (default)
  • PK_SURF_extension_point_c: Extend to a point.
  • PK_SURF_extension_box_c: Extend to a box.
  • PK_SURF_extension_uvbox_c: Extend to a parameter box.
  • PK_SURF_extension_ratio_c: Extend by increasing the individual parameter boundaries.

extension_point

The point to extend to, if extending to a point. Ignored otherwise.

extension_box

The box to extend to, if extending to a box. Ignored otherwise.

extension_uvbox

The parameter box to extend to, if extending to a parameter box. Ignored otherwise.

u_ratio

Ratio of the u parameter range by which to extend the low u boundary, if extending by ratio. Ignored otherwise. Default: 0.0

U_ratio

Ratio of the u parameter range by which to extend the high u boundary, if extending by ratio. Ignored otherwise. Default: 0.0

v_ratio

Ratio of the v parameter range by which to extend the low v boundary, if extending by ratio. Ignored otherwise. Default: 0.0

V_ratio

Ratio of the v parameter range by which to extend the high v boundary, if extending by ratio. Ignored otherwise. Default: 0.0

allow_partial_extension

If the extension requested would result in an invalid surface, then setting this option to PK_LOGICAL_true attempts to extend the surface as far as possible, while keeping the surface valid. If PK_LOGICAL_false, then no extension is performed at all in cases where an invalid surface would result. Default: PK_LOGICAL_false

extension_shape

The shape that the extension should have. The choices available depend on the type of surface, and any attached topology or owning geometry. See Section 48.2.2, “Specifying the shape of the extension”, for more information.

update

Update switch to maintain consistency when rebuilding models built in older versions of Parasolid. See Section 48.2.4, “Update control”, for information.

Default: PK_surf_extend_update_default_c.

For each of the x _ratio options, a ratio of 1.0 extends the relevant boundary by 100%. The effect of extending different boundaries by different amounts is shown in Figure 48-17.

 

Figure 48-17 Extending a surface by ratio

The effect of setting allow_partial_extension is shown in Figure 48-18. In the example shown, extending the specified surface to the point shown would result in a self-intersection, thereby creating an invalid surface.

 

Figure 48-18 Partially extending a surface that would otherwise be invalid

48.2.2 Specifying the shape of the extension

For B-surfaces that are not attached to topology or owned by other geometry, the extension_shape field determines the shape of the surface created by Parasolid. This field takes the following values:

 

Value

Description

PK_extension_shape_linear_c

Parasolid extends the surface in a direction (which is usually linear), which is the default direction for the surface type. See Section 48.1.4, “Specifying the shape of the extension”.

PK_extension_shape_soft_c

Parasolid extends the surface in a direction that tends toward linear after a small change. See Section 48.1.4, “Specifying the shape of the extension”.

PK_extension_shape_reflective_c

Parasolid extends the surface using an algorithm that mirrors the existing geometry of the surface. See Section 48.1.4, “Specifying the shape of the extension”.

PK_extension_shape_arc_c

Parasolid adds a new section that has constant radii of curvature in the direction of the extension, and matches the surface with G2 continuity. A cross-section taken through the new section would be a circular arc.

PK_extension_shape_natural_c

Parasolid extends the surface “naturally”, continuing the shape described by the original surface just before the start of the extension. The new surface is infinitely continuous (C-infinity) at the boundary.

Figure 48-19 illustrates the different shapes available for extending B-surfaces. See also Figure 18-28 of Section 18.5.5, “Extending B-curves”.

 

Note: Rational B-surfaces cannot always be explicitly extended when using the linear extension shape. If this is the case, the rational B-surface will be extended implicitly so that it is handled correctly in downstream operations.

 

Figure 48-19 The difference between various shapes of extension

48.2.3 Returned status

PK_SURF_extend returns a status flag to indicate the result of the operation. This can take the following values:

 

Status

Description

PK_SURF_extend_ok_c

The extension succeeded as requested.

PK_SURF_extend_unextended_c

No extension was necessary. This status is returned, for example, when

  • attempting to extend a plane
  • extending a surface to a point already on the surface

PK_SURF_extend_partial_c

Only part of the extension was performed. This cannot be returned if allow_partial_extension is PK_LOGICAL_false.

PK_SURF_extend_invalid_c

The extension failed, because the resulting surface would have been invalid.

PK_SURF_extend_failure_c

Internal algorithm failure.

48.2.4 Update control

If your application relies on reproducing behaviour when updating models created using earlier versions of Parasolid, you should use the update option to preserve old behaviour and help eliminate differences in rebuild results. This option lets you disable some surface extension enhancements that have been added at different Parasolid versions. Doing this ensures that PK_SURF_extend gives the same results in the latest version of Parasolid as in earlier versions. See PK_surf_extend_update_t in the PK Interface Programming Reference Manual for more information on this update option.

 

Note: The default value is PK_surf_extend_update_default_c which uses all appropriate surface extension enhancements. Setting to a non-default value disables all appropriate surface extension enhancements.

 

[back to top]

<<< Mid-Surface Generation Chapters Introduction To Imprinting and Booleans >>>