Unite all of the single solids into one

hi guys,
i am wondering is there a way to make all of this different boxes to define as a one single solid.
thanks in advance.
union.3dm (1.0 MB)

Hi @denzkntr
In theory, yes - using BooleanUnion. In this particular file, though, there are a bunch of duplicates (can be found with SelDup) and some “almost duplicates”, that you will have to find manually. A good tip is to go through the cubes in smaller batches (maybe 10-15 cubes at a time) - it makes it easier to find the culprit when something’s not working. That way you can systematically identify where the boolean operation goes wrong. Remember to use MergeAllCoplanarFaces after each succesful BooleanUnion to keep the surfaces as simple as possible.
HTH, Jakob