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 c947b323ed update puzzle 2022-03-07 23:14:02 -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
IMG_20211208_194811847.jpg projecting side checkard board onto bed of CNC seems to be working, need to make it work for other side of cnc bed, then use those results to generate bed homography 2021-12-08 23:31:50 -06:00
IMG_20211210_215851830.jpg recovery files from laptop, gerbil sending started 2022-01-05 22:32:13 -06:00
LICENSE Create LICENSE 2022-03-04 12:51:34 -06:00
PatternToPrintForCnC_Charuco.png real picture now 2022-02-26 18:22:10 -06:00
README.md minor adjustments 2022-03-06 20:07:37 -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
cnc.jpeg projecting side checkard board onto bed of CNC seems to be working, need to make it work for other side of cnc bed, then use those results to generate bed homography 2021-12-08 23:31:50 -06:00
cnc.jpg recovery files from laptop, gerbil sending started 2022-01-05 22:32:13 -06:00
cnc2.jpeg left right detection working somewhat, need to refine what points corespond to real world points better 2021-12-19 18:03:11 -05:00
cnc3.jpeg next step is to work on interface to move svg arround 2021-12-20 17:45:42 -05:00
cnc4.jpeg add in estimate of plate angle to probing of plate 2022-02-24 23:04:21 -06:00
cnc5.jpeg real picture now 2022-02-26 18:22:10 -06:00
cnc6.jpeg make probing quicker, make zero be on knotch 2022-02-26 23:28:54 -06:00
cnc7.jpg concept working, need to fix right reference to shift down one square I believe 2022-02-27 23:47:10 -06:00
cnc8.jpg concept working, need to fix right reference to shift down one square I believe 2022-02-27 23:47:10 -06:00
cnc9.jpg z probing test...Minor updates 2022-03-02 23:39:35 -06:00
cnc11.jpg z probing test...Minor updates 2022-03-02 23:39:35 -06: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
cutPath.PNG update readme 2022-03-06 17:46:46 -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 update puzzle 2022-03-07 23:14:02 -06:00
test - Copy.jpeg homography with cv2 working with predefined, need to finish up to make it work with camera. I should make it with a grid of rectangles to be more exact possibly 2021-11-23 09:41:12 -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.jpeg homography with cv2 working with predefined, need to finish up to make it work with camera. I should make it with a grid of rectangles to be more exact possibly 2021-11-23 09:41:12 -06:00
test.nc sending of svf working 2022-03-06 23:28:21 -06:00
test.png homography with cv2 working with predefined, need to finish up to make it work with camera. I should make it with a grid of rectangles to be more exact possibly 2021-11-23 09:41:12 -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.

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

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

  • Polish this out, put it into actual CNC software
  • Implmenet in different language other than python, as python is not as responsive for this application
  • 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