Maslow Home Maslow Community Garden Newsletter

I need samples of 'dodgy' GCode

Over the last few months I’ve been developing a GCode ‘linting’ utility. It’s not specific to the Maslow (it specifically follows the NIST spec), but I began developing it because of the issues I had with the GCode generated by the different software packages that we use.

The original forum thread for it is here:

Several of you have provided me with some awesome samples that have helped me to work out most of the kinks. But now I want to focus on one problem that we all seem to experience.

The Going-up-and-down-a-bit-and-then-moving-along Gertrude
Quite a lot of the software we use seems to have a peculiar habit of needlessly moving the Z-Axis up and down. The last release I did fixes this problem partially, now I want to tackle it properly.
If you have some GCode that does this, and are happy to share it, then please do so. It will help me find a way to eliminate this behaviour.

Gertrude? That is a funny autocorrection mistake. :joy:

Precisely the kind that Ben Elton built his comedy career out of.
(Hmm, lockdown … time to watch a lot of Blackadder)

1 Like

Ive got some g code that moves the z axis 3 times for every individual z axis move. How can I get it to you?

This might be a dumb question to some but how do you use this program. Norton says its a virus

Well … Norton’s would. This is an ‘unsigned’ executable. So you would need to find the way to bypass that. I haven’t used Norton’s in years so I wouldn’t know the correct steps currently.

The alternative is to do a pull from GitHub and build it yourself. But I appreciate that is a bit daunting for some people.

A private message (PM) through the forum works. That’s how some people have shared their files so far.

Many say Norton is a virus. Too many false positives, likely because all those “viruses” it’s catching make you feel good about spending all that money.

Reportedly making msi installers cuts down on the false positive rate, it seemed to work for gearotic (supposedly Norton finds designing gears erotic).

1 Like

Thank god I did not pay for it a simple uninstall and all is good … Thank You all for your responses

Is there a readme on how to use this program? Sorry its my second dumb question? I click on the exe. Screen pops up and goes away. I go to the command promp type the exe. and it Tells me it cant find my file, So I add my complete filepath. Thank you

Open up a command prompt.
Change to the folder where you put the .exe
And run it from there.

There are some instructions in the README.md in the GitHub repository itself (where you got the file from):

Any chance that GCodeClean will make it to WebControl? As a plugin or so?

1 Like

I would suppose there is always a chance, but it would need to be wrapped to be called from webcontrol. @md8n might have insight on how to do that and if it would be a good idea.

GCodeClean is a two part solution. There’s the ‘front end’ which is the actual command-line executable, and then there’s the library of all of the clean up routines. The only thing of real interest about the ‘front end’ is that it includes all of the default parameters that I’ve figured out over time, and also the default sequence of clean up routines that works best.

It could be ‘wrapped’ in several ways. It requires .Net Core (which runs on everything).

  • I could convert it to an ASP.Net Core project and then expose the functionality via an API, stick the thing in a Docker Container (running Ubuntu probably) and it would be just this ‘thing’, that you drop in.
  • Or I could just ignore Docker altogether, because .Net Core runs on everything…
  • Alternatively, it is a working library, but I haven’t tried calling .Net from Python (although I would be certain lots of people have).

.Net Core is not small, however GCodeClean works as a ‘streamed’ pipeline, so its memory consumption in operation is as small as I can make it. i.e. it will require more storage, but it won’t require more memory (to work).

1 Like

Hihi,. had to watch a couple of these clips. :slight_smile:

Precisely the kind that Ben Elton built his comedy career out of.
(Hmm, lockdown … time to watch a lot of Blackadder)

Just a follow-up. While I didn’t manage to generate any dodgy gcode I’ve been making kids number blocks on my non-maslow grbl controlled Zenbot Mini (6x7cm rounded corners blocks with a 60mm high number pocketed in the top of each one, and running the gcode cleaner on each file, 10 to 15k gcode lines on each (multiple blocks in each). No problems with the cleaned gcode, mini segment curves nicely turned into arcs. I was on the high side for feed rate/depth of cut for the curly maple I used and had some missed steps that will sand out, one more number to go that I may do uncleaned for a comparison.

Thanks for the effort!

Glad it worked.

There’s still some optimisation for me to do with this. Obviously I’m working on Z-Axis improvement at the moment. But I do really want to revisit this behaviour, because I know that there’s some really good optimisation improvements to be made here.

1 Like

Oh look there’s a minor bug fix release over there --> Command line utility to 'clean' GCode

1 Like

I managed to get some funny results. This is a set of nested squares done with increasing speeds from 100 to 500 mmpm, 4.5mm depth, 1.27mm doc done with Carbide Create. The unprocessed gcode runs as expected, the cleaned version runs does the last few passes with G0 instead of G1 which gets a bit miss-steppy. Pre and post cleaned files attached, along with the c2d (carbide create) file.

Speed100-500-4-5mm.zip (3.2 KB)

Thanks, I’ll have a look.