dmap2gcode

Dmap2gcode generates g-code to cut depth
based on a gray scale image darkness or lightness

Contents

Background
Features
Download
Documentation
Sample Output
Related Links

Background

Dmap2gcode is a depth map image cutting program written in python. This program is based on image-to-gcode depth map milling program that is integral to LinuxCNC. The name dmap2gcode is an abbreviated description of the function of the program (Converts depth maps to G-Code). A depth map is a grey scale image where the darkness or lightness of each pixel corresponds to the depth (or height) of the object at each point. Dmap2gcode is a free open source program released under the GNU General Public License (GPL) Version 3. Most of the core functions are unchanged from the predecessor program (image-to-gcode). The changes in dmap2gcode include a new graphic user interface (based on F-Engrave) decoupling the code from the LinuxCNC distribution and some additional options have been added. Decoupling dmap2gcode from the LinuxCNC distribution will now allow windows and Mach3 users easy access to the program capabilities.

dmap2gcode Features

- Generates g-code based on image input and user settings
- Option to disable cutting of the top surface. (allows stock top surface to remain)
- Option to offset the step over (allows cutting between previously cut scan lines)
- Option for vertical or arc plunge start
- Text input for v-bit angle (if v-bit is selected)
- Complete set of roughing configuration options
- Origin selection allows user to select the location of g-code zero position
- Use inches or mm as export units
- Customizable g-code preamble and postamble
- Opens previously saved g-code file and retrieve the settings
- Roughing g-code is saved to separate file to allow tool change between roughing and finish cut.
- Imports a variety of image files (including jpg, gif, png, pgm)

Changes in Version 0.01

- Initial Release

Changes in Version 0.02

- Fixed bug resulting in the selection of columns then rows having no effect
- Added option to disable arcs in the g-code output (useful for GRBL/ShapeOko)
- Added automatic scaling of all linear dimensions values when changing between units (in/mm)
- fixed bug when using a configuration file ("dmap2gcode.ngc")

Changes in Version 0.03

- Fixed bug that caused crash when the image file name contained non ASCII characters.

Download:

(Right click on the link and select "Save target as" or "Save link as")
Source files
(zip file)
Windows Executable Files
(zip file)
Python File Only (.zip - zip file)
dmap2gcode-0.01_src.zip
dmap2gcode-0.01_win.zip
dmap2gcode-001.zip
dmap2gcode-0.02_src.zip
dmap2gcode-0.02_win.zip
dmap2gcode-002.zip
dmap2gcode-0.03_src.zip
dmap2gcode-0.03_win.zip
dmap2gcode-003.zip

If the windows executable does not work right away install the
“Microsoft Visual C++ 2008 Redistributable Package (x86)”. The program I use to create the Windows executables (py2exe) has a dependency to this package.

Documentation

I have started the manual page for dmap2gcode here: dmap2gcode manual

Sample Output

Green Lake Picture
The g-code for this lake map was produced by dmap2gcode. The text g-code was produced in
F-Engrave. The map was carved into plywood. The glue, which is red for this plywood, forms contour lines between each plys. Too bad the plywood glue is not blue.

Green Lake Picture
Some more lake maps that have been carved. The map in the upper right is carved into a hand laid up plywood consisting of alternating walnut and birch veneer. The map in the lower right has the surrounding roads and title protruding up from the main shoreline surface.

Lake Map Video (How Make a Lake Map - Overview)


This video shows the process I used to make the smooth contour lake maps.

Related Links

image-to-gcode page: The core functions of dmap2gcode come from image-to-gcode.
F-Engrave: Used to create the V-Carved text on the lake map plaques shown above.
MAKE: Laser-Cut Bathymetric Charts: This blog post motivated me to finish this project.


Scorch's Home
Scorch Works Home
Scorch Works Blog
@scorchworks On Twitter