Local Ops: Generic Face Editing
<<< Local Ops: Adding a Vertex to Topology | Chapters | Euler Operations >>> |
You may sometimes need to perform a number of different local operations to different faces in the same body. Some faces might need offsetting, while others require tapering. Blend faces may need to be reconstructed after moving other faces in the body. There are two approaches to this type of problem:
The second approach can have a number of benefits over the first:
Figure 23-1 Moving a blended boss feature using generic face editing
Figure 23-2 Performing operations without yielding invalid bodies
PK_FACE_change takes the following arguments:
Argument | Description |
---|---|
n_faces |
|
faces |
|
mapping |
An array mapping operations onto faces. See Section 23.2, "Specifying operations", for details. |
n_operations |
|
operations |
The operations to perform. This is an array of PK_FACE_change_t types, and can be any combination of the following operations: See Section 23.2, "Specifying operations", for details of how to specify operations. |
tolerance |
|
options |
Options structure specifying options for the call. See Section 23.3, "Specifying options", for details. |
Supplied faces are mapped onto different operations using the
mappings
array. This array should contain the same number of elements as the
faces
array. Each integer in
mapping
indicates the operation to perform on the corresponding face in
faces
. This is illustrated in Figure 23-3.
Figure 23-3 Mapping faces onto operations
An operation in the
operations
array is specified using PK_FACE_change_t. This contains the following fields:
Field | Description |
---|---|
op_type |
The type of operation to perform on a face. This is one of the following: |
op_param |
Parameters for the change operation. This field is a union of the parameters for each individual operation. See Section 23.2.1, "Operation parameters". |
op_opts |
Change-specific options. This field is a union of the options for each individual operation. See Section 23.2.2, "Operation-specific options" |
Data for an operation is specified in the
op_param
field, which itself contains fields for each type of operation supported by PK_FACE_change. The
op_param
field is a union of any data supplied in each of these operation-specific fields.
The fields available, together with the data you can specify, are described below
Operation | Fields | Description |
---|---|---|
offset |
distance |
|
taper |
direction |
|
angle |
||
n_refs |
||
references |
Array of reference entities for the taper. See Section 20.2, "Reference entities", for details. |
|
transform |
transform |
|
replace |
surface |
|
sense |
Orientation of
|
|
blend |
Blends faces are reconstructed automatically by PK_FACE_change. No data for blend operations needs to be supplied. |
The
op_opts
field (PK_FACE_change_opts_t) in PK_FACE_change_t contains options specific to individual operations. It is a union of all data specified in the options structures it contains. There is one options structure for each operation that PK_FACE_change can perform.
Note: Do not confuse these options with those described in Section 23.3, "Specifying options".
|
The following taper-specific options are available in PK_FACE_change_taper_o_t:
Option | Description |
---|---|
tapered_edges |
The edges from which tapered step faces are created. The surfaces on which these edges lie satisfy the taper condition. Edges that appear in this array should
not also appear in the |
normal_edges |
The edges from which normal step faces are created. The surfaces on which these edges lie do not necessarily satisfy the taper condition. Edges that appear in this array should
not also appear in the |
method |
The taper method used. This can be either: The default is PK_method_curve_c. See Section 20.4, "Taper methods" for more detail. |
For more information about creating tapered surfaces, see Chapter 20, "Local Ops: Adding Draft".
The following replace-specific options are available in PK_FACE_change_replace_o_t:
Option | Description |
---|---|
merge |
Control whether Parasolid merges adjacent faces that become mergeable as a result of replacing the surfaces of some faces. See Section 17.2, "Merging adjacent faces", for more information. By default, faces that become mergeable are not merged automatically. |
The following blend-specific options are available in PK_FACE_change_blend_o_t:
You can set a number of options for PK_FACE_change using the PK_FACE_change_o_t option structure. Unlike the options described in Section 23.2.2, "Operation-specific options", the options described in this section apply to all the operations specified in the call to PK_FACE_change. The options available are described below.
Option | Description |
---|---|
merge_face |
If this is PK_LOGICAL_true, then any new faces created by the call are merged with their neighbors, if this is possible. Default: PK_LOGICAL_true |
allow_disjoint |
|
check_fa_fa |
Whether to check for face-face inconsistencies. This can be either: Default: PK_check_fa_fa_yes_c. |
edge_data |
Structure containing the geometry that you want the edge to have after any modeling operations specified in the call. Any edge that is adjacent to a modified face that is not in this array will have its geometry recalculated. See Section 23.3.1, "Specifying edge and vertex geometry". |
vertex_data |
Structure containing the geometry that you want the vertex to have after any modeling operations specified in the call. Any vertex that is adjacent to a modified face that is not in this array will have its geometry recalculated. See Section 23.3.1, "Specifying edge and vertex geometry". |
edge_help |
Structure containing edge geometry that is used in cases where the change operation results in multiple possible solutions. If several outcomes are possible, the one with the closest curve to the supplied geometry is chosen. See Section 23.3.2, "Dealing with multiple solutions". |
vertex_help |
Structure containing vertex geometry that is used in cases where the change operation results in multiple possible solutions. If several outcomes are possible, the one with the closest point to the supplied geometry is chosen. See Section 23.3.2, "Dealing with multiple solutions". |
You can use the
edge_data
and
vertex_data
fields in PK_FACE_change_o_t to specify edge and vertex data that you want to ensure is present in a body after a generic face editing operation. These fields should contain any edge geometry and vertex geometry respectively that must be part of the body after the call to PK_FACE_change has returned.
The
edge_data
field takes the information shown below. The default values for this type are such that no edge data is specified for the body.
The
vertex_data
field takes the information shown below. The default values for this type are such that no vertex data is specified for the body.
Sometimes a series of modeling operations yields a number of possible different solutions. You can force Parasolid to choose a particular solution by specifying help geometry to use with the topological entities that are ambiguous. The solution that is chosen is the one whose topology has attached geometry that is closest to the supplied geometry.
For PK_FACE_change, help geometry is supplied using the
edge_help
and
vertex_help
fields in PK_FACE_change_o_t. Both these fields are of the type PK_replace_help_points_t, and take the information described below:
<<< Local Ops: Adding a Vertex to Topology | Chapters | Euler Operations >>> |