In our Forge app we need to select all elements that are adjacent to a given element. Example: User selects a floor element and this causes adjacent foundations, walls etc. to be selected. When I say adjacent I mean intersecting elements and elements where the surfaces touch each other.
We tried to achieve this by comparing the bounding box of all elements with each other, but it only works for simple geometries (cubes) where the size of the bounding box is almost identical to the size of the element itself, and where the element edges are oriented along (x,y,z). (Not rotated). The attached image illustrates how the bounding box (in red) of a complex floor works poorly, because it will cause selection of foundations and columns (in green) that are clearly separate from the floor.
So what I am asking is either:
- Is there a built-in function for getting adjacent elements? If not;
- How do I get the points that define the outline of an element? I am not interested in the rendered WebGL triangles, just the original points (E.g. 8 points for a cube).
Regards, Torjus