*linecreateoffsetalongcurvature

Creates a line by offsetting the input lines along their curvature direction.

Syntax

*linecreateoffsetalongcurvature line_list start_offset end_offset link_type flags

Type

HyperMesh Tcl Modify

Description

This command creates a line by offsetting the input lines in line_list along their curvature direction. The input lines must form a connected line; otherwise an error is given. The first line in the line_list determines the direction of the combined line, hence the start point, from which the offsetting starts. If the opposite direction for the combined line is desired, the corresponding value of the flags must be set.

If the offset value is negative, the direction opposite to curvature direction is used for offset.

In the case where there is a discontinuity in the curvature direction at some point between the input lines, a link is inserted if link_type is chosen to be 2. However, if the change in the curvature direction is 180 degrees, then no link is inserted and the offset continues without any jump. In this case, after the discontinuity point, the offset follows the opposite direction of the curvature direction.

Inputs

line_list
The list ID of lines to be offset. Input lines must form a connected line when combined.
start_offset
The offset distance at the start of the combined line.
end_offset
The offset distance at the end of the combined line.
link_type
The type of link that is inserted between offset lines in the case where there is a discontinuity (other that 180 degrees) in the direction of the curvature:
  • 0 – The offset direction is interpolated on both sides of the discontinuity to allow a smooth transition. In this case, along the interpolation region, the offset direction is going to be different than the curvature direction. Amplified fluctuations, which would occur in the offset because of little ripples in the input curve, are smoothed out with this option.
  • 1 – A straight line segment is inserted as a link between offset of input lines, if there is a jump in offset direction at points where input lines meet.
  • 2 – No link is inserted, if there is a jump in offset direction at points where input lines meet. In this case, the offset lines might become disconnected.
flags
Flags that indicate different modes for the offset. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2).
Bit0
0 – Keep original lines after drag.
1 – Delete original lines after drag. Applies only to free lines (not surface edges).
Bit1
0 – The direction of the combined line is the same as the direction of the first line in the line_list.
1 – The direction of the combined line is opposite to the direction of the first line in the line_list.
Bit2
Specifies how entities are organized into components. Valid values are:
  • 0 – Line is created in the current component, which is the default value.
  • 1 – Line is created in the most common input lines component.

Example

To create an offset line by dragging lines 4 and 5 by an amount of 3.2 units at start and 5.0 at end.

*createlist lines 1 4 5
*linecreateoffsetalongcurvature  1 3.2 5.0 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

10.0