User Guide DXF2GCODE

chrisko
Attachments
Canvas_legend.png (66109 bytes)
ExportMenu.png (7542 bytes)
Export_dialog.png (39753 bytes)
FileMenu.png (6131 bytes)
Optimize_order.png (5015 bytes)
OptionMenu.png (15203 bytes)
ViewMenu.png (12082 bytes)
Window_description.png (219438 bytes)

Introduction

This page is intended to genereally answer some questions about the usage of dxf2gcode. I try to add all upcoming questions here in order to reduce the effort of searching the whole forum.

Brief Description on how to use DXF2GCODE

Overview of the DXF2GCODE Window

The user inferface of dxf2gcode is splitted into several areas.
On the top of the window you will find as usual a Menu Bar. Here you have the possiblity load files, export them, change the view or change the options and preferces.
On the left side you seed the are Tab Group which includes some listboxes for Layers and Entities.
On the right side you wil see a canvas ares in which the loaded contents are show and you are able to edit the way you want to export the loaded dxf.

The several areas of the dxf2gcode window

Menu Bar

File Menu

FileMenu
Within the file menu you can load files from your filesystem by clicking open. You have the possiblity to open .dxf, .ps .pdf and .d2g files. Your can reload the actual loaded file and therefor reset all changes you did to the standards, or save current configuration you selected by saving the current configuration in a project file in the .d2g format. In order to be able to read .ps and .pdf files you need to integrate pstoedit.exe, therefore refer to configuration.

Export Menu

ExportMenu
Here you can export the currently loaded file with the preferences and configurations you selected. You will find 3 different setting here
1.) Optimize Paths - This will optimize the order of the shape in a way to reduce the travel of the maschine
2.) Export Shapes - This will export the current shown order without doing any optimization vor travel
3.) Optimzie and Export - This will be a combination of 1.) and 2.)
After selection you will see some additional information in the canvas area which will show you the export order.
Optimized order of shapes

If you selected one of the options with export a export dialog window will pop up. There you have the possibility to select from the postprocessor configurations you created. In my example you can see that i have created two of them. This can be used if you have 2 different maschines which may require different configurations.
Export dialog with 2 postprocessor configurations

View Menu

Within the View Menu you are able to select different options on how to configure and show the canvas area.
View Menu

  • Show path direction - Here you can enabel or disable if you want to show path direction arrows at any time or just while you selected a geometry, see picture below which shows this option enabled.
  • Show disabled paths - If you check this option you will see disalbed paths in the canvas as dashed lines. Not disabled paths are shown in soldi lines. In the picture below you see the circle as enabled and the other path as an disabled one. How to disable a path will be explained later in the canvas area.
    View Menu
  • Live update Export Route - While export you can show how the routes are optimized (will be visible for many elements only otherwise too fast to see)
  • Delete G0 Paths - If you have optimized the routes the result will be shown. In order to delete this select this option
  • Autoscale - Should be self explaining
  • Top View - View option avialable for the OpenGL 3d view only.
  • Iosmetric View - view option available for the OpenGL 3d view only.

Options Menu

  • Configuration ... - By selecting this the configuration window will open. For detailts about the configuration possibilty of dxf2gcode refer to https://sourceforge.net/p/dxf2gcode/wiki/General%20Configuration/ there the options are shown in text file, but within newer released of dxf2gcode you are able to configure by a GUI.
  • Postprocessor configuration ... - By selecting this the postprocessor configuration window will open. For details refer to https://sourceforge.net/p/dxf2gcode/wiki/Postprocessor%20Configuration/ within current release you are able to modify it in a GUI also.
  • Tolerances - Here a new window will open which give you the possibilty to set the tolerances for recognizing common points and curve fitting.
    Since not all drawings are created using elements like polylines or splines there may be a contour consisting of several elements like lines and arc. In order to recognize them to form one shape dxf2gcode checks for common starting and end points. Since drawings may not always be exact a tolerance for common points can be set here.
    G-code can not handle spline, therfor a algorithm is used to fit lines and arcs to match with the spline. This tolerance can be set here.
  • Scale All - Here you can scale the imported dxf to a different factor.
  • Rotate All - Here you can rotate the imported dxf file, this might be required to match to the format of you maschine.
  • Move Workpiece Zero - Here you are able to change the zero of the dxf file to match with your expectations.
  • Split Line Segments - For closed shapes it might be helpful to set the starting point at a dedicated location. By selecting al line you can split it into two lines in order to set the start point in the straigt area.
  • Automatic Cutter Compensation - Enable the automatic cutter compensation in order to detect for inner and outter shapes.
  • Maschine Type - Here you can set different maschine type which will result in a different way on how to export
  • Measurement units - A dxf files includeds the units, if you want to change that you are able to change from inch to mm in this menu point.

Canvas Area

Withing the Cavas Area the imported file will be show. Additionally you are able to slect all the imported elements and change the way how they are exported.

Zooming and Draging of the Canvas

You can zoom with the mouse wheel and drag the window by pressing the shift, then you will see a hand in the window and your are able to move the canvas are by moving around with the mouse (this will only work if zoomed in already)

Selection of Shapes in Cavas

In order to select a shape in the canvas you can use the mouse in the canvas, there are other ways to select shapes in the list boxes shows left of the window, but these will be explained somewhere else. The simpliest selection is by pointing on a shape with the mouse and click with the left mouse button. In order to select more then one shape you can use the lasso to select all shapes which interfere with the lasso box, in order to use the lasso push the left mouse button on the staring point and drag to then end point while keeping the button pressed. By pressing the Ctrl button an selecting something you can keep the current selection and add or remove something.
In the context menu (by clicking right mouse button) you can invert the selection, which means all shape which are selected will be unselected and the other way around.

Legend of the Canvas elements

