I have an object containing multiple interior faces defining closed volumes. I'm looking for a way to identify each of those volume and separate them in different objects.
The object is in "one piece" all the faces intersection are edges. This result could be reproduce by taking an object and applying multiples bisects with "fill" option enabled, exept that some faces are missing giving concave geometries.
Here is an example blend file: Example
The green and red parts are two examples of the pieces contained in the main cube (in transparent grey). I want to get all of them, like a puzzle of piece that fit together to form the initial shape.
So obviously the internal faces will be duplicates during the process since each internal face makes the separation between two volumes. I'm trying to figure out how to do that using blender built in functionalities or a python script with a decent complexity.
Here is an 2D view to simplify the undestranding of the problem:
(The red line represent an internal faces that needs to be duplicated)
We can see from that side that 7 shapes are forming the square, and I want an automated way to identify those different shapes. It is easy in 2D but more complex in 3D.
A partial solution would be to use raycasts to find the faces of a box, but it's more difficult when taking the concaves geometries into account.
Any idea would be welcome.