Create cube elemnts to aproximate a geometry

Hello, I would like to use Dynamo to split some walls, created in revit as an add-on - local model - wall into cubes that approximate the geometry.
I will need this cube model to perform a finite element analysis (FEM) of a church.
I thank in advance who will be able to help me