*solidcreatedragsurfalongline
Create one or more solids by dragging one or more surfaces along a line.
Syntax
*solidcreatedragsurfalongline surfs_mark_id lines_list method options comp_mode ?node_id? ?ref_plane?
Type
HyperMesh Tcl Modify Command
Description
This command creates one or more solids by dragging one ore more surfaces 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 input surface vertices.
node_id and refplane arguments are optional and determines how the input lines and surfaces 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, input surfaces are translated by the direction vector PB. If Bit4 of the options is not set, then, the surfaces 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 these surfaces by line L. So, if P is selected on an input surface, the new location of P is going to be at B. Moreover, if P is one of the vertex points of the input surfaces, 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.
Inputs
- surfs_mark_id
- The mark ID containing the surfaces that you wish to drag.
- lines_list
- The list ID containing the lines that will be used to from the drag line.
- 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 + 16*Bit4).
- Bit0
- 0 - Only free edges of surfaces are offset.
- Bit1
- 0 - Create solid entities.
- Bit2
- 0 - Drag along the direction of the drag line.
- Bit3
- 0 - Use the ref_plane. input
- Bit4
- 0 - Use the whole ref_plane for transformation if it is given.
- comp_mode
- Parameter specifying how entities are organized into components:
- 0 - Solids are created in the current component and boundary surfaces are moved to the same component.
- 1 - Solids are created in the current component, but surfaces remain in their original component.
- 2 - Solids are created in the same component as the selected surfaces. The result is not predictable, if the surfaces are originally in different components.
- ?node_id? (optional)
- The ID of the node, which is used as a reference point while determining the way 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-surfaces with ids 39 401 and 388, along the line that is formed by combining lines with IDs 37 and 25 using fixed frame method. Assume that you want to drag along the direction opposite to the direction of line 37, and want to drag both free and internal edges. Moreover, you want the results solids to be in the component of the surfaces. Then, options = 1+4 = 5, and comp_mode = 2. If you do not want to use any reference plane, use the following commands to create dragged solids. As a result one side of the solids will be the input section surfaces, while the opposite side will be an exact translated copy of that section surface, and vertices of the section surface will trace an exact translated copy of the drag-lines broken at possible vertex points.
*createmark lines 1 39 401 388
*createlist lines 1 37 25
*solidcreatedragsurfalongline 1 1 0 5 2
In addition if you now want to use a reference node with ID 12, which happen to lie on one of the section surfaces, and a reference plane, then 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 5 2 12 1
The solid 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
Invalid or inconsistent input parameters in *solidcreatedragsurfalongline result in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {*solidcreatedragsurfalongline 1 1 0 0 0} ] } {
# Handle error
}
Version History
10.0