This program provides a cut preview of your GCODE, where it will cut, by simply taking a picture of the CNC bed with your wood on bed
 
 
 
Go to file
unknown 56cf122f8c add one more feature 2022-03-12 10:42:28 -06:00
Originals recovery files from laptop, gerbil sending started 2022-01-05 22:32:13 -06:00
__pycache__ temp update 2022-01-13 18:48:35 -06:00
LICENSE Create LICENSE 2022-03-04 12:51:34 -06:00
Notes.txt removing controls on left for now 2022-03-09 22:27:53 -06:00
PatternToPrintForCnC_Charuco.png real picture now 2022-02-26 18:22:10 -06:00
README.md add one more feature 2022-03-12 10:42:28 -06:00
accuracy.PNG add one more feature 2022-03-12 10:42:28 -06:00
accuracy2.PNG add one more feature 2022-03-12 10:42:28 -06:00
actualCutFlattened.PNG add one more feature 2022-03-12 10:42:28 -06:00
callbackloghandler.py initial stab at sending G code with offset and rotated data, need to test out with actual machine 2021-12-28 18:54:25 -05:00
cnc12.jpg z probing test...Minor updates 2022-03-02 23:39:35 -06:00
cnc13.jpg loading of SVF working, need to make sending of svf work next 2022-03-06 00:05:49 -06:00
cutFinished.jpg add one more feature 2022-03-12 10:42:28 -06:00
cutPath.PNG update readme 2022-03-06 17:46:46 -06:00
cutPathOverlayedOnActualCut.PNG add one more feature 2022-03-12 10:42:28 -06:00
firstCut.PNG minor updates 2022-03-11 23:27:33 -06:00
firstCutZoom.PNG minor updates 2022-03-11 23:27:33 -06:00
gcode_machine.py initial stab at sending G code with offset and rotated data, need to test out with actual machine 2021-12-28 18:54:25 -05:00
gerbil.py initial stab at sending G code with offset and rotated data, need to test out with actual machine 2021-12-28 18:54:25 -05:00
howItWorks.PNG add pictures 2022-03-06 17:41:27 -06:00
interface.py initial stab at sending G code with offset and rotated data, need to test out with actual machine 2021-12-28 18:54:25 -05:00
pattern.jpg recovery files from laptop, gerbil sending started 2022-01-05 22:32:13 -06:00
puzzles.svg loading of SVF working, need to make sending of svf work next 2022-03-06 00:05:49 -06:00
puzzles2.svg update puzzle 2022-03-07 23:14:02 -06:00
realWorldGcodeSender.py minor updates 2022-03-11 23:27:33 -06:00
test - Copy.nc intermediate commit 2021-12-22 18:11:10 -05:00
test.gcode sending of svf working 2022-03-06 23:28:21 -06:00
test.nc minor updates 2022-03-11 23:27:33 -06:00
test.py ChArCo detection initially working 2021-12-19 00:25:40 -05:00

README.md

Overview

This program provides a cut preview of your GCODE, where it will cut, by simply taking a picture of the CNC bed with your wood on bed. I spend so much time trying to line up the machine with my work piece, making sure it won't intersect my clamps. Sometimes I hit my clamps, sometimes my bit goes off the workpiece or hits a soft limit, stopping my cut process.

Cut Path

Caviots

This was thrown together quickly to show the concept. Amazingly enough it seems to work. There are many future improvements that could be made with time. Before using, I need to do some serious clean up, documentation, and making easier to use by others.

I have 2 children at the moment, so my time is limited, I would love to see someone pick up the concept, roll with it and put it into CNC software.

Current features (all not pollished out, but mached up):

  • Overlay GCODE onto picture from camera
  • Can take camera picture at any angle (does not need to be overhead)
  • Determines 2D location of every pixel in the image, and displays that location in inches when you click there
  • Allows you to move GCODE and rotate GCODE to desired cut location
  • Can import SVGCODE and will cut SVG paths at specified depth per pass, cut rate, etc
    • ALlows quick and easy cutting of SVGs from boxespy website
    • Auto adds tabs to SVG (rough, slow, needs work, but mostly works)
  • Auto finds probe plate, and probes, XYZ location of the probe plate
  • Can draw on top of image to do on the fly cutting

Desired future features (Possible, just needs work, some are easier than others):

  • Polish this out, put it into existing gCode sender.
  • Draw with pencile or marker on wood, auto detect lines, CNC router cuts out.
  • UI to specify initial measurement of box locations
  • UI to calibrate setup, image to actual location.
  • UI to allow just Z probe, or XYZ probe
  • UI to speicy COM device, gCode file, svf file, etc.
  • Implmenet in different language other than python, as python is not as responsive for this application
  • Live update of where router is within the cut
  • Make UI much better, right not it is very rough
  • Make it so webcam is a live view of CNC bed rather than one time picture
  • Refactor code and make cleaner. I threw this together in spare time I had
  • Allow 3d rotating view to see Z height, and prevent things like first move being rapid traverse into your work piece
  • Camera calibration
  • Further evaluate accuracy, may need to put charuco markers directly on workpiece instead, or put charuco markers all along left and right side of Y axis beam.
  • Build in calibration of exact location of charuco markers

How it works

Open CV (computer vision SW) can detect pixel locations of boxes with tags on them (charuco markers). I put those markers on the vertical rails on the left and right side of the CNC bed. I use homography (built into openCV) to then project down to the CNC bed or top of my workpiece, getting those pixel locations on the left and right side of the CNC bed. With the pixel locations on the left and right side of CNC bed, their physical locations of those, we can determine the phyiscal location of any pixel on the image, and thus we can then overlay a GCODE path and where it will cut in the real world onto the image, getting a cut preview. How It Works