Img 2 Gcode
Img 2 Gcode
Image to Go Code imports most digital image files into G-Code format that can be ran
with most computer numerical control routers and mills. The software package includes:
A basic digital image editor to allow you to retouch the image before send it to the g-code
converter. The converter reads the pixels information directly from imported image and
creates the g-code file.
Before the g-code file is created the size of the carving dimensions and the maximum tool
depth can be increased or decrease without the need to reprocess the image. Image
resolution can also be adjusted using several methods like the k-factor, axis combine,
reverse, close enough and the x and y axis. Prep-code and post-code can be edited with
the G-Code Editor built into the application for easy access and more. Image to G-Code
can convert raster images to vectors also.
Image to G-Code also imports DXF files from most CAD programs. (AutoCAD release
12 compatible), the importer support most geometric entities including inserts [with
nested blocks]. After the DXF file is imported all supported entities are put in list
organized by layers. The G-Code setup options form allows you to set layer level
priorities including turning on and off the layer, set the tool release plane, close enough,
default Z-Axis character, pre-code and post-code, optimize, and more.
Image to G-Code also includes a little CAD drawing editor that allows you to modify
imported DXF-Files, convert True Type Fonts to vectors, and draw lines, circles,
polygons, arcs and more.
The built in G-Code editor is a text editor with the basic find and replaced functions,
clipboard support, undo and redo, math expression parser, triangle and distance between
two points calculators and G-Code M-Code panel that includes most G and M codes
formatted syntax including circular interpolation calculations.
Image to G-Code is a fully integrated for easy interaction and its graphic user interface is
similar to most Microsoft Windows© applications found in the market today.
Image to G-Code is a shareware program; you can use Image to G-Code free for a 30
days try period. After the try period the G-Code converter functionality stops and you
must register the program to continue to use the converter functions.
Image to G-Code Graphics utilities are free. You do not need to register Image to G-
Code to use the program graphics capabilities.
Step I:
Import the image into the image editor or
acquired from you Twain compatible
scanner or digital camera using the Open or
Acquire menu commands in the image editor
File Menu. See Acquiring Images.
Adjust the image brightness and contrast using the contrast, brightness or color tone tools
or the respective menu command in the Image Menu. See Working with the Image
Editor.
Create the G-Code file. Click on File Menu Create G-Code. On the G-Code setup form
set the carving dimensions, set maximum cut depth and the x-y resolution adjusting the
spin edit controls, click on the create G-Code to open the save dialog box and write the
file to the disk.
Optionally before create the G-Code file set the k-factor, the close enough, the x-y
combine and the reverse options. See working with the g-code setup form.
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.
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. X = 7.20 / 240 = 0.03 in.
Y = 2.00 in. * 3 = 6.0 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 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.
The option II of the G-Code converter was designed for images composed mostly of solid
colors, like shapes and letters, and allows the user to have more control over the tool
selection and material removal. The method is also base in color depth similar to a mesh
created from the image. See example bellow.
Enter the width and height of the carving dimension and select the unit type.
The default image position is one unit from top and one unit from left.
To select more than one object: hold down the ctrl key and
click the objects you want to select. When selecting more
than one object the last object selected gets focused.
Move: apply to the selected objects; resizing and rotating
only apply to the focused object. To apply an action on
multiple objects click the group objects button. To
ungroup the object select the objects group and click the
ungroup button.
To send the object back: select the object and click the send to back button.
To bring the object to the front: select the object and click bring to front button.
To add caption double click to invoke the input text box.
After the bounding box for the text is created double click any where inside the box to
invoke the text editor
Click on the Cad Editor Button to send the image to CAD Editor.
Actions in the CAD Editor are controlled by the program task manager. To start a new task you
must select one from the draw panel. For example to draw a new line you click on the Line
Button. The new line task initializes and expects you to select the line start point followed by the
line second point.
Deleting entities:
Click the delete button to start the delete task.
Select entities to be deleted (move the mouse and click on any entity segment).
The delete task must be explicitly confirmed
To confirm a task:
Right click on the editor view port and from the pop menu select accept or cancel menu
command.
Enter a value on the Z-Value spin edit control For example -0.003 inches.
Right mouse click the view port and select [Use area to select objects] menu command.