Editing gcode with GUI?

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!
Post Reply
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Editing gcode with GUI?

Post by pathfinder »

Hello,

I'm not sure how to word this and I don't really think this is a Path or even a FreeCAD issue, because this is really more a post processing thing, but since I imagine I'm not the only one thinking about this, I'd ask here.

Basically, what I'm looking for is a program that displays the written gcode in one panel and the corresponding visual representation in another, with the option to select and highlight parts in either panel (i.e. click on a part of the path and the code viewer jumps to the corresponding line, select a line or lines in the code viewer, highlight the parts in the visual representation).

I assume this is something that needs to be done after the gcode has been exported, so I guess what I'm looking for is either a function in FreeCAD or an external program (preferably free and local) that can do this.

TIA
User avatar
PedjaS
Posts: 147
Joined: Sat Jan 18, 2020 6:35 pm

Re: Editing gcode with GUI?

Post by PedjaS »

try https://ncviewer.com/

it is online app but better than nothing.
User avatar
PedjaS
Posts: 147
Joined: Sat Jan 18, 2020 6:35 pm

Re: Editing gcode with GUI?

Post by PedjaS »

NC Corrector v4.0 is a free program visualizer editor for CNC machines (G-code).
http://nc-corrector.inf.ua/index_EN.htm
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Editing gcode with GUI?

Post by onekk »

pathfinder wrote: Tue Aug 02, 2022 6:40 am Hello,

I'm not sure how to word this and I don't really think this is a Path or even a FreeCAD issue, because this is really more a post processing thing, but since I imagine I'm not the only one thinking about this, I'd ask here.

Basically, what I'm looking for is a program that displays the written gcode in one panel and the corresponding visual representation in another, with the option to select and highlight parts in either panel (i.e. click on a part of the path and the code viewer jumps to the corresponding line, select a line or lines in the code viewer, highlight the parts in the visual representation).

I assume this is something that needs to be done after the gcode has been exported, so I guess what I'm looking for is either a function in FreeCAD or an external program (preferably free and local) that can do this.

TIA
It is not so trivial, there are some free things around, a part of LinuxCNC, bCNC that is Python program that will send code to a GRBL machine, has a visualizer for the toolpath.

And there are many others around.

Personally I don't rely on "web services" as I don't know how my data are managed, so if the gcode is for something that could be in some sense "reserved", chances are that the data will remain around in some server, and maybe if you blindly accept to use "the service" your data are not your anymore.

Probably little paranoic, but...

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
spanner888
Posts: 326
Joined: Tue May 28, 2019 10:51 am

Re: Editing gcode with GUI?

Post by spanner888 »

bCNC has a pretty good graphical gcode Editor with the features you are asking for.

It is very handy to be able to do this level of editing in your gcode sender, but of course you are not forced to use it as a sender. The FreeCAD grbl postprocessor can even add header blocks compatable with bCNC, so you can easily find each FreeCADPath Operation and collapse of expand the code.
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Editing gcode with GUI?

Post by pathfinder »

PedjaS wrote: Tue Aug 02, 2022 8:02 am try https://ncviewer.com/

it is online app but better than nothing.
Yeah, I have NC viewer bookmarked, but I despise web/browser based programs for multiple reasons. One being that they tend to not work when you're offline.

NC Corrector looks about right, but it's only for Windows and I don't have a Windows machine.

onekk wrote: Tue Aug 02, 2022 9:29 am
It is not so trivial, there are some free things around, a part of LinuxCNC, bCNC that is Python program that will send code to a GRBL machine, has a visualizer for the toolpath.

And there are many others around.

Personally I don't rely on "web services" as I don't know how my data are managed, so if the gcode is for something that could be in some sense "reserved", chances are that the data will remain around in some server, and maybe if you blindly accept to use "the service" your data are not your anymore.

Probably little paranoic, but...

Regards

Carlo D.
It's peculiar that this seems to not be a particularly common thing to do. I regularly end up with parts of paths I either don't need or would like to change the order, or what have you.

