*geomvectorcreate

From input nodes and geometries, create vectors tangent to lines or normal to surfaces.

Syntax

*geomvectorcreate geom_type geom_mark_id node_mark_id node_tol magnitude parlen reverse

Type

HyperMesh Tcl Modify

Description

This command creates vectors on input set of nodes in such a way that vector direction coincides with line tangent or surface normal at closest to the node point on geometry.

Inputs

geom_type
The input geometry type. Valid values are:
  • lines - If specified, then tangent at selected line is used for created vector direction.
  • surfs - If specified, then normal at selected surface is used for created vector direction.
geom_mark_id
The mark of input lines or surfaces.
node_mark_id
The mark of input nodes. The nodes are used as a base for created vector and to find closest point on geometry to calculate vector direction.
node_tol
If positive, then use as proximity tolerance for geometry points. This means that vector is not created unless closest point of selected geometry is found within the distance specified by node_tol.
If the value of node_tol is negative, then allowed distance to closest point is not limited.
magnitude
Parameter that specifies the length of resulted vector (except for the case when parameter parlen is not zero).
parlen
Parameter that specifies the method to calculate resulted vector length. Valid values are:
  • 0 – The value specified by magnitude parameter is used.
  • 1 – Parametric value is used. For curve tangent this is the value of parametric curve derivative. For surface normal the value is defined by the length of cross product of surface parametric derivatives. Parameterization of curves and surfaces is normalized from 0 to 1.
reverse
Parameter that specifies direction of resulted vector. Valid values are:
  • 0 – Direction coincides with parametric direction of curve or surface normal.
  • 1 – Direction is opposite to parametric direction of curve of surface normal.

Example

To create a unit vector having node with ID 1 as its base and tangent to curve with ID 4 at point closest to specified node:
*createmark nodes 1 1
*createmark lines 1 4
*geomvectorcreate lines 1 1 -1.0 1.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