GiD - The personal pre and post processor
intersection
objarray intersection ?-sorted? <obj1> <obj2>
Return a new objarray with the items of both objects (boolean and)
<obj1> and <obj2> are the objarrays to get its intersection.
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 intersection -sorted $obj1 $obj2]
-> 3 4 5
COPYRIGHT © 2022 · GID · CIMNE