I don't like to rely on web services either, but it's mainly down to my workshop not having internet access, so if I have to change gcode on the fly, I would be out of luck.
spanner888 wrote: Tue Aug 02, 2022 1:26 pm bCNC has a pretty good graphical gcode Editor with the features you are asking for.

It is very handy to be able to do this level of editing in your gcode sender, but of course you are not forced to use it as a sender. The FreeCAD grbl postprocessor can even add header blocks compatible with bCNC, so you can easily find each FreeCADPath Operation and collapse of expand the code.
I'd love to be able to use bCNC, a friend of mine used it and it's actually quite nifty. However, I tried installing it on my Linux system and it didn't work, as far as I remember due to conflicting Python libraries. Basically, bCNC expected a certain version of a Pythojn library, which is very outdated, so I don't have it anymore, or something like that. It's more or less due to the fact that bCNC isn't really supposed to be used as a standalone program, I think. Maybe it's time to dust off that old RasPi I have lying around and see what happens when I install bCNC on it.
Jipe
Posts: 35
Joined: Fri Apr 08, 2022 4:45 pm
Location: Narbonne France

Re: Editing gcode with GUI?

Post by Jipe »

Hello,
I'd love to be able to use bCNC, a friend of mine used it and it's actually quite nifty. However, I tried installing it on my Linux system and it didn't work, as far as I remember due to conflicting Python libraries. Basically, bCNC expected a certain version of a Pythojn library, which is very outdated, so I don't have it anymore, or something like that. It's more or less due to the fact that bCNC isn't really supposed to be used as a standalone program, I think. Maybe it's time to dust off that old RasPi I have lying around and see what happens when I install bCNC on it.
I'm using bCNC on Ubuntu 18.04 and Python 3.6.9; it works perfectly. It is imperative to install it with the PIP command to obtain correct operation.

JP
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Editing gcode with GUI?

Post by herbk »

Hi,
i use Path WBs "Inspect Path Commands" for a first check.

Select a Operation and click at Inspect Path Commands Button, - a wIndow with the raw gcode lines opens.
Select a line of the gcode and it*s part of the path is shown in yellow at FC main window.
path.png
path.png (242.34 KiB) Viewed 1185 times
Gruß Herbert
User avatar
pathfinder
Posts: 315
Joined: Mon Oct 04, 2021 10:27 am

Re: Editing gcode with GUI?

Post by pathfinder »

Jipe wrote: Wed Aug 03, 2022 7:53 am Hello,
I'd love to be able to use bCNC, a friend of mine used it and it's actually quite nifty. However, I tried installing it on my Linux system and it didn't work, as far as I remember due to conflicting Python libraries. Basically, bCNC expected a certain version of a Pythojn library, which is very outdated, so I don't have it anymore, or something like that. It's more or less due to the fact that bCNC isn't really supposed to be used as a standalone program, I think. Maybe it's time to dust off that old RasPi I have lying around and see what happens when I install bCNC on it.
I'm using bCNC on Ubuntu 18.04 and Python 3.6.9; it works perfectly. It is imperative to install it with the PIP command to obtain correct operation.

JP
I'm on Arch, my Python version is 3.10.5. I think the OS built around bCNC is either Ubuntu or Debian based, so it would make sense that it works fine on Ubuntu. Maybe it's time for a second OS…

herbk wrote: Wed Aug 03, 2022 2:17 pm Hi,
i use Path WBs "Inspect Path Commands" for a first check.

Select a Operation and click at Inspect Path Commands Button, - a wIndow with the raw gcode lines opens.
Select a line of the gcode and it*s part of the path is shown in yellow at FC main window.
This may be somewhat controversial, but inspecting the code without being able to change it is of very limited use for me. I need a way to edit the code. For simple code, like an outline, a text editor works okay, and I've done it in the past. However, I regularly use 3d paths, so my code is usually very big and not particularly easy to handle via text editor.
Post Reply