*surfacecreatedraglinealongline

Create one or more surfaces by dragging one or more lines along a line.

Syntax

*surfacecreatedraglinealongline lines_mark_id lines_list method options comp_mode ?node_id? ?refplane?

Type

HyperMesh Tcl Modify

Description

This command creates surface(s) by dragging section lines(s) along a drag line. Lines in the line list are combined into a single line L, called the drag line. The direction of the drag line is determined by choosing its start point, S, as the closest end of the line to the section line vertices.

node_id and refplane arguments are optional and determines how the input lines are transformed before drag.

The reconfiguration of the geometries before the drag is done as follows. Let P be the point referred by the node_id, N be the normal and B be the base point of the refplane and T be the tangent vector of drag line at S. First, section lines are translated by the direction vector PB. If Bit3 of the options is not set, then, the section lines are rotated by the rotation from vector N to vector T. Also, the drag line is translated by the direction vector SB. The drag is applied to along this line L. So, if P is selected on a section line, the new location of P is going to be at B. Moreover, if P is one of the vertex points of the section lines, one gets an exact geometric copy of the drag line at B, no matter which drag method is chosen. This is because, prior to drag, P is moved to B and B moves on drag line since it coincides with the start point of the drag line L.

If node_id is not given, it is chosen as the same point as S, the start of the drag line. This means, with the default value of node_id, the drag line is not transformed.

If the reference plane is not given, their default values are B at P and N=T. This means, with the default value of transformation plane, the section lines are not transformed prior to drag.

Note that, the location of P is not important if fixed frame method is chosen with no transformation plane, since each point on the section surface traces an exact geometric copy of the drag line in fixed frame method.

Inputs

lines_mark_id
The mark ID containing the lines that you wish to drag.
lines_list
The list ID containing the lines that will be used to from the drag line.
The first line in this list determines the direction of the drag, which is also shown to the user on the screen. If the drag line has corners, then the new surfaces are split at those locations.
method
Parameter specifying the method of how the drag is performed. Valid options are:
0 – Fixed frame
1 – Follow the drag line only along its tangent direction
2 – Follow the drag line along its Frenet frame
options
Flags that indicate different modes for the drag. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3).
Bit0
0 – Drag along the direction of the drag line.
1 – Drag along the opposite direction of the drag line.
Bit1
0 – Do not merge input lines. A surface is created for each input line.
1 – Merge input lines into smooth lines when possible. A surface is created for each group that forms tangentially continuous lines.
Bit2
0 – Use the ref_plane input.
1 – Do not use the ref_plane input. Instead, use its default values.
Bit3
0 – Use the whole ref_plane for transformation if it is given.
1 – Use the only the base point of the reference plane, set the normal as the tangent of the drag line at drag start point.
comp_mode
Parameter specifying how entities are organized into components:
0 – Surfaces are created in the current component.
1 – Surfaces are created in the same component as the selected lines. The result is not predictable if the lines are originally in different components.
?node_id? (optional)
The ID of the node that is used as a reference point while determining how the surfaces are transformed prior to drag.
?ref_plane? (optional)
When provided, its value must always be 1. It is used to determine the initial reference frame. This plane is created using the *createplane command.

Examples

Assume that you want to drag section-lines with IDs 39, 401 and 388 along the line that is formed by combining lines with IDs 37 and 25, using the fixed frame method. Assume that you want to drag along the direction opposite to the direction of line 37 and want to merge the input section lines into smooth line groups when possible. Moreover, you want the resultant surfaces to be organized in the component of the lines. Then, options = 1+2 = 3, and comp_mode = 1. If you do not want to use any reference plane, use the following commands to create dragged surfaces. As a result one edge of the surfaces will be the input section lines, while the opposite edge will be an exact translated copy of that section line, and the side edged will be an exact translated copy of the drag-lines broken at possible vertex points.

*createmark lines 1 39 401 388 
*createlist lines 1 37 25 
*surfacecreatedraglinealongline 1 1 0 3 1

In addition if you now want to use a reference node with ID 12, which happen to lie on one of the section lines, and a reference plane, use:

*createmark lines 1 39 401 388 
*createlist lines 1 37 25
*createplane 1 1.0000 1.0000 1.0000 2678.0 -737.7 548.1 
*surfacecreatedraglinealongline 1 1 0 3 1 12 1 

The surfaces created will be in such a way that the new location of the point on which node 12 located, will be at the base point (2678.0 -737.7 548.1) of the reference plane.

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