Jupyter Notebook as a CNC machinist notebook

(William Adams) #1

I’ve been trying to find something well-suited as a CNC machining notebook — Jupyter Notebook seems a good choice, so here are some thoughts, notes, and sample code.

Google has a server up: https://colab.research.google.com/notebooks/welcome.ipynb

Here’s a bit of code which will allow one to calibrate the machine for belt stretch per: http://docs.carbide3d.com/shapeoko-faq/how-to-calibrate-the-machine-for-belt-stretch/

#@title Calibration for belt stretch

Units = 'Millimeters' #@param ["Inches", "Millimeters"]

X = 40.0 #@param {type:"number"}
Y = 40.0 #@param {type:"number"}
Z = 40.0 #@param {type:"number"}

X_steps_mm = 40.0 #@param {type:"number"}
Y_steps_mm = 40.0 #@param {type:"number"}
Z_steps_mm = 40.0 #@param {type:"number"}

Measured_X = 40.0 #@param {type:"number"}
Measured_Y = 40.0 #@param {type:"number"}
Measured_Z = 40.0 #@param {type:"number"}

Calibrated_X = X / Measured_X * X_steps_mm
Calibrated_Y = Y / Measured_Y * Y_steps_mm
Calibrated_Z = Z / Measured_Z * Z_steps_mm

print ('Calibrated steps for X is: ', Calibrated_X)
print ('Calibrated steps for Y is: ', Calibrated_Y)
print ('Calibrated steps for Z is: ', Calibrated_Z)

(Daniel Story) #2

I’m looking to keep tool cut results in a notebook, how has Jupyter been working out for you @WillAdams?

Anyone else use Jupyter or some other medium, and willing to share?

(William Adams) #3

I haven’t used it for a long while — I think it would work out well, I just got frustrated that the online tool I was using wasn’t extensible AFAICT, and there hasn’t been any luck at getting OpenSCAD supported directly.

(Jonathan Anderson) #4

I was just using Jupiter today for work and considered that it might work well as a Copy notebook. I currently use OneNote, which works pretty well. It handles picture, audio, video, and text fine and will even do simple calculations for you in line. I don’t know how well Jupiter does at all that as I typically just use it for Python coding.