Creation of Extruded Bodies   

<<< Advanced Surfacing Chapters Edge Blending Overview >>>

Contents

[back to top]


28.1 Introduction

Creation of extruded bodies is supported via PK_BODY_extrude. This function creates a body by linear extrusion of a profile body. The profile body may be a minimum body, a wire body or a sheet body. These profiles create extruded wire bodies, sheet bodies or solid bodies respectively. The start and end of the extrusion can be specified in a number of ways; in particular by intersection with other bodies.

The direction of extrusion is defined by a unit vector. The start and end of the extrusion (the bounds) must be ordered along this vector so that the start comes first.

 

Figure 28-1 Extruding a profile to create an extruded body between two bounding faces

There are several ways of defining the start or end of an extrusion:

 

Bound type Description

Distance

The extrusion is bound by a copy of the profile at a given distance from the profile.

Surface

The extrusion is bound where it meets the given surface.

Face

The extrusion is bound where it meets the given face.

Body

The extrusion is bound where it meets the given body.

Sheet

The extrusion is bound where it meets the given sheet body.

For more information on these options, see "Bound types".

PK_BODY_extrude returns tracking information that shows which entities have given rise to entities in the resulting extruded body.

[back to top]


28.2 Supplied arguments

The following arguments are supplied to PK_BODY_extrude:

 

Argument Description

profile

The profile to be extruded. See "Profile types".

path

The unit vector that defines the direction of extrusion.

options

An options structure that specifies the end of the extrusion and, optionally, the start.

[back to top]

28.2.1 Profile types

Several different types of profile body can be passed to PK_BODY_extrude, each of which creates a different type of extruded body.

 

Profile Resulting body

sheet body

solid body

wire body

sheet body

minimum body

wire body

Extruding a sheet profile into a solid extrusion

A sheet profile must be a connected manifold sheet body. It may have multiple laminar boundaries.

Extruding a wire profile into a sheet extrusion

If a wire body is specified as a profile, then the bound type must be PK_bound_distance_c. No other bound types are currently supported.

[back to top]

28.2.2 Specifying the start and end of the extrusion

The start and end of the extrusion are specified in the PK_BODY_extrude_o_t structure. Two bounds can be supplied, and they are both specified in the same way, as described in the table below. An end bound must be supplied. If no start bound is supplied, then a copy of the profile is used: the extrusion starts at the profile, extends in the direction of the path, and ends as defined by the supplied bound.

For each bound (whether start or end) the following information is required:

 

Argument Value

bound

One of: PK_bound_distance_c, PK_bound_surf_c, PK_bound_face_c, PK_bound_body_c, PK_bound_sheet_c. The default is PK_bound_distance_c. See "Bound types".

forward

Specifies which side of the profile the bound lies. Use this to choose whether the profile should be extruded forwards or backwards.

PK_LOGICAL_false The bound lies on the opposite side of the profile to the path (the extrusion is backwards).

PK_LOGICAL_true The bound lies on the same side of the profile as the path (the default).

distance

For use with PK_bound_distance_c only, the (non-negative) distance. For start bounds, the default is 0.0. For end bounds, the default is 1.0.

entity

The bounding entity.

For PK_bound_surf_c, a face or surface

For PK_bound_face_c, a face

For PK_bound_body_c, a sheet body or solid body

For PK_bound_sheet_c, a sheet body

The default is PK_ENTITY_null, which should also be used if bound is PK_bound_distance_c.

nearest

If entity intersects the extrusion several times:

PK_LOGICAL_true: Use the nearest intersection for this bound (the default).

PK_LOGICAL_false: Use the furthest intersection for this bound.

This option has no effect when bound is PK_bound_distance_c. This option is used in conjunction with nth_division .

nth_division

If entity intersects the extrusion several times, this is used to choose which intersection should form the bound, in conjunction with nearest . The default is 1. See "Dealing with multiple intersections of the extruded body".

[back to top]


28.3 Bound types

This section describes the different types of bound that can be defined.

[back to top]

28.3.1 PK_bound_distance_c

The bound is produced by creating a copy of the given profile shifted along the the path vector by the given distance. The distance must be non-negative. To extrude in the opposite direction to the path vector the forward field of the bound is set to PK_LOGICAL_false.

 

Figure 28-2 Extruding a profile a specified distance

[back to top]

28.3.2 PK_bound_surf_c

The bound is produced by trimming the extruded body to a surface. Either a surface or a face can be supplied. If a face is supplied then its surface is used, but divisions are not restricted to the region of the underlying surface that the face occupies. The surface is unaffected by the operation.

 

Figure 28-3 Extruding a profile to a surface

[back to top]

28.3.3 PK_bound_face_c

The bound is produced by trimming the extruded body to a face. If the face does not completely trim the extruded body, then adjacent faces are used to trim the body. The faces are unaffected by the operation.

 

Figure 28-4 Extruding a profile to a face

[back to top]

28.3.4 PK_bound_body_c

