I am trying to use Blender as a CAD tool for electromagnetic simulations. I have modeled the geometry, but now would like to export it to a format that I can read for the simulation (external Python program). To do this, I compiled bpy as a python module, and am creating and loading .blend files from Python directly. The constructed objects/files are viewable when loaded in Blender.
My goal is to be able to query the space (any x,y,z point) and return which material the point belongs to. This sort of information would be used in a 3D FDTD simulation. Is there an easy way to do this? -- I could not find any, so I decided the next best thing would be to grid/mesh my simulation domain into voxels.
Looking around, the closest thing I could find is the Add-Cells plugin, but it is written for Blender 2.48, and I don't think it works with the current version 2.74. (http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Add/Cells_v1.2)
I was hoping to voxelize all the objects in the scene, and then export to a 3D NumPy matrix. I imagine this will consume a lot of memory, but I am happy as long as it works. (Ideal case would be to just query points in space and have it return the material).
Thanks in advance!