Subdiv2D subtract holes (black pixels) from mesh

different approach: stay with raster graphics. stack the layers. you get a 3D voxel grid. apply marching cubes. there you have your mesh.