solved Dragknife issue

Tjmarch

Aktiver Benutzer
Member
Landesflagge
Been a while sence I used this tool dxf2gcode. Having trouble with dragknife not preforming properly. Not sure why g-code is the way it turns out. But when it completes a shape it makes a drag move, (swivel move). While still in the workpiece without moving to drag depth damageing the workpiece. I tried newest version on Windows 11 and on Linuxmint, also tried 2019 version on Linuxmint with the same result in both versions. Not sure what I am doing wrong. I have prepaired a simple test dxf file with four squares and a test g-code file. If you load the g-code file into Linuxcnc sim you can zoom in and see the tool path making drag move, (swivel move) while still in the part for every square as it leave each square shape. It is not hard to fix the g-code file manualy for this simple g-code file but more complex files it is a real pain. Would be thankful for any suggestions to overcome this problem I am having.
Screenshot.png
 

Anhänge

  • test.dxf
    68,6 KB · Aufrufe: 3
  • test.ngc
    2,6 KB · Aufrufe: 1
Zuletzt bearbeitet:
Hi, if i did get your problem right, you would expect that the knife would move up before doing the swivel move, like all the other corners do, right? I never used a drag knive maschine, thats the reason why i ask.

First this function is called to add Geometry for dragging (swivel?) the knive:
dxf2gcode / SourceCode / [e6eddf] /source/dxf2gcode/core/stmove.py
=> I think the problem is located here. Maybe for the last geometry there should be a special treatment? But i am not that sure.

Then the code is doing the cuts here and also lifts the tool if required.:
dxf2gcode / SourceCode / [e6eddf] /source/dxf2gcode/core/shape.py
=> I think this is fine

As i didn't write this part of the code i am sorry, that i can't directly help you with that. But i would propose that you can try to dig a bit into it and we can commonly try to solve it.

regards
Christian
 
Then the code is doing the cuts here and also lifts the tool if required.:
dxf2gcode / SourceCode / [e6eddf] /source/dxf2gcode/core/shape.py
=> I think this is fine
But it may be possible to solve it here.
  1. Check if the element is the last one of the last geo in Geos
  2. Check if it's a swivel move
  3. If so just skip it?

You could add some more debugging messages and check it by using
Python:
Bitte, Anmelden oder Registrieren to view codes content!

To check if i am right. In order to see it in the window just change the config to show more messages in the window or write more details to file.
 
Hello Christian it has been a long time,
This is Tim March the guy you guys wrote this add-on for as my 55 birthday present. To be honest I still have not learned Python, so with the code I am not any help. But my CNC is complete and fuctioning and I can test any solution with my dragknife. I have been editing the g-code that I create with dxf2gcode with success. To answer your question if a swivel drag move is done the dragknife needs to be at drag depth. The only places I have encountered the problem is at the end of shapes. In some instances the dragknife is in the proper angle for the next shape and a swivel drag move is not there or needed. When there is swivel drag move at the end of shape it is missing, F(feed rate for 3 axis), G1 Z (drag depth), then F(Feedrate for x,y plane) but, these moves should be just before the swivel drag move.
Here is a example of correct action.

G1 Z 0.000 <-----cut depth for previous cut
F6096
G1 X 85.615 Y 27.275 <-----previous cut move at depth
F3048 <-----F(feed rate for 3 axis)
G1 Z 4.390 <----- G1 Z (drag depth),
F6096 <-----F(Feedrate for x,y plane)
G3 X 265.227 Y 369.662 I 0.000 J 4.460 <----- swivel drag move
F3048
G1 Z 9.520
G0 Z 15.000
M9 M5 <----End of shape


Example of what is happening wrong:

G1 Z 0.000 <-----cut depth for previous cut
F6096
G1 X 85.615 Y 27.275 <-----previous cut move at depth
G3 X 89.175 Y 30.835 I 0.000 J 3.560 <----- swivel drag move
F3048
G1 Z 9.100
G0 Z 15.000 <----End of shape
M9 M5

Thank you for the help
Tim
 
Zuletzt bearbeitet:
Is there a place in the python code that writes the g-code to file and is missing the varibles for, F(feed rate for 3 axis), G1 Z (drag height), then F(Feedrate for x,y plane) when a drag move is called for at end of shape. This would be a easy fix if you can look.
When I edit g-code to correct problem this is all that I am adding near end of each shape that needs it. As the examples in previous post, I leave the swivel drag move as is. Then the g-code file works.
 
Zuletzt bearbeitet:
Set up debug with the following results also setup log file for info see attached file/

You are using DXF2GCODE
Version Py3.8.10 PyQt5.14.1 ([imath]Date: Fri Oct 25 20:45:56 2019 +0200[/imath])
For more information and updates visit:
dxf2gcode
For Configuration files refer to folder:
/home/tim/.config/dxf2gcode

