*geomvectorupdate

Updates vector entities using input geometries to set vector directions tangent to lines or normal to surfaces.

Syntax

*geomvectorupdate vector_mark_id geom_type geom_mark_id node_tol magnitude parlen reverse update_geom update_mag update_reverse

Type

HyperMesh Tcl Modify

Description

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

Inputs

vector_mark_id
The mark of input vectors to update.
geom_type
The input geometry type. Valid values are:
  • lines - If specified, then tangent at selected line is used for updated vector direction.
  • surfs - If specified, then normal at selected surface is used for updated vector direction.
geom_mark_id
The mark of input lines or surfaces used to set vectors direction.
node_tol
If positive, then used as proximity tolerance for geometry points. This means that vector is not updated unless closest point of selected geometry is found within the distance specified by node_tol.
If node_tol value is negative, then allowed distance to closest point is not limited.
magnitude
Parameter that specifies the length of updated 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 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.
update_geom
A flag (0 or 1) to update vectors direction. If set to 1, then input geometry is used to update vectors direction.
update_mag
A flag (0 or 1) to update vectors magnitude. If set to 1, then vectors magnitude is updated.
The flag is ignored, if update_geom flag is set.
update_reverse
A flag (0 or 1) to update vectors magnitude. If set to 1, then vectors magnitude is updated.
The flag is ignored, if update_geom flag is set.

Example

To update vector 10 to have direction tangent to curve with ID 4 at point closest to vector base node:
*createmark lines 1 4
*createmark vectors 1 10
*geomvectorupdate 1 lines 1 -1.0 1.0 0 0 1 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
}