CNC machines are an essential part of the hacker’s toolset. These computer-controlled cutters of wood, metal and other materials can translate a design into a prototype in short order, making the process of iterating a project much easier. However, the software to create these designs can be expensive, so [Franklin Wei] decided to write his own. In particular, he decided to write his own program to engrave images, converting a photo into a toolpath that can be cut. The result is RasterCarve, a web app that converts an image into a GCode that can be fed into a CNC machine.
The motivation for this project was to learn how to do it, but also frustration at the cost of software such as PhotoVCarve. Costing $149, this program does much the same as the one written by [Wei], albeit with a number of additional bells and whistles. He does an excellent job of describing how the conversion process works: his code creates a series of paths across the image, then converts the color of each pixel into a depth: The darker the image, the deeper the cut.
He also describes the process of taking this simple code and converting it into a Javascript web app, a process that has driven many a programmer to madness. It just goes to show that, although using other people’s stuff is fine, it often makes sense to try and do it yourself.
I admire this and I particularly think it’s cool that it’s been released as a web app. I know windows-only people who could use this. I will note that http://linuxcnc.org/docs/2.5/html/gui/image-to-gcode.html does the same thing from inside linuxcnc, and has a lot of bells and whistles.
Image2gcode is a standalone python script that LinuxCNC knows how to call.
https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/usr_intf/axis/scripts/image-to-gcode.py
It should be usable on just about anything.
No connection to him apart from using it successfully over a number of years but scorchworks has been releasing under the GPL & updating dmap2gcode which is packaged as a standalone program and based on image2gcode & comes in a windows version also.
http://www.scorchworks.com/Dmap2gcode/dmap2gcode.html
It doesn’t hurt to have more options, but the commercial paid for software like in the HaD description is far from the only option that’s been available.
I guess bCNC can do this (and much more):
https://pypi.org/project/bCNC/
https://github.com/vlachoudis/bCNC/
Doesn’t Laserweb do this?
Isn’t this basically a lithophane? There’s a ton of free/opensource apps, both local and online, that does this and exports an STL which you can then import into your usual pipeline instead of needing to input all the parameters into the webtool. A great example: https://github.com/MarkDurbin104/3dp.rocks
I admire the desire to learn and finishing a project, but this seems more like a learning experience then an actual usuable product
I’m all for more people learning so we can all have more tools!
Author here — I was wondering why my site was seeing a surge of traffic :)
RasterCarve is not meant to be a do-it-all Swiss army knife, and I’m aware that it is far from being the first program to do what it does. Its value-add, I believe, comes in the form of broad accessibility as a web app. With RasterCarve, a user can start engraving in just a few clicks, with no need to 1) purchase software or 2) deal with the complexities of a local installation.
I as a CNCer appreciate the hard work, but not a big fan of WEB app. I would rather download and use locally,
Another free project to convert images -> gcode is HoruCNC. Hosted on github
https://github.com/freegroup/HoruCNC/tree/master/examples/cupcake
Has some filter based on OpenCV to modify the image before creating the gcode.
Thank you Franklin Wei for developing this easy to use, web based tool. The web based approach is perfect as my projects cross many OS platforms. Thank you again for providing a tool that helps me explore different creative ways to express art without having to worry about systems and compatibility.