Image to G-Code

Home Up Feedback OVERVIEW

Laser cut quality engravings from your CNC machine

Futures
Gallery
Download
CNC Programing
How to Register
Examples

G-Code Converter

Image to G-Code converter uses two methods to create the g-code file.  The first method was designed to emulate laser cut with a cnc router or mill, and is base on color depth. The theory of this method is to prepare the surface to apply some kind of stain that will penetrate the cut indents and create the necessary shades and shadows that will make the image to appear on the cut stock. To enhance the image light sanding is applied.

What tool should I do use?  Raster images store color information in a pixel unit.  The pixel unit size depends on the image resolution and device capabilities.  Image to G-Code   defaults to 0.01 in. pixel size, the X-Y resolution is set to the pixel unit size.  A tool size equal to the X-Y resolution gives the optimal results but the risk of breaking the tool is very high, plus increases the cutting time.

The following examples show how to combine the image size, resolution, k-factor, and the recommended tool.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

G-CODE CONVERTER PAGE 1 OPTIONS

Bitmap size: The bitmap size is given in pixel and represents the actual bitmap width and height. The Ratio is the width divide by the height. The size of the bitmap is used to calculate the resulting carving dimensions.

X-Y Resolution: Represents the area of one pixel information and is equal to the maximum tool size required to cut the image without overlapping other pixels information and is directly proportional to the machined area.

Carving dimension: The carving dimension represents the size of the bitmap to be machined projected in the material stock. Image to G-Code will try to maintain the aspect ratio of the original bitmap.  The initial value is set by the program.

Combine: When YZ Axis is checked linear motion on the Y and Z axis are combined, creating a wave effect. If not checked change on the Z Axis offset 90 degrees with respect to the Y Axis motion.

Depth: Maximum depth penetration on the Z Axis. In the color table white is equal to 0 and black is equal to the depth value. If the reversed option is checked then black is equal to 0 and white is equal to depth value.

K-Factor: X-axis scan line interpolation, a value of 2 will move the tool every other line, a value of 3 every two line etc…

Close enough: Minimum distance before tool change position on the Z Axis.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The math between bitmap size, X-Y resolution and carving dimension.

X-Y resolution has an initial value [default] of 0.01 in

A 240 x 200 bitmap has a carving dimension of:

240 * 0.01 in. = 2.4 in. and 200 * 0.01 in = 2.0 in.

Image to G-Code does not allow changing the original bitmap aspect ratio.

 

Example A:

Increasing the carving dimension x times.

Carving Dimension.

X-Y Resolution.

X = 2.40 in. * 3 = 7.2 in.

Y = 2.00 in. * 3 = 6.0 in.

X = 7.20 / 240 = 0.03 in.

Y = 6.00 / 200 = 0.03 in.

If the tool size recommended is equal to the X-Y resolution then the effect of increasing the carving dimensions allows for bigger tool diameter, in this case from 0.01 in to 0.03 in.  This method was used to cut three of examples shown above using a 0.03 flat end mill. Because the cut time is proportional the bitmap size and the amount of color shades in the image; projecting the image to larger size does not have an increasing effect on the cutting time.

Example B:

Using  a sharp pointed vee cutter (90 degrees or 60 degrees)

In general a very sharp vee tool works the best. For better details use the defaults value set by converter and uncheck the K- Factor and Close enough Boxes.

To reduce the amount of overlapping (tool collision) Set the K-factor to a value of 2 and ensure that the check box is checked.  This also reduces the cutting time by 2.

For less detail and small output files set close enough to about 1.5 % of the maximum depth value. In other words what you really need is the tool to go deep into the dark areas and barely touch the surface in the sections with very light colors.  After the image is cut apply the stain and remove the excess, let it to dry.  After the stain is dry start the sanding procedure.

For vee cutters keep the maximum dept of cut between 0.02 and 0.03, going deeper will cause the wider part of V to penetrate and destroy the previous cut or left no material for the next one.

If you want to go deeper then reduce the image size in the image editor and then increase the carving dimension.  This will increase the X-Y resolution and allows for bigger tool diameter.  Remember raster bitmaps only contains color information (pixels), modifying the pixels information will also modify the appearance of the image. This is why Image to G-Code uses projective transformation.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example C:

The Child and the Dog example.

To cut this example we use the following procedure:  The image was converted to gray scale, (the image was very well defined and not adjustment was required) On the G-Code Converter the X-Y resolution was set to twice the default value (0.01 * 2 = 0.020). Note that the carving dimension does not change with a change in the X-Y resolution.  In this case Image to G-Code resample the original image to a factor that results in the projected image (x * X-Y resolution = Carving dimension).

The depth value was se to 0.035, the K-Factor was check with a value of 2, and Close enough was unchecked.

Because the tool size was increased by changing the X-Y resolution and by using a K-Factor of 2, this allows us to go deeper into the wood and create a lighted 3-D effect.

 

Example D:

The Marilyn example:

For the Marilyn example we use a procedure similar to the Example A. the only change was to use a piece of stock that was pre stained and varnished.  This appears to give a cleaner cut.  Also when we apply the stain to the cut area this did not penetrate the areas with the varnish applied, after sanding some of the hair areas took some type of golden color.

 

 

Send mail to avaldes@comcast.net with questions or comments about this web site.
Copyright © 2005 Abraham Valdes
Last modified: 01/22/07