Sort closest curve?

Hi everyone! I am working with the combination of the same cell that is repeated in a certain pattern, and I would like to move in Z all of the cells that are intersecting with other cell. I know how to move them in Z, however, it is the sorting those curves that are intersecting what I do not know how to do…any ideas? They will eventually be turned into volumes, maybe that helps figuring it out? Thank you!

duplicated cruves.gh (17.7 KB)

If you can avoid the contact at the corner of each rectangle, then it would be easy to detect intersected rectangles only.


duplicated cruves_re.gh (14.3 KB)

Awesome, thank you! Does the definition work for volumes such as cubes?

Nothing different except using Scale instead of Offset.

1 Like