*change_distance_between_faces

Offsets surfaces to meet a specified distance between two selected vertices.

Syntax

*change_distance_between_faces point_id1 point_id2 surf_mark_id line_mark_id distance area_selection_ratio max_pick_angle max_expand_angle min_slide_angle mode lock_turnover reserved

Type

HyperMesh Tcl Modify

Description

This command offsets surfaces to meet a specified distance between two selected vertices.

The offset occurs on selected surfaces and those adjacent to them to preserve continuity of the model. The adjacent surfaces that are offset to provide continuity will be referred to as “involved” surfaces. The selected surfaces are offset normally. The involved surfaces are offset using one of several available interpolation algorithms.

The selection of the surfaces to offset occurs either automatically from the selection of the points point_id1 and point_id2, or manually as specified by you.

When the surfaces are selected automatically, the surfaces adjacent to point_id1 and point_id2 are selected first, if they satisfy constraints defined by the area_selection_ratio and max_pick_angle parameters. Then planar surfaces adjacent to those surfaces are selected, if they satisfy the constraint defined by max_expand_angle. If the max_pick_angle constraint allows selection of the surfaces both near point_id1 and point_id2, the selection still can be overwritten by the lock_turnover parameter.

When the surfaces are manually selected by you, they are specified using surf_mark_id. However, only those selected surfaces that are linked to point_id1 and point_id2 by a chain of selected surfaces will be actually offset.

In general, this command utilizes the same functionality as *offset_surfaces_and_modify, with additional interpolation and slide-angle options, and an algorithm to calculate the surface offset values from the specified distance between point_id1 and point_id2. You can also chose whether to remove surfaces that will degenerate during the offset. Note that this is not the same as a surface penetration check, which is not performed. When the surfaces are selected manually, you can also specify the separator lines and, optionally, whether to complete or not complete the separators automatically.

Inputs

point_id1
The ID of the first vertex point.
point_id2
The ID of the second vertex point.
surf_mark_id
The ID of the mark containing the user selected surfaces, when mode Bit0 is set to 1. Valid values are 1 and 2.
If mode Bit1 is 0, this should be set to 0.
line_mark_id
The ID of the mark containing the separator lines, when mode Bit0 is set to 1. Valid values are 1 and 2.
If mode Bit0 is 0, this should be set to 0.
distance
The target distance between point_id1 and point_id2 after the offset.
area_selection_ratio
When mode Bit0 is set to 0 and surfaces at both point_id1 and point_id2 meet the max_pick_angle constraint, then if the area of the surfaces on one side is smaller than area_selection_ratio times the area of the surfaces on the other side, then only the smaller side will be selected to offset. This can be overwritten by the lock_turnover parameter.
max_pick_angle
When mode Bit0 is set to 0, the surface adjacent to point_id1 or point_id2 will be selected only when the angle between the [point_id1, point_id2] line and the normal to the surface (at the points point_id1 or point_id2 accordingly) is less than max_pick_angle.
max_expand_angle
When mode Bit0 is set to 0, after the initial surfaces adjacent to point_id1 and point_id2 are selected according to max_pick_angle, the selection will be expanded to the adjacent surfaces, as long as the adjacent surfaces are planar and the angle between the adjacent surfaces along the “adjacent over” edge is less than max_expand_angle.
min_slide_angle
The angle that specifies if the involved surface will be “dragged behind” the adjacent selected surface, or if the involved surface will be used as a “slider” along which the selected surface will move.
mode
Advanced mode options. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4 + 32*Bit5).
Bit0
0 – Surfaces to offset are selected manually using surf_mark_id.
1 – Surfaces to offset are selected automatically.
Bit1
0 – Do not remove collapsed/degenerated surfaces.
1 – Remove collapsed/degenerated surfaces.
Bit2
0 – Do not auto complete separator lines. Only used if Bit0 is 0.
1 – Auto complete separator lines. Only used if Bit0 is 0.
Bit3
0 – Not specified.
1 – Interpolate involved surfaces in global coordinate system.
Bit4
0 – Not specified.
1 – Interpolate involved surfaces in local coordinate system.
Bit5
0 – Not specified.
1 – Auto select the interpolation coordinate system individually for each involved surface.
lock_turnover
Specifies the end point lock controls which determine which manipulator side surfaces are selected automatically and what end(s) are movable. This is ignored when manual surface selection is used.
The value specified overwrites the area_selection_ratio constraint but cannot overwrite the max_pick_angle constraint. If the latter constraint does not allow the sides (point_id1 and point_id2) to move, or allows only one side to move, only the allowed side will move, regardless of this parameter.
Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2).
Bit0
0 – The point with the smaller ID cannot move during offset. Only valid when Bit2 is set to 1.
1 – The point with the smaller ID can move during offset. Only valid when Bit2 is set to 1.
Bit1
0 – The point with the larger ID cannot move during offset. Only valid when Bit2 is set to 1.
1 – The point with the larger ID can move during offset. Only valid when Bit2 is set to 1.
Bit2
0 – Do not edit the lock controls and ignore Bit0 and Bit1.
1 – Edit the lock controls based on Bit0 and Bit1 values.
reserved
Reserved for future use. Must be set to 0.

Examples

To change the distance between vertices 1379 and 1381 to 8.0, automatically select surfaces to move (37 and 1) and using auto selection of the interpolation coordinate system (mode =37 and 100000), and specifying that only the point with the smaller ID is allowed to move (lock_turnover =0):
*change_distance_between_faces 1379 1391 0 0 8.0 1.5 2.0 0.5 60.0 37 0 0

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

11.0