<<< Sheet Sewing | Chapters | Enquiry and Output Functions >>> |
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.
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.
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.
The direction of the edges of a wire body can be changed with the following functions:
Function | Description |
---|---|
orientates all the edges of a wire body in the same direction as a given edge |
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.
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 |
---|---|
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. |
|
An array of intervals. Each interval describes the bound for the corresponding curve in |
|
A set of options. See Section 37.7.2. |
|
Returned | Description |
The wire body. This is always returned in the current partition, even if some of the received curves come from a different partition. |
|
An array of the edges in the wire body. Returning this information can be controlled using |
|
An array of length |
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. |
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.
You can set a number of options using the associated PK_CURVE_make_wire_body_o_t options structure, as follows:
Option | Description |
---|---|
The maximum separation allowed between two curves that are to be connected. Default: 1.0e-6. |
|
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. |
|
Whether to check the created body for errors. Default: PK_LOGICAL_true. |
|
Whether to return the edges of the returned body in |
|
Whether to return index information that maps edges in the returned |
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 |
---|---|
An array of edges used to create a wire body. Edges can be passed to PK_EDGE_make_wire_body in any order. |
|
A set of options. See Section 37.8.1. |
|
Returned | Description |
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".
You can set a number of options using the associated PK_EDGE_make_wire_body_o_t options structure, as follows:
Option | Description |
---|---|
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. |
|
Whether to use nominal geometry on any of the original edges.
If this is PK_LOGICAL_true, and |
|
The tolerance to be used when curve approximation is turned on. Default: 1.0e-5. |
<<< Sheet Sewing | Chapters | Enquiry and Output Functions >>> |