dxfel - A tool for adding pseudo-elevation data to DXF files
dxfel is a Python script which takes in 2D DXF files generated by the autotrace raster-to-vector file conversion tool, and assigns each two dimensional DXF polyline element (1-n vectors connected by points) an elevation value, based on the color which autotrace assigned to the vector during the conversion process.
dxfel was originally designed for the purpose of taking vectorized images of Mars terrain, as photographed by the Spirit and Opportunity Mars Exploration Rovers, and using the color information within the images to create 3D terrain maps. The effort produced interesting results. Images and a description of the original project (including images of 3D terrain maps generated using dxfel) may be found here.
dxfel is made available under the GNU General Public License.
Latest release information:
dxfel / Version 1.0 March 3rd, 2004.
dxfel takes four arguments at the command line:
At the command line, this translates into:
- The filename of the input DXF file (as generated by autotrace)
- The desired filename of the DXF file to be output
- A floating point value representing the increment to be used between different color layers. Higher numbers will result in greater separation between layers along the 3D model's Z-axis.
- The type of elevation incrementation algorithm to be used. Right now, this is always just specified as 'simple' (without the quotes).
dxfel.py <input_dxf_file> <output_dxf_file> <elevation_increment> simple
dxfel.py mars2d.dxf mars3d.dxf 5.0 simple
Rupert Scammell, 2004-06-10.