*mechapplybodytotargetpoints
Moves source points on the bodies of a mechanism to target points.
Syntax
*mechapplybodytotargetpoints bodies_array number_of_bodies point_pairs_array number_of_point_pairs number_of_point_pair_coordinates
Type
HyperMesh Tcl Modify Command
Description
Moves source points on the bodies of a mechanism to target points.
The mechanism must have the enabled flag set to true for this to be possible.
Inputs
- bodies_array
- The ID of the string array that contains the names of the bodies to update. The array is created using the *createstringarray command. This should always be set to 1.
- number_of_bodies
- Integer indicating the size (number of bodies) in the array created using *createstringarray. This must be half the number_of_point_pairs.
- point_pairs_array
- The ID of the double 2D array that contains the source and target point pairs. The array is created using the *createdoublearray2d command. This should always be set to 1.
- number_of_point_pairs
- Integer indicating the rows (number of point pairs) in the array created using *createdoublearray2d.
- number_of_point_pair_coordinates
- Integer indicating the columns (number of coordinates per pair) in the array created using *createdoublearray2d. This must be set to 3.
Example
To move bodies "LEFT LOWER LEG" and "RIGHT LOWER LEG", with source-target point pairs as:
LEFT LOWER LEG: (-156.84033, 47.889306, 31.0028062) to (-148.916035, 72.1107681, -10.4045246)
RIGHT LOWER LEG: (-148.979951, -66.8473281, -34.494296) to (-141.051409, -42.6880283, -75.937107)
*createstringarray 2 "LEFT LOWER LEG" "RIGHT LOWER LEG"
*createdoublearray2d 4 3 \
-156.84033 47.889306 31.0028062 \
-148.979951 -66.8473281 -34.494296 \
-148.916035 72.1107681 -10.4045246 \
-141.051409 -42.6880283 -75.937107
*mechapplybodytotargetpoints 1 2 1 4 3
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
14.0.120