[solved] invalid g-code : arc with zero radius

Hello,

I am generating a pocket toolpath from a (refined) STEP file,
somehow I got an invalid G-code : arc with zero radius

from line : G3 X163.833 Y1024.752 Z-2.000 I-0.000 J0.000 F3500.000

  • image attached to show the 3D

do you have an idea how I can bypass this ?

thanks
stéfan

OS: Debian GNU/Linux 12 (bookworm) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.21.2.33771 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.21.2)
Hash: b9bfa5c5507506e4515816414cd27f4851d00489
Python 3.10.13, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Defeaturing 1.2.2

Did you already fiddle with the Path preferences Tolerance and Accuracy?

hello,

yes, I went up to 0.0001 mm for each
I also try with PRECISION = 4 in post but numbers stays with 3 decimal

You can upload the file for further investigation by the experts, or name at least your post processor.
It would be best if you can isolate the issue, and remove all other stuff from the solid.

The main, fast and 100% working way is to always use a plain text editor to work with the created g-code. Not only zero radii happen. There are also (almost) infinitely large radii. It’s much easier and faster to find them by hand. In case of zero radius in a line with such a radius, change G3 or G2 to G1, also removing everything except X, Y and Z coordinates.

It is not difficult to find toxic lines in the code - search the text. There is also auto-replacement (in simple situations), there is also structure (indents).
To (for example) in Geany in the file g-code worked autocollapse code blocks I corrected the file -

vi /usr/share/geany/filetype_extensions.conf

and there in the line that specifies associations for Haskell files add g-code file extensions, i.e. -

Haskell=.hs;.lhs;.hs-boot;.lhs-boot;.ngc;;

But what I am personally curious about is what kind of detail is being made? For anything related to fluid or gas dynamics, the detail is not suitable - there are dead ends in the flow, pockets, etc. Is it really an art object?

Hello,

sorry If forgot to mention that the post processor is linuxCNC,

I wasn’t sure how I could get rid of those invalid g-code lines by editing the file : G3 or G2 to G1 with only X,Y,Z did the magic. thank you.

and yes, this is indeed an art project :wink:

best,

stéfan, can you please create a Github ticket?

I’m going to assume you’re cutting veneer for a lamp shade. Then it makes sense to make a “vacuum table” out of plywood and press the veneer to the work table through this “vacuum table” with the help of a vacuum cleaner (a sheet of ordinary paper can be placed on top of the veneer for better pressing).