How to hollow out structural areas?

I am using OpenFOAM and Calculix for coupling. Typically, I need to extract the structural region in OpenFOAM. Now my structure is an irregular geometry. How should I extract the corresponding region?