Changing Youngsters’ Hand-Drawings to G-Code


[Martin Raynsford] wrote a program that converts a black-and-white 2D image to G-code in order that his laser printer might then etch the picture. Not glad with simply that, he used his laser printer to make a scanner that consists of a stand for his webcam and a tray under it for positioning the paper good. The end result was one thing he took to a current Maker Faire the place many youngsters drew footage on paper which his system then scanned and laser etched.

Screenshot of Martin's scanning and G-code maker program  Changing Youngsters’ Hand-Drawings to G-Code screenshot of program
Martin’s scanning and G-code maker program

[Martin’s] program, written in C#, does the work of taking the picture from the webcam utilizing OpenGL and scanning it line by line on the lookout for pixels that surpass a distinction threshold. For every appropriate pixel this system then produces G-code that strikes the laser to the corresponding coordinate and burns a gap. Wanting on the supply code (downloadable from his webpage) it’s clear from commented-out code that he did loads of experimenting, together with various the laser burn time based mostly on the pixel’s brightness.

Whereas it’s plenty of enjoyable scripting this code as [Martin] did, after the break we speak about some off-the-shelf methods of carrying out the identical factor.

One option is to use software such as MeshCAM or VCarve, each of which can take a picture, permit you to do some modifications relying in your device, and output G-Code. Within the video under, jewellery is made beginning with a paper drawing. A telephone digital camera acts because the scanner and minor tweaks are made in Photoshop. From there the ensuing AI file is introduced into MeshCAM for extra preparation and eventually the G-Code. On this instance the jewellery is reduce out of brass on a CNC machine.

In case your CAD program has a tracing function then an alternative choice is to load your picture into Adobe Illustrator, reserve it as an AI file, after which load that into you CAD program. In there you’d hint the 2D picture after which use the CAD program to control the end result to one thing applicable on your software.

And if you wish to see one other instance a DIY G-Code generator, take a look at this free 3D-modelling software Blender add-on called Blender CAM.

Thanks [Martin] for the tip!



Source link

Did you enjoy this post?

Please leave a comment below...

Join the conversation and give me the feedback. If you have any questions I'll be more than happy to answer those as well...

Your email address will not be published. Required fields are marked *