Friday, February 26, 2021

Preparing scanned drawings for the laser cutter

This is a workflow for taking a drawing (or anything printed) on paper, creating a vector outline around the drawing, removing any interior objects, and setting the colours for proper cutting, scoring and engraving on a laser cutter.

Recently Junior Kindergarten students wanted to design and test their own boomerangs as part of a unit on Australia. I thought it would be fun if they drew their own boomerang shape they were cut out on 1/8" plywood. Typically, my workflow would use Adobe Capture. It's a fantastic app that identifies drawings and converts to vector SVGs that you either save to your Adobe cloud library, or export via file ready to Airdrop or save to iCloud, Drive or whatever. 


As wonderful as Adobe Capture is, it only has basic editing features like an erase or adding lines or crop. It would take too long to manually reduce the wide sharpie lines to one cutting lines. Student names also appeared inside the boomerangs so I would need to import SVGs into Illustrator to re-code those lines as engravements or scoring lines so I might as well stick to Illustrator as my main workhorse.

The first step was to scan the drawings. Luckily our photocopiers have sheet feeders and can email multipage files. Unluckily, they can send PDFs and cannot send multipage image files like PNG or TIFF files. I made sure to increase the contrast so the black sharpie really stood out agains the white paper. Once I received the PDF I had to export each page as a separate image file. Mac's Preview cannot do this; it instead exports images as multipage PNG files which doesn't work well with Illustrator.

Adobe Acrobat CC does this well and quickly but I don't have it installed as a result of a hard drive purge I did recently. So, I built an Automator workflow. Note the RGB colour model. Ensuring all ingestion is done with RGB models will make our laser cutter colour palettes match in Illustrator later.

In Illustrator, I set the artboard size to 12"x20" which is the size of our laser cutter size. This is useful to get a good sense of scale and to help arrange all images once we're done vector-izing. DO NOT open the PNG or PDF files using the File > Open command: this will probably incorrectly set your colour models and artboard sizes. Instead, use the File > Place command. I did three images at a time so I had room to work.

In hindsight, it probably would have been quicker to trace over the line drawings using the pen tool but that would add my own (terrible) drawing skills into the mix and remove the authenticity of their own lines. Plus, they wrote their names in the middle and I didn't want to trace over those lines!

Instead, I used Image Trace. Click one object adjust the options as needed. I used the Black and White Logo preset. Illustrator will suggest rasterizing the images before image tracing but I didn't really notice a difference. It will also warn it will take a long time but it's lying.

Once done, click Object > Image Trace > Expand. You can now use the Direct Select tool (white arrow) to select individual lines or use the Selection Tool (black arrow) to move your object. Since I own the originals and probably will not make any modifications down the line I didn't bother with making any copies or working with duplicate layers; I made all the following changes to the master.

Notice how there are two paths for each Sharpie line. Because the line is so thick, Illustrator has traced the outside line and the inside line. If we sent this to the laser cutter as-is we get a hollow outline of the boomerang since it would cut both lines. To make it very easy to identify and see I tried to clean up the image so anyone getting the vector file later on can see there is only one cut line.

Select the outer line and click Object > Path > Outline Stroke. Then, in the Pathfinder window, click Unite. Now Object > Path > Offset Path. Find an offset adjustment that works for your object.

You should be able to direct select any paths that do not belong and delete them, leaving only the outside outline that we have offset. Take note of the Fill and Stroke colours and which objects you are selecting! When done deleting you can colour the outline stroke to whatever your laser cutter requires. In my case, I used red:


The boomerang above is ready to be laser cut. I opted to leave the name filled with black so I could have it engraved. I later changed my mind and outlined those names as well so I could score them; this reduced cut times quite significantly! It also had the unintentional effect of giving me more space on my bed/artboard to place objects since my laser cutter needs about 1" on each side so the laser head can slow down when engraving. It doesn't need this headroom when scoring or cutting.

Some boomerangs needed some additional cleaning up. Some Sharpie lines were quite jagged and if printed would create pretty sharp edges. Not great when 4-year olds are throwing these, no matter how carefully you setup the test range! For these, I selected the outline and smoothed out the anchor points with Object > Path > Simplify. Be careful not to reduce to too few points: you may actually increase the pointy bits inadvertently!

Scan to Image Trace to simplifying the outer path. You can see the smoothness and reduction of points.

You can now organize, place, export these objects however you'd like. I opted to place as many boomerangs as I could on the artboard/bed since I could rotate and slot them in like Jenga pieces. I actually spend too much time on this, and this time wastage doesn't really translate well when I realize I've saved a few square inches of plywood that is only a few cents worth.