*transformmark
Transforms a selection of entities using a transformation matrix.
Syntax
*transformmark entity_type mark_id r1c1 r1c2 r1c3 r1c4 r2c1 r2c2 r2c3 r2c4 r3c1 r3c2 r3c3 r3c4 r4c1 r4c2 r4c3 r4c4
Type
HyperMesh Tcl Modify Command
Description
This command translates a selection of entities along a vector.
Inputs
- entity_type
- The type of entity to transform.
- mark_id
- The ID of the mark containing the entities. Valid values are 1 and 2.
- r1c1-r4c4
- The 4x4 transformation matrix, in row-column order. This matrix defines the reflection, rotation, scaling and translation applied to the entities.
Example
To rotate all displayed nodes 30 degrees about the x-axis through the point (0,0,0):
1 | 0 | 0 | 0 |
0 | 0.86603 | 0.5 | 0 |
0 | -0.5 | 0.86603 | 0 |
0 | 0 | 0 | 1 |
*createmark nodes 1 displayed
*transformmark nodes 1 1 0 0 0 0 0.86603 0.5 0 0 -0.5 0.86603 0 0 0 0 1
To rotate all elements 30 degrees about the x-axis through the point (5,10,6):
1 | 0 | 0 | 0 |
0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 |
-5 | -10 | 6 | 1 |
x
1 | 0 | 0 | 0 |
0 | 0.86603 | 0.5 | 0 |
0 | -0.5 | 0.86603 | 0 |
0 | 0 | 0 | 1 |
=
1 | 0 | 0 | 0 |
0 | 0.86603 | 0.5 | 0 |
0 | -0.5 | 0.86603 | 0 |
-5 | -5.6603 | -10.1962 | 1 |
x
1 | 0 | 0 | 0 |
0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 |
5 | 10 | 6 | 1 |
=
1 | 0 | 0 | 0 |
0 | 1 | 0 | 0 |
0 | 0 | 1 | 0 |
5 | 10 | 6 | 1 |
*createmark elems 1 all
*transformmark elems 1 1 0 0 0 0 0.86603 0.5 0 0 -0.5 0.86603 0 0 4.3397 -4.1962 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}