Mesh from bitmap/numpy array point cloud

Hello together,
i am new to fenics and want to calculate the heat spread of electronics modules. The circuit board data are available as gerber data, a stack of bitmaps or a 3d numpy array (stacked gerber data). Is 3d array defines the voxels of the stack by 1 an 0, where inside the circuit board the copper and where epoxy substrate is. So the array can be seen as a point cloud, which describes the material domains.
What is currently the most robust/best way/tool to create a mesh for fenics from these data.

I also thought of Freecad or gmsh or meshio as a workaround. But I did not find an example yet to mesh such complicated geometries also with thin layers.

Thank you very much in advance.