GiD - The personal pre and post processor
translate
objarray translate <obj> <dx dy dz>
For arrays with x y z coordinates, sum a displacement dx dy dz to all array items (the object length must be multiple of 3)
<obj> the objarray with coordinates to be translated
<dx dy dz> vector of 3 numbers to define the translation
The array doesn't change its type, e.g. an array of integers increased by a real value will truncate the result again as integer.
Warning: the values of <obj> itself are modified, without creating another copy of the object
Â
e.g.
set obj [objarray new doublearray -values {3.5 2.1 0.3 3.5 2.6 0.3}]
-> 3.5 2.1 0.3 3.5 2.6 0.3
objarray translate $obj {0.5 0.4 0.0}
-> 4.0 2.5 0.3 4.0 3.0 0.3
COPYRIGHT © 2022 · GID · CIMNE