Maslow Home Maslow Community Garden Newsletter

Installing and Using DXF2GCODE

This is a quick tutorial to use DXF2GCODE with Maslow. It seems that DXF2GCODE is quite popular for CAM, and early dabblings with it show great promise. Hat tip to ame for writing the initial tutorial. Discussions of DXF2GCODE can be held in this thread: DXF2GCODE tutorial

To do:

  • Instructions for Pocketing
  • Instructions for Drilling
  • Add pictures of important steps

Installation

First, get the software. You can find it on SourceForge here:

Dowload and extract the zip file. Instructions for building DXF2GCODE for Linux, Windows, and MacOS are given in the file README.txt

Workflow

The workflow is:

Some DXF file -> DXF2GCODE -> G-Code file

Obviously, once you have the G-Code file you can load it up onto the Maslow. Yay!

The other thing is you can use your favourite CAD software to make the DXF. Double yay! The workflow expands thus:

Your favourite CAD software -> DXF file -> DXF2GCODE -> G-Code file -> Maslow

Let’s look at the software. We are going to ignore a few of the menu functions. Along the top we have File, Export, View, Options and Help.

File|Open…
Open the DXF file.

Export|Optimize and Export Shapes
Export the shapes into a G-Code file (usually ending in .ngc)

View|Show Path Directions
Make sure this is ticked

Options|Machine Type|Milling
Make sure this is ticked

Options|Automatic Cutter Compensation
Make sure this is un-ticked. Maslow does not recognise G41 and G42.

Options|Configuration…
Configuration settings. Most can be left as default. The changes below seem to work:

  • Machine config
    Third axis defaults
    Retraction coordinate: 5mm
    Safety margin: 3mm
    G1 feed rates
    First and Second axis (2D plane): 700 mm/min

  • Tools table
    For a 1/4" bit, edit tool 1 to be diameter 6.35mm, speed 6000, start_radius 0.00
    You can delete the other default tools or modify them if you have other bits.

The config file is stored in username/.config/dxf2gcode/config/config.cfg
It’s possible we could make a generic one that is ready to go for Maslow, and a Maslow post-processor, but for now, these changes from the defaults should get you started.

Using DXF2GCODE

So, assumptions:
Assumption 1: You have a DXF file and you know what elements you want to cut (and whether you want to do an internal cut or external cut).
Assumption 2: You know what kind of tool you have on Maslow, and that it is set up so that Z=0 is the top surface of the workpiece, positive Z is above the workpiece (for safe moving) and negative Z is below the surface, cutting into the workpiece.
Assumption 3: You know the best feed rate for your tool and material, how thick the material is, and how deep you want to cut each element.

File|Open… open your DXF file. It will be drawn in the window on the right. Since you have only one tool defined (tool 1) then all cuts will have that tool selected.

On the left is a tabbed panel (Entities and Layers). Choose Layers. Click on the checkbox to deselect layers you don’t want, leaving only the layers containing elements you want to cut. You can also collapse the layers so that the list looks less cluttered by clicking on the tiny triangle at the very left of the layer name.

Now the window on the right will show only the elements you are going to cut. If there are extra elements there that you don’t want to cut you can deselect them in the list on the left.

Next to each element are two arrows. The blue arrow shows the approach direction and start position of the cut. The green arrow shows the exit from the cut. The arrow direction will help you apply cutting compensation (left or right) to account for the radius of the cutting tool.

Click on each element in the right hand window. The corresponding shape will be indicated in the list on the left, and the details of the cut will be shown below the list.

Again, because you only have one tool all of the settings will be pre-filled.

You can multi-select objects with Ctrl-click, or dragging a box around a group of objects.

For each object, check the settings for the cut (specifically the Z final mill depth). You can do a partial thickness cut, or full thickness cut. The software will calculate how many passes are needed, based on the Z Infeed depth setting.

Once you have selected an object or group of objects right-click on them to bring up the context menu. The only one you need is Cutter Compensation. You can specify G40 No Compensation, G41 Left Compensation and G42 Right Compensation. Because Maslow doesn’t support these commands and we turned off automatic cutter compensation the software will generate a toolpath which includes the desired compensation.

That’s it!

Click Export|Optimize and Export Shapes. The software will make an .ngc file for you.

1 Like