Converting DXF drawing files

How to's for using NCPlot

Converting DXF drawing files

Postby scottmartinez » Sun Sep 17, 2006 8:43 pm

Converting DXF drawing files to G-Code


Load the drawing

There are several ways a DXF drawing file can be loaded into NCPlot.
Use the menu File / Import DXF file
Use the menu File / Open file or the Open File toolbar button then select DXF drawing files from the files of type list.
Drag and drop a DXF file onto the NCPlot edit window

Opening a DXF file will not clear the loaded program. If adding code from a drawing into an existing program, move the cursor to the point in the program where you want the new code to be added. If you want to create a new program from a drawing, close the existing program before opening the drawing file.

Once a file has been selected, NCPlot loads it and displays it on the viewport. Once loaded, a dialog appears that will allow you to control how the drawing is to be converted to G-Code.

The DXF Conversion Options Dialog

The NCPlot DXF converter is layer based. That is, the same machining settings are applied to all drawing entities on the same drawing layer. This also affects geometry chaining and sorting (explained later). This should be taken into account when assigning layers to various parts of your drawing.

The top half of the conversion dialog consists of two tabs labeled Loaded DXF Layers and Saved Layers. Each of these tabs contains a list of layers. The Loaded DXF Layers tab contains the list of layers that was loaded when the drawing file was opened. The Saved Layers tab contains a list of commonly used layers that you can store machining settings for. Anytime a drawing is loaded that contains a layer with the same name as one of the saved layers, the saved settings for that layer are used.

The lower half of the conversion dialog contains the machining settings for the currently selected layer. The settings are divided among three tabs labeled Layer Settings, Layer Header and Layer Footer. The Layer Settings tab contains the machining settings which includes Z depths, feedrates and an option to create multiple passes at incrementally lower Z depths. You can also add header and footer text to the G-Code output of each layer, these settings are found under the Layer Header and Layer Footer tabs.

Turn off unwanted layers

Since the drawing file may contain information that you don't necessarily want converted to G-Code, the Loaded DXF Layers list provides a means to turn off unneeded layers. Clicking the checkbox next the layer name will either turn the layer off or on, a check mark indicating that the layer is on. The viewport graphics will update at the same time, displaying only the layers that are turned on.

Arrange the layer list

In addition to allowing you to turn off layers, the layer list also provides a means of controlling the order that the drawing is converted to G-Code. This gives you a level of control over the order that your part will machined in. The layers in the layer list are converted to G-Code in the order that they appear in the list. To move a layer, select it from the list and use the up arrow or down arrow buttons (not the keyboard keys) to change its order in the list.

Set the machining parameters

When each layer is loaded they are initially assigned the default layer settings, which comes from the current machine configuration. The exception to this is when a loaded layer name matches one of the saved layer names. In this case the layer is assigned the saved layer settings.

The layer settings that appear on the lower half of the conversion dialog are for the currently selected layer. To select a layer, click it's name in the layer list. When a layer is selected, it's name is highlighted in the layer list and the layer settings will update to show the settings for the selected layer.

Because of the way that NCPlot creates the G-Code output, it is important to set the Z depth settings in a logical order:
Z Retract should be the highest (most positive) value, followed by:
Z Approach
Top of Material
Z Depth should be the lowest (most negative) value.

Changing one of the layer settings only affects the currently selected layer. To copy settings from one layer to another, first select the layer you want to copy then click the button Copy to Layer. This button turns green indicating that you should now click the name of layer you want to copy the settings to. To copy the same settings to all loaded layers, first select the layer you want to copy then click the button Copy to All Layers.

If your drawing has layers that you use often, you can copy them to the Saved Layer list for later use. To copy a layer to the saved layer list, first select it from the layer list the click the button Copy to Saved Layers. The layer name and all of it's settings are then copied to the saved layer list.

Chain the drawing

Since a DXF drawing file doesn't provide the geometry data in any particular order, we need a means of identifying which parts of the drawing are connected together to form a continuous path. This is done with the chaining tool. The chaining tool will scan each layer and find all the geometry that appears to be connected together. The Max Join Distance setting determines how close the endpoints of two entities must be in order to be considered joined. This lets NCPlot create more efficient G-Code without a lot of seemingly random cutting. Since the converter is layer based, the chaining tool will only join geometry that is on the same layer.

There are two chaining tools: Chain All, which will chain all the layers in the drawing and Chain Layer, which will chain only the currently selected layer.

An additional benefit to the chaining tool is that it allows reversing the direction of chained geometry. Since the direction of the geometry determines the cutting direction, this allows for control over the cutting direction. To see the current cutting direction, click any of the entities on the viewport that are part of the chain. When an entity is highlighted, a small square box is drawn around the end point of the entity, indicating its direction. To reverse the chain direction, click the Chain Reverse toolbar button. The chains belonging to any selected entities will be affected.

Note that chaining is required for layers that have the Increment Z Depth setting enabled.

Sort the drawing

The sorting tool provides an additional means of optimizing the G-Code output by attempting to arrange the drawing in a way that will result in less rapid motion between parts of the drawing. It does this by starting at one corner and finding the closest part of the drawing. The next closest part of the drawing is found next and so on. This tool works with chained geometry, so the chaining tool must be applied before this tool can be used.

Convert to G-Code

There are three conversion tools, giving different levels of control over the order that the drawing is converted in. The Convert All tool will convert the entire drawing to G-Code in the order that the layers are listed. The Convert Layer tool will convert only the selected layer to G-Code. The third tool, Convert Selected, will convert only the chains belonging to any selected entities on the viewport. This gives the most control over the conversion process, but only works with chained geometry.
User avatar
scottmartinez
Site Admin
 
Posts: 215
Joined: Sat Mar 11, 2006 8:49 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest