Process to Utilize and Measure Irregular Scraps From Your CNC Router, Laser Cutter, Plasma or Water-jet Projects.

by caddzeus in Workshop > CNC

5392 Views, 66 Favorites, 0 Comments

Process to Utilize and Measure Irregular Scraps From Your CNC Router, Laser Cutter, Plasma or Water-jet Projects.

P1000179.jpg
CoverResult.jpg

I often end up with irregular scrap pieces from my CNC router projects, so I came up with this method, utilizing the free software GIMP and Inkscape, to recapture the useful areas for later use. This method works well with any flat stock material commonly used with CNC routers, laser cutters, CNC plasma or water-jet machines.

Supplies

camera.jpg
computer.jpg
gimp.jpg
inkscape.jpg
  • Camera - I use an older Panasonic Lumix GH2 and get great results.
  • Computer
  • Free Software - GIMP and Inkscape. This process will work with other software such as Photoshop and Illustrator. If you're familiar with paid software, you should have no problem following along and substituting the appropriate commands.

Making Targets

P1000390.jpg
P1000393.jpg
P1000369wText.jpg

The first step in the process is to create the targets necessary to get an accurate result. These can be custom built for a specific machine, a small hole cut in a piece of scrap or even marked in the subject material using the machine itself. This last method works well if you have a rectangular exterior shape to your scrap material.

Setup for Photo

angleDims set1.jpg
angleDims set4.jpg

The main goal here is to create a rectangle of targets surrounding the part, with known distances, and the target height to be the same as the top of the stock to be measured. Using the machine to make reference points on the bed is likely the best. I've also used an old wall calendar as a base that's accurate and square when I have a smaller piece of scrap to measure.

Taking Picture

anglePicture.jpg
angleDrawing.jpg
poor.jpg
contrast.jpg
shadow.jpg
angleDims set1ReferenceMarks.jpg
  • After setting up the rectangular targets around the stock, it's time to take the picture. The key here is to capture the entire target area in a clear image taken at about a 45-degree angle. If the angle is too high, it can be difficult to make out the edges of the material when tracing later in Inkscape.
  • Lighting can be key to help distinguish the top from the sides on some materials. (mdf, solid surface, etc.) Having a light above and on the opposite side of the camera helps create a shadow on the vertical faces toward the camera, assisting in top to side contrast. Don't use a flash as it will remove this shadow.
  • For particularly difficult materials to distinguish (MDF stock on a MDF bed), you can mark the edges of the stock with the side of a pencil or marker, creating contrast. I like placing sheets of paper under the MDF stock to help the edges stand out. Be creative. Contrast is key.
  • In addition, consider creating two reference marks on the face of your stock. You can later use these two positions in Inkscape and your CAM package to help align your stock and place it on your machine for cutting. In the sample I'm using for this project, I only need the larger area to the right. At a later time, if I need to use the smaller area to the left, then I won't need to repeat step 4 of this process. If you plan on using the entire piece of scrap and the scrap was clamped to your table when you took your photo, then it is possible to use the targets themselves as a reference to zero the machine. If you use this method, be careful not to move the stock or targets before your machine is setup or you'll have to start over with a new photo. I will go with the reference marks on the face of my stock for this project.
  • Accurately note the dimensions of the length and width of the target rectangle. This will be needed later in Inkscape to scale the image.

Remove Perspective With GIMP

Instructable Video Step 4: Remove Perspective With GIMP
1-settings.png
zoom4.png
2-corner1.png
3-corner2.png
4-corner3.png
5-corner4.png
6-save.png
  1. Open the image file in GIMP.
  2. Select the perspective tool from the Tools menu, Transform Tools, Perspective or use the shortcut Shift+P.
  3. In the Tool Option menu to the left, set the Direction to Corrective (Backward), the Interpolation to Linear, and Clipping to Clip. I prefer to leave the Show image preview off, and the guides set to Rule of thirds. You'll also want to leave off the Constrain handles and Around center check boxes.
  4. After setting these options you simply move the mouse to each corner, click and drag the handle to the target of the corresponding marker point in your image. Use the zooming function (ctrl+mouse scroll wheel) to achieve greater accuracy. After you're satisfied with the locations, click the Transform button in the Perspective popup to see the corrected image.  
  5. Now save your image using the File menu, Export As... option. In the Export Image dialogue box, give your file a name, select the location, and click the "Select File Type (By Extension) option at the bottom to choose your file type. Either JPEG or PNG will work well for the following step. When you're ready, click the Export button in the lower right to finish the save.

