Hello everyone! I’m trying to find out how to do collision of faces of domain box cubes, when I use the collision tool it only gives me the info for colliding edges of the cubes. I have managed to find the separate faces of each cube resulted, but I am not sure how the collision tool should get info for the faces not the edges.
I want to get info of how many cubes are intersecting with 3 faces for example, how many with 5 etc…
I will really appreciate some help!
If you want someone to actually help you, please post a file with the relevant geometry internalized.
1 Like
Please find the files bellow!
Grashopper definition cubes model…gh (47.9 KB)
data is internalized in the file 
A good way to find the top / bottom / east / … faces is by calculating the dot product of the face normal and your X / Y / Z vectors. The dot product of two parallel vectors is one.
Grasshopper definition cubes model.gh (68.8 KB)
1 Like
Now once again which collisions do you want to find?
You want to know how many boxes are around each box?
Hello Martin, thank you for helping me out!!
I want to find the collisions between faces from the main volumes → than with mass addition get the list of each cube and the number of faces that it collides with
I want to get the same results as I got for the edge collision but for the faces

One thing after another: The 8 items that collide with the first item in the list are 7 boxes around it and the box itself.
Is this the result you are expecting or which of the 7 or 8 boxes would be of interest for you?
Grasshopper definition cubes model.gh (70.2 KB)
Thank you! From this example we get that the box collide with 7 other boxes as you said, but the faces of the box that touch other faces are only 4. My goal is to get information about the faces.

Actually only 3 my mistake
So the desired result in your sketch would be 1, 2 and 4, right?
There are a few ways to do this. First solution to find the boxes that touch a box would be with point groups and by simply looking at the box centroids. We know the box size so it’s easy to filter the points. Without culling duplicates, the result shows the three boxes around a box and the box itself.
Thank you ! I have a work zoom now, so I will come back to it a bit later !!
Hello! Sorry I don’t seem to understand this, why are only three boxes appearing in the list and what the numbers next to the box number mean ? I very much appreciate the help!!
Just saw your new comment! I will have a look now!! THANK YOU SO MUCH!
The numbers 1, 2 and 10 are indices of the boxes that touch the first box with index 0.
Actually I think it’s better to look at the tree structure instead of a flat list…
0;0;0 has three neighbors:
0;0;1
0;1;0
1;0;0
The faces that touch box 0;0;0 are:
0;0;1;4
0;1;0;0
1;0;0;3
The latest definition works for one box at a time. It needs to be restructured a bit if you want to have the sorting done for all boxes and pick afterwards…
Hello Martin, thank you so much for that!! I wouldn’t have been able to do it myself! Sorry it’s probably a really obvious one, but how can I see these values on the model?
Again thank you so much! Didn’t expect such help!

Do you have Elefront installed?