DEBUG - Started with following options:
ArgumentParser(prog='dxf2gcode.py', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
INFO - File: /home/tim/Documents/plans/setup/test.dxf selected
INFO - Loading file: /home/tim/Documents/plans/setup/test.dxf
DEBUG - Did read 4826 of linepairs from DXF
INFO - Reading DXF Structure
INFO - Reading Block *Model_Space; Nr: 0
DEBUG - Found block pos Value 10 at: 1302
INFO - Reading Block *Paper_Space; Nr: 1
DEBUG - Found block pos Value 10 at: 1322
INFO - Found unsupported geometry type: VIEWPORT !
INFO - Creating Contours of Block Nr: 0
INFO - Creating Contours of Block Nr: 1
INFO - Creating Contours of Entities
INFO - Loaded layers: 1
INFO - Loaded blocks: 2
INFO - Block 0 includes 0 Geometries, reduced to 0 Contours, used layers: []
INFO - Block 1 includes 0 Geometries, reduced to 0 Contours, used layers: []
INFO - Loaded 5 entity geometries; reduced to 5 contours; used layers: [0]; number of inserts 0
INFO - Drawing units: millimeters
DEBUG - Clicked Point: X -> 0.000 Y -> 0.000
DEBUG - Old Start Point: X -> 0.000 Y -> 0.000
DEBUG - New Start Point: X -> 0.000 Y -> 0.000
DEBUG - Analysing the shape for CW direction Nr: 0
DEBUG - Clicked Point: X -> 0.000 Y -> 0.000
DEBUG - Old Start Point: X ->32.324 Y ->29.725
DEBUG - New Start Point: X ->32.324 Y ->29.725
DEBUG - Analysing the shape for CW direction Nr: 1
DEBUG - Clicked Point: X -> 0.000 Y -> 0.000
DEBUG - Old Start Point: X ->85.615 Y ->30.835
DEBUG - New Start Point: X ->85.615 Y ->30.835
DEBUG - Analysing the shape for CW direction Nr: 2
DEBUG - Clicked Point: X -> 0.000 Y -> 0.000
DEBUG - Old Start Point: X ->137.796 Y ->31.945
DEBUG - New Start Point: X ->137.796 Y ->31.945
DEBUG - Analysing the shape for CW direction Nr: 3
DEBUG - Clicked Point: X -> 0.000 Y -> 0.000
DEBUG - Old Start Point: X ->187.757 Y ->30.835
DEBUG - New Start Point: X ->187.757 Y ->30.835
DEBUG - Analysing the shape for CW direction Nr: 4
DEBUG - Autoscaling to extend: PyQt5.QtCore.QRectF(0.0, -508.0, 800.1, 533.4)
DEBUG - Switched Direction at Shape Nr: 1
DEBUG - Switched Direction at Shape Nr: 2
DEBUG - Switched Direction at Shape Nr: 3
DEBUG - Switched Direction at Shape Nr: 4
DEBUG - Export the enabled shapes
DEBUG - Sorted layers:
DEBUG - LayerContents[0] =
LayerContent
nr: 0
name: 4mm
shapes: [<dxf2gcode.gui.canvas2d.ShapeGUI object at 0x7fe274cf5ee0>, <dxf2gcode.gui.canvas2d.ShapeGUI object at 0x7fe274cf5f70>, <dxf2gcode.gui.canvas2d.ShapeGUI object at 0x7fe274cf5e50>, <dxf2gcode.gui.canvas2d.ShapeGUI object at 0x7fe274cf5dc0>, <dxf2gcode.gui.canvas2d.ShapeGUI object at 0x7fe274cf5d30>]
INFO - File: /home/tim/Documents/plans/setup/test.ngc selected
INFO - /home/tim/Documents/plans/setup/test.ngc
DEBUG - read existing varspace '/home/tim/.config/dxf2gcode/postpro_config/postpro_config.cfg'
DEBUG - Found 0 break layers
DEBUG - Beginning export of Layer Nr. 0, Name 4mm
DEBUG - Nr. of Shapes 5; Nr. of Shapes in Route 4
DEBUG - Beginning export of Shape Nr: 1
DEBUG - Beginning export of Shape Nr: 2
DEBUG - Beginning export of Shape Nr: 3
DEBUG - Beginning export of Shape Nr: 4
INFO - Export to FILE was successful
 

Anhänge

  • dxf2gcode_debug.txt
    1,9 KB · Aufrufe: 1
Zuletzt bearbeitet von einem Moderator:
Downloaded source code then ran Dxf2gcode from terminal and recreated g-code for dxf file with four squares. Sorry to say it did not fix problem.

2022-05-18_16-00_dxf2gcode-LCNC.png

The g-code is as follows:
Code:
Bitte, Anmelden oder Registrieren to view codes content!
 

Anhänge

  • test.ngc
    2,5 KB · Aufrufe: 0
Zuletzt bearbeitet von einem Moderator:
I did try to do it on my version here and i think it's correct. Please check it again in the result. I only exported the small rectangle on the very right ...

Code:
Bitte, Anmelden oder Registrieren to view codes content!
 
Thank You
I downloaded the wrong branch, after downloading correct version from development it looks perfect now. I did a more complex dxf file and it looks great. I am running sim now, I don't exspect any problems in sim. I will cut it on machine later today and report back.

dxf2gcode_fix.png
 
I downloaded the wrong branch, after downloading correct version from development it looks perfect now. I did a more complex dxf file and it looks great. I am running sim now, I don't exspect any problems in sim. I will cut it on machine later today and report back.
Thats good new, Glad to hear that.
 

Benutzer welche diesen Thread betrachten (Mitglieder: 0, Gäste: 1)

Wer hat diesen Thread gelesen

Zurück
Oben