Drilling operation will gouge if retract hight < start depth

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Wsk8
Posts: 182
Joined: Fri Dec 07, 2018 6:24 pm

Re: Drilling operation will gouge if retract hight < start depth

Post by Wsk8 »

Im on GeneFCs side.
The only problem is the current default retract height. Just set it to a proper value like safe height. Nothing else to be done.

mfg
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Drilling operation will gouge if retract hight < start depth

Post by RatonLaveur »

I believe the people in the camp of standard canned cycles are what they are and should stay what they are are right.

I also believe this raises the interesting question of custom G-code. Like FreeCAD has accessible lists and download of macros, could PathWB have accessible lists of custom G-codes that could be introduced either at the pseudo-gcode level or post processor level?

This is what we do here, where the CAM often outputs for us the absolute positioning for features but once in position a sub-program is called with custom, often G91 G-code to take care of specific things.

Here we could generate a snippet of code taking care of parametric peck drilling, with or without GUI, and tell either the post processor to call that instead of G8x or insert it in the routine directly.

What do you think?
boucinha
Posts: 1
Joined: Sun Jun 19, 2022 8:05 am

Re: Drilling operation will gouge if retract hight < start depth

Post by boucinha »

Although this thread is a couple of years old, I think it's still relevant and in my opinion an important factor has not been addressed in the (interesting) discussion: the g-code generation for tasks using drilling operations. I made an object involving three holes, using peck drilling on a linuxcnc machine.
My Freecad version is 0.20 daily, as follows:

Code: Select all

OS: Ubuntu 20.04.4 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 0c43dab7969a7a8ab014ea9da1398baff15bc90c
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.2
Locale: English/United States (en_US)
The relevant part of the generated g-code shows that after completion of the first G83 line, the machine moves to the xy-position of the second hole, then it moves upwards in Z to the safe height, followed by the G83 for the second hole. This seems the wrong order because:
- according to the linuxcnc documentation (see https://linuxcnc.org/docs/html/gcode/g- ... #gcode:g83, and especially the verbose explanation under G80) the G83 cycle ends with the machine with Z at the height specified in the R parameter with defaults to OpStartDepth (0 in my case) (this Z coordinate is called "clear Z" in the G80 part of the document).
- the rapid move to the next hole thus gouges a (albeit shallow) ditch...
- ...whereas the next instruction moves Z to the safe height, which is totally redundant at this point, because immediately after that the second G83 plunges down again.
Increasing the retract height is no good as explained by chrisb before (chips falling into the hole). Gouging can be avoided by simply reversing the order of the g-codes so the G0 X27.462 Y54.250 and G0 Z3.000 (in this example).
Here is the code:

Code: Select all

(Begin Drilling) 
G0 Z5.000 
G90 
G99 
G0 X12.956 Y29.125 
G0 Z3.000 
G83 X12.956 Y29.125 Z-8.000 F180.000 Q3.000 R0.000 
G0 X27.462 Y54.250 
G0 Z3.000 
G83 X27.462 Y54.250 Z-8.000 F180.000 Q3.000 R0.000 
G0 X41.968 Y29.125 
G0 Z3.000 
G83 X41.968 Y29.125 Z-8.000 F180.000 Q3.000 R0.000 
G80 
G0 Z3.000 
G0 Z5.000 
(finish operation: Drilling001)
Post Reply