Remove Faces within a CompSolid

Hi to all,

I hope to get some help with probably an easy question.

In order to get an elongated model I use BRepPrimAPI_MakePrism on the shell. This creates an CompSolid which has faces inside. It seems, that each face of the original shape creates a solid in the resulting CompSolid.

Now I want to "clear" the CompSolid inside, so only the outer shell remains (-> Get a single Solid). ShapeUpgrade_RemoveInternalWires does remove some wires, but not everything. Also with ShapeUpgrade_UnifySameDomain I do not get a better result.

Does someone has a suggestion for me how to solve this issue?

 

Many thanks in advance for anyone who is willing to help me :)