GiD - The personal pre and post processor

union

objarray union ?-sorted? <obj1> <obj2>

Return a new objarray with the items without repetition that are at least in some of both objects (boolean or)

<obj1> and <obj2> are the objarrays to get its union.

if -sorted is set obj1 and obj2 are expected to be in ascending order (to avoid an extra effort to sort them)

The result is also an ordered array.

e.g

set obj1 [objarray new_from_to intarray 2 5] -> 2 3 4 5 set obj2 [objarray new_from_to intarray 3 8] -> 3 4 5 6 7 8 set obj3 [objarray union -sorted $obj1 $obj2] -> 2 3 4 5 6 7 8

COPYRIGHT © 2022 · GID · CIMNE