I tried searching the community posts before asking this,

I tried searching the community posts before asking this, but didn’t seem to find anything addressing it. I’m looking for tools to help with gcode optimization. I know this must be a common ask. I’m specifically looking to reduce frivolous g0’s. I’ve been keeping things pretty simple as I’m still learning. I created a simple lattice of hex paths, and while LW4’s opimization is pretty good out of the box, The gcode it generates isn’t quite optimized.

My creation path is Illustrator -> SVG -> LW4 -> GCode -> Cut

Any tips?

Would manually manipulating the gcode work? I found two links that may help…
http://xyzbots.com/gcode-optimizer/

@Abe_Fouhy Those are very cool! It’s clearly a pretty tricky problem, from the look of it. Example: I tried throwing this same gcode through http://xyzbots.com’s online tool. Here’s the optimized path it settled on: http://imgur.com/a/yGdu7 (G+ didn’t like my screenshot for some reason)

And here’s how LW interpreted that optimized Gcode:

Thanks, +Peter van der Walt. I appreciate the info. I’ll take a look at those github links as well. :slight_smile:

Optimization algorithms are tricky. Ones guaranteed to find the best path for all cases will finish after the heat death of the universe. Ones which run quickly produce bad results for many cases. How bad and which cases they do bad on vary between algorithms.

@Bob_Buechler Not sure if it’s still the same in LW4, but in LW3 the order of the objects (in your layers panel in AI) makes a difference to the order they are cut. Bottom most objects (in the layers panel) were cut first, then top most objects were cut last. You could have a play around with object order in AI layers & see if it makes a difference.

Thanks @Yuusuf_Sallahuddin_Y – I’ll give that a try. :slight_smile:

+Peter van der Walt – Good clarification, thank you. LW is just visualizing the gcode as it’s written. If the order of paths in the design tool dictate the order of operations in the resulting gcode, I’ll focus on improving things that way.

@Bob_Buechler @Yuusuf_Sallahuddin_Y +Peter van der Walt@Todd_Fleming ​ I am new to gcode. Is there a tracer program out there that snaps to paths and you can just click where you want the tool path to follow? Gcode seems like it is how we created sprites on the apple iie with the turtle. Seems like fairly easy code.

@Abe_Fouhy If I were a software developer, I would certainly be thinking about a way to build something exactly like that.

I talked to my buddy who teaches cad/cam and he said mastercam does this, but then again not everyone has 10k sitting around. He suggested looking at router, milling software to bring into laserweb as it is a bit more diy developed

@Abe_Fouhy “Is there a tracer program out there that snaps to paths and you can just click where you want the tool path to follow?” I don’t understand what you’re asking.

Let’s use LW as a hypothetical solution to g0 movement manipulation after the gcode has been generated. I could envision a workflow where you first generate the code like you do today, and then afterward you can click within the visualization to reprioritize paths manually.

@Bob_Buechler Exactly

@Bob_Buechler As Peter was saying earlier, you can technically do this with LW4 already by moving different paths from the file into different operations & setting their order. Not so practical when you have 200 paths, but in my opinion it’s all really about optimising your design in the first place. E.g. I make any internal cuts first, then outer shapes as a second operation.

It would be handy to be able to move specific objects up or down in the generated gcode priority, but not sure how practicable for the devs.

When I have lots of small parts I use http://illustrator.e-cut.ru/ nesting plugin for illustrator to optimise space with a bit of hand tidying up. I then put engrave/inner/outer cuts to separate layers. Then I just split each layer into groups of 4 colours from left to right. So in laserweb I’m loading 1 file with 12 different filters to set. Only worth the effort with really complex designs that you do multiples of

@oliver_jackson Thanks for sharing that set of plugins. Looks like something I might end up using.