DXF is a messy format and pretty hard to handle. If you design your Graphics e.g. in Blender, then you might end up with something like this: DXF export in Blender is messy, so better export it to STL ...
Python program for conversion of bitmap heightfield (in PNG or PGM/PPM format) to 3D triangle mesh in POV-Ray POV, Wavefront OBJ, Autodesk DXF and stereolithography (3D printer) STL format. Resulting ...