Guide for Converting Pictures Into Stylized SVGs Suitable for Plotting

I posted over on the “Things Ive Made” section about an image I made using a python extension I found. There was interest in a guide on how to do it so I figured id make a nice tutorial so that other people can generate these for their machine. This seems like the best section since the guide is all software use.

The Guide can be found here, Its rather long as i tried to be as thorough as possible.


Example Images
[attachment file=71568]
[attachment file=71567]
[attachment file=71569]


That is a very thorough tutorial. Is python in windows really that hard? Can’t you use the subsystem for linux, or cygwin or mobixterm? It’s been a while since I tried. No wonder I get nasty looks when I say it’s easy in Python.

Speaking of which. Making the a python scruot that just removes the () comments would be pretty easy :slight_smile:

Python in Windows 10 is pretty awful. Python itself is great. It’s windows 10 that’s the problem.

It’s been ages since I’ve done anything with Cygwin I suppose it’s a possibility but that’s pretty far out of my wheel house.

I’m not by any means a programmer. Even script kiddie might be overselling my programming experience. I dabble enough to eventually usually sometimes get things to work which is definitely the case here.
I know that GcodeTools has a field for a “postprocessor” and I’m wondering if it’s actually asking for the location of a script. Might be worth checking out.

I considered writing either a batch script or, since I had a shiny new python install to play with a python script to do the post processing but ended up just recording a macro in notepad++ haha. If I end up doing a lot of these it might be worth making a stand alone script though.

For what it’s worth, a PR making Marlin (optionally) ignore () comments has been integrated recently. That could ease a bit the process (cf. ). I’m also considering writing an update to have G0 make fast moves instead of feed-rates moves…

It doesn’t even have to be fast moves, it just needs to have it’s own memory for tue F parameter.

G1 Z5 F300
G0 X100 F3600
G1 Z5

Will currently move the Z at 3600. What EstlCAM (and I’m guessing a lot of CAM) does by default is just set G0 F3600 at the top and then expects it to remember that for all other travel moves. It doesn’t expect a G1 F to change it.

Great wrap-up !!!


Also, the python scripts don’t seem too difficult to translate to another language… JS ? (But I won’t have time to do it. a SHAME, they seem really good).

Hmm, I’ve got Visual Studio on my machine and the build and installs both seemed to go through with only a bazillion warnings… I haven’t done more than just execute those though.

The scripts seem to work fine on my Linux box… though editing the code makes it a bit less user-friendly than it could be. A real Python guy could probably fix that in a heartbeat… [hint, hint…]

I used Inkscape and the JTech laser plugin… makes it really simple to generate gcode for recognizable images engraved in just a few minutes.

[attachment file=71826]

[attachment file=71825]

A couple more Inkscape/Jtech laser engravings… ornaments/gift tags, pendants, are all very doable. Still need to play around with feeds and power levels but all in all I’m quite pleased.

[attachment file=71929]

[attachment file=71930]

[attachment file=71931]

1 Like

Wow, so I am loving this. It seems like this is actually a really good way to get pictures out of the laser really fast. As in the perfect in between of a raster and vector picture both in terms of speed and how recognizable it is. On top of that it looks great a cool style.

All 4 of those first pics are clear but each has it’s own character. I think we will be seeing a lot more of this.


Here you are :slight_smile: (waiting for the merge, but the PR is here :slight_smile: )

1 Like

Glad to see people are getting it to work. I was curious to see how a laser would do. Looks great.

1 Like

DUDE! you got the fix pushed! whoa. I think all post processors are going to be much easier to deal with now, that is huge! Thank you!

It does indeed fall between vector and raster and can be adjusted to give more, or less, detail… but most recognizable. I’m having fun playing with it…

[attachment file=72026]

[attachment file=72028]

[attachment file=72027]

[attachment file=72030]

[attachment file=72029]

[attachment file=72031]

– David


Ryan : Was pushed, but today it’s been merged into bugfix-2.0.x :wink: (not sure if I should add oan other option to manage G0 as strictly MAX_FEEDRATE )

dkj4linux Great ! What do you use to adjust the detail level ? change the 4 level parameters ?

(I SO see a webpage do this, just like what has been done for Sandify)




Hooray! I think how it is now makes a ton of sense, but I also see GMagicians point. I don’t think anyone will try to configure it with a strict MAX FEEDRATE unless their CAM really required it. The CAM would be pretty crazy to need that though.

I’m just happy that it got merged so fast. It’s quite the moving target, Marlin.

Sandify is client side JavaScript though. You’d have to rewrite the code to be able to run it in a webpage. It would be a good software engineering project though. Otherwise, your spending a lot of money on servers that can run the python in the background.


I’m far from knowing what I am doing with this. I can’t really find a good description (that I can understand) of all the parameters for each of the drawing types; sketchy, spiral, and crossed. I’m not crazy about the sketchy one, so have played only with crossed and spiral. There are some example scripts, however, so have simply played with them a bit… spiral is the easiest I think.

For the engravings I’ve shown the only things I’ve adjusted are (1) brightness/contrast/scale of grayscale source picture, (2) laser power and feed, (3) for spiral, the nib-size and line spacing parameters, (4) and final scaling in Inkscape. Cereal-box cardboard and craft sticks make nice test material and I’ve done all these with a Banggood 3.5 watt laser, using Inkscape with JTech laser plugin.

[attachment file=72211]

[attachment file=72210]

– David


I was able to follow these directions using the linux subsystem for windows (on windows 10) with no modifications. Worth a try.

In the instructions where you write the small py script to output a file, I’d suggest changing the output to

so you don’t have to fuss with the linux -> windows file system access shenanigans.



I created a simple web app to handle playing with settings

it’s in pretty rough shape but it’ just barely works. I welcome PR’s and contributors :slight_smile:

1 Like