Retrieve Solid Objects form Shell

Hi,
Maybe I'll interest you in my problem to solve?

Here is the file Step -> czesc2.txt - it is called txt because you cannot insert anything else for download.
It is a box, and like every box it has walls, and the walls of objects have their own face and thickness.

It's all saved in one file that contains Shell, so I only have the Face collection.
Faces have their own edges, and after opening the drawing you can immediately see the outline of each face.
It's easy for a human but more difficult for a C++ program.
You need to extract all the solids from this Shell so that they are separate, all the real walls of this box must be independent 3D solids.

Please advise me how to do it, because my idea is to iterate through all Faces and look for common Edges,
However, it is not easy and we do not know where this block ends.
And manually pointing out walls that are supposed to be one solid is troublesome and, in the case of a large object, impossible.
And my friend says that SolidWorks handles it wonderfully and he doesn't understand what our problem is...

Thank you
Piotr

Mikhail Sazonov's picture

Your shape is not a collection of faces. It is actually a one solid object. To get separate solid for each wall you need to define section planes and perform a set of Boolean operations.

Piotr Dusiński's picture

Thank you,
Yes, it is Solid, but there is only one Shape in it, so it is also the Faces collection.
For manual operation, it may be simple, it shows its flat cuts and separates a new object from one large one, but how to make it happen automatically without human intervention? is this feasible? maybe there is a ready solution for this? maybe there is some ready-made function in Open Cascade that I don't know?
Piotr

Mikhail Sazonov's picture

Even for manual operation it is not simple, as after separation of needed faces you need to create a new face to cover the open side.
I don't know such function to do it automatically.
Even if it is possible to do it automatically, it will be a specific function that will have to accept some assumptions regarding the form and structure of the shape.

Piotr Dusiński's picture

Thank you,
How is it possible that SolidWorks, which my friend uses, is able to extract objects from one step file, one solid object? This is an expensive program and it can do a lot... Should we assume that there is a special algorithm to perform such an operation?
You certainly have more experience as a designer, does FreeCad or another one support such a function?
Piotr

Dmitrii Pasukhin's picture

Hello,

What about ShapeUpgrade_UnifySameDomain and boolean fusing? Open CASCADE Technology: Boolean Operations

Best regards, Dmitrii.

Mikhail Sazonov's picture

Dmitrii, Piotr says about fully automatical solution.

Dmitrii Pasukhin's picture

My apologies, i have incorrect interpretation of the quastion.

Decomposition of the single solid is a compicated thing and depends on the input data and needs specific standard (limitations). I agree, that it is complicated. Need a detailed input specification and specific algorithm(not general solution). But I interested in how powerful algorithms in SolidWorks and how it is processed.

Attachments: 
Mikhail Sazonov's picture

I don't know what does your friend. In order to estimate the efforts it is needed to know what are the input data and what is expected to obtain. Knowing of only one input shape and "split its walls onto separate solids" is not sufficient. It is needed to know the approach that is to be uses, laws and conditions that control the algorithm. From our conversation until now the task is very vague so far.