At this point, the perspective has been removed for the top plane of your object but the scale and aspect ratio are not correct. We'll take care of that in Inkscape in the following step.

Correct the Scale and Define Areas With Inkscape

Instructable Video Step 5: Correct The Scale And Define Areas With Inkscape
1-unitSetup.png
2-dragGuides.png
3-setHguide.png
4-recordedDims.jpg
5-setVvalues.png
6-insertImage.png
7-imageFixed.png
8-traceReference.png
9-save1.png
  1. After launching Inkscape and starting a new document, go to the File menu and select Document Properties to set your preferred units, which is in the Page tab, General, Display units:. Page size is irrelevant for our use. After selecting your preferred units, you can exit the Document Properties.
  2. Next, create two guides by clicking and dragging once from each ruler located at the top and left side of the drawing area. Place them anywhere for now. 
  3. Hover over the horizontal guide until the cursor changes to a “hand” and the guide highlights to red, then double click the guide to open the guideline properties dialogue box. Set the “x” and “y” values to 0.00 and select the “Locked” check box. 
  4. Next, double click the vertical guideline as before and set the “x” and “y” values to the measurements taken from your target rectangle earlier during the photo process. Note the tiny x's on the guide lines. These will be the upper left and lower right corners of the image exported from GIMP.
  5. After setting up the guides, go to the File menu and select the Import option. Navigate to, and select the image you saved from GIMP with the perspective removed and image cropped, and click Open. "OK" the defaults in the following pop-up. The image will be placed somewhere in the drawing area.
  6. Click and hold anywhere inside the image and move the image until the upper left corner of the image “snaps” to the tiny “x” of the horizontal guideline. Next click and hold on the diagonal arrow outside the lower right corner of the image and drag it to “snap” to the tiny “x” on the vertical guideline.  
  7. You now have a background image, with the perspective removed and scaled accurately to the stock you want to use. Now it's simply a matter of using the “Draw Bezier curves and straight lines tool (shortcut “B”) to trace the outline of the area you want to use for your next project as well as any reference marks you made. You can click and drag to create curves or simply click to create straight line segments around your areas of interest.  
  8. After you're satisfied with the tracing, go to the File menu and select Save As. Choose your file location and name, then choose the “Desktop Cutting Plotter (AutoCAD DXF R14)(*.dxf)” option in the “Save as type:” pull-down. This file type is critical for the scale to work properly in some CNC programs such as Fusion 360. In the following dialog make sure no check boxes are checked and that the Base unit: is set to the same units as your Inkscape file and your CAM software. The rest can be left as default. Click OK to save your file.  
  9. You're now ready to import the DXF file into Carbide Create, Vcarve, Lightburn, your cutting program of choice or my personal favorite, Fusion 360. Remember to use the reference marks on the stock to align your piece on the cutting bed and set your origin.

As a bonus, in the following step, I'll run through the process of importing the dxf file into Fusion 360 and cutting a part I need for one of my projects.

Sample of Using the Output With Fusion 360

Instructable Video Step 6: Sample Of Using The Output With Fusion 360
1-insertDXF.png
2-rotateB.png
3-rotateA.png
4-sketchStock.png
5-extrudeStock.png
6-sketchNewPart.png
7-extrudeNewPart.png
8-setup.png
9-machine.png

This is not meant to be a detailed explanation of running Fusion 360, but an outline and quick example of how this method is used in conjunction with this amazing software.

  • Start a new Fusion 360 file.
  • Start a new sketch on the XY plane.
  • Insert the dxf file.
  • Rotate the sketch so that the reference line aligns with an axis.
  • Use the reference line to create a “stock” body.
  • Sketch your part in relation with the dxf sketch.
  • Manufacture your part as necessary.
  • Please watch the video for the entire process.