GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

translate: 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)

objarray translate <obj> <dx dy dz>

Warning: the values of <obj> itself are modified, without creating another copy of the object

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.

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
  • No labels