Wire Modeling   

<<< Sheet Sewing Chapters Enquiry and Output Functions >>>

Contents

[back to top]


37.1 Introduction

Parasolid provides some specific functionality for modeling operations which can be applied to wire bodies, and for creating wire bodies from other entities:

[back to top]


37.2 Creating faces to fit wire bodies

Given a closed wire body, it is possible to create a face whose boundary contains the edges of the wire body using PK_EDGE_make_faces_from_wire. This is the reverse operation to piercing the face on a single-faced sheet. The new face created does not have a surface attached, but one may be attached using either PK_FACE_attach_surfs or PK_FACE_attach_surf_fitting.

This function allows faces with holes or bodies with separate profiles to be created. Each loop in a new face is created from a closed loop of edges in the wire body and the function allows you to specify how many faces are created and the sense of each loop with respect to the edges.

The wire body becomes a sheet body if there are no wireframe edges remaining, otherwise it becomes a general body.

[back to top]


37.3 Blending vertices on wire bodies

The blending of vertices in a wire body is done by PK_VERTEX_make_blend, and the principles are exactly the same as for blending vertices of sheet bodies.

See the section on "Blending vertices on sheet bodies" in Chapter 35, "Sheet Modeling", for details of this operation.

[back to top]


37.4 Offsetting planar wire bodies

A planar wire body can be offset in the plane by PK_BODY_offset_planar_wire, producing a new wire body. The body can be offset either inwards or outwards.

 

Figure 37-1 Various offsets of a wire body (original is the body with no circular edges)

To create the new body, the edge curves are first offset by the specified distance. Then all the new offset curves are processed as follows:

PK_BODY_offset_planar_wire returns information pairing the edges of the new offset wire body with their originating edges or vertices (in the case of new edge segments), using the standard data structure PK_TOPOL_track_r_t.

The geometry of the new edges are only of the same type as the original edges if they were originally lines or circular edges; otherwise they are generated approximately. A tolerance can be supplied for controlling the approximation. Edges may be split to avoid self-intersecting offset.

In the current implementation of PK_BODY_offset_planar_wire, the number of output wire bodies is always one.

[back to top]


37.5 Edge orientation on wire bodies

The direction of the edges of a wire body can be changed with the following functions:

 

Function Description

PK_EDGE_reverse

reverses an edge and its associated geometry

PK_EDGE_propagate_orientation

orientates all the edges of a wire body in the same direction as a given edge

[back to top]


37.6 Splitting a wire body

PK_VERTEX_remove_edge can be used to split a wire body into two bodies.

The function takes a vertex and an edge to be separated, and adds a new vertex to the end of the edge, introducing a cut into the body. If the body is a wire body, and if it is split into two pieces as a result of being cut at the vertex, a new body is created.

[back to top]


37.7 Creating wire bodies from curves

PK_CURVE_make_wire_body_2 creates a wire body from an array of curves. The wire body that is created can be open or closed, and may be disjoint.

PK_CURVE_make_wire_body_2 receives and returns the following arguments:

 

Received Description

n_curves

The number of curves used to create a wire body.

curves

An array of curves used to make a wire body. If any supplied curves come from a partition other than the current partition, then a copy of that curve is used.

bounds

An array of intervals. Each interval describes the bound for the corresponding curve in curves .

options

A set of options. See Section 37.7.2.

Returned Description

body

The wire body. This is always returned in the current partition, even if some of the received curves come from a different partition.

n_new_edges

The number of edges in the body.

new_edges

An array of the edges in the wire body. Returning this information can be controlled using want_edges . See Section 37.7.2.

edge_index

An array of length n_new_edges that maps edges in new_edges to the curves in curves from which they were created. See Section 37.7.1.

If any of the supplied curves contain discontinuities, a new edge is created for each continuous section of the curve. Curves are never joined together to form a single edge.

 

Note: The order that edges are returned in the new_edges array is undefined.

[back to top]

37.7.1 Mapping edges onto originating curves

The edge_index array returns information about which curves in the received curves array were used to create each edge in the resulting body. This is illustrated in Figure 37-2.

 

Figure 37-2 Mapping supplied curves to returned edges

In Figure 37-2, a wire body containing 4 edges has been created from an array of 2 curves, one of which contains 2 discontinuities. The value of edge_index for this wire body is [0, 1, 1, 1].

Returning this information is controlled using want_index . See Section 37.7.2.

[back to top]

37.7.2 Specifying options

You can set a number of options using the associated PK_CURVE_make_wire_body_o_t options structure, as follows:

 

Option Description

tolerance

The maximum separation allowed between two curves that are to be connected. Default: 1.0e-6.

allow_disjoint

Whether disjoint bodies can be created. If this is PK_LOGICAL_false, then PK_CURVE_make_wire_body_2 fails with error PK_ERROR_not_connected if you pass a set of curves that would result in a disjoint body. Default: PK_LOGICAL_true.

check

Whether to check the created body for errors. Default: PK_LOGICAL_true.

want_edges

Whether to return the edges of the returned body in new_edges . Default: PK_LOGICAL_false.

want_indices

Whether to return index information that maps edges in the returned new_edges array to the curves they correspond to in the received curves array. Default: PK_LOGICAL_false.

[back to top]


37.8 Creating wire bodies from edges

PK_EDGE_make_wire_body creates a wire body from an array of edges. The supplied edges can come from a number of different parts, but they must not intersect or coincide to any degree.

PK_EDGE_make_wire_body receives and returns the following arguments:

 

Received Description

n_edges

The length of the edges array.

edges

An array of edges used to create a wire body. Edges can be passed to PK_EDGE_make_wire_body in any order.

options

A set of options. See Section 37.8.1.

Returned Description

body

The wire body.

tracking

Tracking information.

PK_EDGE_make_wire_body can return a disjoint wire body if required, and can create a non-manifold body if general topology is enabled in Parasolid.

For information on how to enable the creation of general topology, see Section 7.3, "Creating general bodies".

[back to top]

37.8.1 Specifying options

You can set a number of options using the associated PK_EDGE_make_wire_body_o_t options structure, as follows:

 

Option Description

allow_disjoint

Whether disjoint bodies can be created. If this is PK_LOGICAL_false, then PK_EDGE_make_wire_body fails with error PK_ERROR_disjoint if you pass a set of edges that would result in a disjoint body. Default: PK_LOGICAL_false.

copy_dep_geom

Whether to use curve copy when creating a wire body.

  • If PK_LOGICAL_true, then curves that have dependent geometry (e.g. sp-curves, intersections) are copied into the returned body .
  • If PK_LOGICAL_false, then curves with dependent geometry are approximated in the returned body by b-curves to within the specified tolerance.

Default: PK_LOGICAL_true.

use_nmnl_geom

Whether to use nominal geometry on any of the original edges.

  • If PK_LOGICAL_true, then any nominal geometry specified on a received edge is used as the real geometry for that edge in the resulting body.
  • If PK_LOGICAL_false, any nominal geometry specified on a received edge is ignored.

If this is PK_LOGICAL_true, and copy_dep_geom is PK_LOGICAL_false, then nominal geometry is approximated and then used as the real geometry in the returned body .

Default: PK_LOGICAL_false.

tolerance

The tolerance to be used when curve approximation is turned on. Default: 1.0e-5.

 

[back to top]

<<< Sheet Sewing Chapters Enquiry and Output Functions >>>