The bound is produced by trimming the extruded body to a sheet body or solid body. Parasolid selects suitable faces for bounding the extrusion. The body is unaffected by the operation.

Parasolid finds all collections of faces that may intersect the extrusion.

 

Figure 28-5 Extruding a profile to a bound created by intersection with a body

[back to top]

28.3.5 PK_bound_sheet_c

Like PK_bound_body_c (when given a sheet body), the bound is produced by trimming the extruded body to a sheet body. However, the sheet body itself is destroyed by the operation. All faces of the given sheet body are used in finding the bound.

[back to top]


28.4 Tracking information

PK_BODY_extrude provides tracking information that shows which entities have given rise to entities in the resulting extruded body. For each type of bound, the tracking information returned is shown below:

 

Bound type Tracking information returned

PK_bound_distance_c

For all faces of the extruded body, the corresponding entities in the profile from which each face was created.

PK_bound_surf_c

For all faces of the extruded body except the bounding faces, the corresponding entities in the profile from which each face was created.

For the bounding faces of the extruded body, the surface used to define the bound.

PK_bound_face_c

For all faces of the extruded body except the bounding faces, the corresponding entities in the profile from which each face was created.

For the bounding faces of the extruded body, the faces from the bounding entity that form the division used in the bound.

PK_bound_body_c

For all faces of the extruded body except the bounding faces, the corresponding entities in the profile from which each face was created.

For the bounding faces of the extruded body, the corresponding faces of the bounding entity.

PK_bound_sheet_c

For all faces of the extruded body except the bounding faces, the corresponding entities in the profile from which each face was created.

For the bounding faces of the extruded body, the corresponding faces of the sheet body. If the sheet body is only used in one bound, then the bounding faces of the extruded body retain the tags of the faces from the sheet body. If the same sheet body is used for both bounds then tag persistence only applies to one bound, depending on the value of the forward field, as follows:

  • If forward is PK_LOGICAL_true, then tag persistence applies to the start bound.
  • If forward is PK_LOGICAL_false, then tag persistence applies to the end bound.

Alternatively, the tracking information returned for each type of profile body is shown below:

 

Profile type Tracking information returned

sheet body

The original entity of every face in the resulting extrusion.

wire body

The original entity of every face in the resulting extrusion and for each edge in the bounds.

minimum body

For PK_bound_distance_c, the vertex of the given profile.

For PK_bound_surf_c, the given surface.

For PK_bound_face_c, PK_bound_body_c, or PK_bound_sheet_c, the face that has bound the wire extrusion.

[back to top]


28.5 Dealing with multiple intersections of the extruded body

A given bounding entity (such as a sphere) may intersect the extruded body at several places. When this occurs, use nth_division and nearest to determine which intersection should be used as the bound. The way that intersections in the bounding body are numbered also depends on the value of forward .

When nearest is PK_LOGICAL_true, divisions are numbered from the profile outwards, so that the first intersection is the nearest. The reverse is true if nearest is PK_LOGICAL_false, as shown in Figure 28-6.

 

Figure 28-6 Using nearest to reverse the direction of division numbering

When forward is PK_LOGICAL_false, the extrusion occurs in the opposite direction, and divisions are numbered as shown in Figure 28-7.

 

Figure 28-7 Division numbering when extrusion occurs in the opposite direction

Bounds can only occur at a division that goes right across the extruded profile. Intersections with the extruded profile that do not completely cross the extrusion are ignored.

[back to top]


28.6 Examples of extrusion

In the following examples, only an end bound of type PK_bound_body_c is supplied. The profile and the bounding body are as shown in Figure 28-8. The path is from the profile directly towards the bounding body. Resulting extruded bodies are shaded.

 

Figure 28-8 Profile and bounding body used in subsequent examples

 

Figure 28-9 Extruding to the nearest and furthest bounding faces

 

Figure 28-10 Extruding in to the second nearest and second furthest bounding faces

In the following examples, both a start bound and and end bounds are specified. Both bounds are of type PK_bound_body_c. The same profile and bounding body are used as in earlier examples.

In Figure 28-11, the profile is extruded from the nearest division to the furthest division. Note that the profile is not contained in the resulting extrusion.

 

Figure 28-11 Extruding from the nearest bounding face to the furthest bounding face

You can achieve the same effect by placing the profile between the bounds and extruding as far as possible in each direction

Because the start bound must come before the end bound, if you request start and end bounds at the same division, the end bound that Parasolid chooses is at the first division after the start bound, as shown in Figure 28-12.

 

Figure 28-12 Extruding to identical start and end bounds

Figure 28-13 demonstrates extruding across an intersection that does not go right across the profile. In such cases, the intersection is not considered to be a true division. Note that the cross section of the bounding body in this example is slightly different to earlier examples.

 

Figure 28-13 Extruding aross an incomplete intersection to the nearest bounding face

 

 

[back to top]

<<< Advanced Surfacing Chapters Edge Blending Overview >>>