How to generate gcode from vector?


#1

Hi all -

The software that comes with the Mooz generates a raster file when you try to create a laser engraving gcode file. While this allows you to create gradients, it’s incredibly inefficient for most prints, since they’re mostly white (negative space).

I followed the instructions here:
https://www.norwegiancreations.com/2015/08/an-intro-to-g-code-and-how-to-generate-it-using-inkscape/
to create a gcode flie directly from vector - which creates a nice, quick file that traces the lines directly, rather than going back and forth and back and forth.

When I put it on the card, set the zero point, and started the print, the head followed the path very nicely - wonderful! - but the laser never turned on. Bummer!

As you can see on the page above, it assumes that a negative z value means “turn on the laser” if you’re using an engraver. Is that in fact how the Mooz interprets gcode to turn the laser on?

Has anyone had any luck using vector files to generate gcode?

Thanks!


#2

Update:

This is a test print with the laser engraving head on my Dobot Mooz 2. The top print is with the original laser that came with the machine - it’s 0.5W.

I recently ordered an upgraded laser, 1.5W, which did the bottom print. They were printed off the exact same file, which moved the laser at about 600 mm/min. The prints took about 5 minutes each. You can speed it up or slow it down to get a darker or lighter print, but obviously that affects print time.

The other cool thing about this print is that it came from a vector file. The software that comes with the machine will take in an image and print it raster style - back and forth and back and forth over the whole print area - wasting most of it’s time with the laser off, and giving the whole thing a bit of a pixelated look. A print this size would have taken hours the old way.

Obviously I’m still figuring out the software - those extra lines snaking across the image are because I haven’t figured out how to tell it to turn the laser off when it needs to “pick the pencil up” and move to a new position. Sorting this out is my next priority. If anyone knows the ins and outs of LaserWEB I would appreciate the help. It looks like you need to use the S parameter to G1 commands to set laser intensity, from 0 to 255 (100%).

I also suspect there are settings I can use to create grayscale lines, so hope to figure that out as well.


#3

Figured it out - you need to put
Tool off:
G1 S0 ; tool off

Tool on:
G1 S255 ; tool on

In the appropriate blocks.
Still haven’t figured out how to get it to do greyscale.


#4

Top one is a vinyl sticker, bottom one is a slate coaster.


#5

I guess if S0 means 0% and S255 means 100%, S128 will mean 50% and so on.


#6

I thought so - but Laserweb didn’t seem to do that. I’m still trying to figure out how to get it to turn down the laser intensity.


#7

Found it - in Laserweb -> Settings -> GCode
Laser Intensity: S
Intensity Separate Line: ON <— this is the important bit
PWM Min S Value: 0
PWM Max S Value: 255


#8

image