Find below the different elements and their explainations. In the picture below i missed to explain the workpiece zero which is shown by a circle with some additional rectangles in it.
Legend for Canvas

Shape Context menu

In order to change the way the selected shapes are exported you can click with the right mouse button
Shape Context Menu

  • Invert Selection - See explaination above
  • Disable Selection - A disabled shape will not be exported. This can be used to cut only a subset of the shape becaus you may want to cut inside and outside with differenct tools
  • Enable Selection - Here you can enable a disabled shape again to be exported
  • Switch Direction - Here you can change a shape direction to be cutted in the opposite direction (e.g. ccw to cw). This will be shown by the blue arrow in the canvas
  • Set Neares StartPoint - By selecting a shape an pushing this the staring point of the shape will be changed to the neares point of to the selected point.
  • Pocket Mill - With the selection you can mill a pocket (This will only work for cutter compensation to the inside)
  • Cutter compensation - Here you can select the following:
    • G40 - No compensation - Disalbe cutter compensation
    • G41 - Left compensation - Compensation left to the cutting direction (will be shown by a green arrow in the canvas)
    • G42 - Right compensation - compensation right to the cutting direction (will be shown by a green arrow in the canvas)

Frequently Asked Questions

How to change the starting point of a shape

In order to change the starting point where to start milling of a closed shape you need to do the following steps:
1.) Select the shape
2.) Right click on the location where you want to have the new starting point
3.) Select Set Nearest Starting Point in the context menu
How to set nearest starting Point
Limitation: Starting points can not be set at any location, just at an existing start / end point of a line or arc segment.

How to start DXF2GCODE in without GUI

Running dxf2gcode with --quiet flag is not really quiet. It needs to open GUI for a brief moment to initialize graphic objects.
Thus, if you want to run with no physic display, run it with a virtual display like xvfb

On linux:

Install and start xvfb

$ sudo apt update -y && apt install xvfb
$ Xvfb :1 -screen 0 1024x768x16 &

Set permanent environments

export QT_DEBUG_PLUGINS=1
export QT_QPA_PLATFORM=xcb
export DISPLAY=:1


Related

Wiki: Home

Discussion

  • David Walker

    David Walker - 2021-08-02

    I received a dxf cutout from a manufacturer for an aircraft panel instrument. DXF2GCODE generated code where the 0,0 point is so far away that the dimensions of the object itself as seen from the 0,0 position exceeds the side of my CNC 3018 test machine.

    How and where in the workchain do I move the 0,0 nearer to the lower left corner of the object?
    I am using FreeCAD > DXF2GCODE > Candle Grbl 1.1

     
  • David Walker

    David Walker - 2021-08-02

    Forgot the dxf file

     
  • Bob Smith

    Bob Smith - 2021-08-03

    Hi David, I'm a new user of dxf2gcode so I'm not an authority, but I opened your DXF file and noticed that the design sketch is 180 inches wide, so the drawing scale is probably different than you anticipated. The instrument panel cutout being 15 feet wide (!!) for a 3018's twelve inch work area is going to be a problem, in addition to the zero axis point location.

    But yes, I can see what you mean about the 0,0 origin point being way off to the lower left -- that is something that can/should be be changed in the original DXF file, and dxf2gcode will display it correctly. I went ahead and fixed it for you quickly, and attached a new DXF file to this reply (but I still think the scale is way off and this needs to be redesigned). Hope this helps.

     
    • David Walker

      David Walker - 2021-08-03

      Thanks Bob,
      but it IS in  mm (see parameter G21 on Line 5 - are you seriously still using inches in the US for such engineering  things? After that Apollo(?)  program disaster due to a mix up of units in the old days....??

      Mit freundlichen Grüssen / Best Regards

      David Walker
      Jahnstrasse 64
      D-82538 GeretsriedGermany

      Tel.08171.2385010
      Mob. 0176.55225959

      -----Ursprüngliche Mitteilung-----
      Von: Bob Smith bob2718281@users.sourceforge.net
      An: User_Guide_DXF2GCODE@wiki.dxf2gcode.p.re.sourceforge.net
      Verschickt: Di, 3. Aug. 2021 6:32
      Betreff: [dxf2gcode:wiki] Discussion for User Guide DXF2GCODE page

      Hi David, I'm a new user of dxf2gcode so I'm not an authority, but I opened your DXF file and noticed that the design sketch is 180 inches wide, so the drawing scale is probably different than you anticipated. The instrument panel cutout being 15 feet wide (!!) for a 3018's twelve inch work area is going to be a problem, in addition to the zero axis point location.But yes, I can see what you mean about the 0,0 origin point being way off to the lower left -- that is something that can/should be be changed in the original DXF file, and dxf2gcode will display it correctly. I went ahead and fixed it for you quickly, and attached a new DXF file to this reply (but I still think the scale is way off and this needs to be redesigned). Hope this helps.Attachments:
      - Panel_Cutout_GNS430_fixed.DXF (20.9 kB; application/octet-stream)
      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/dxf2gcode/wiki/User%20Guide%20DXF2GCODE/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Paul Delgado

    Paul Delgado - 2022-01-15

    hello I want to use dxf2gcode for plasma cutting in linuxcnc someone can help me with the configuration of the postprocessor or some guidance on this to be able to modify.

     
  • chrisko

    chrisko - 2022-01-15

    Hi, you can open a topic in our new forum, check here:
    https://www.ltspiceusers.ch/#dxf2gcode.68

    But i know that i just discussed this with someone else in the old section. Check here first:
    https://groups.google.com/g/dxf2gcode-users/c/UY0KVPd0CQg

    However if there are additional questions, just open one in the new forum we dont want to continue with google groups, as they are not that easy to search etc.

    regards
    Christian

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.