Skip to content

Instantly share code, notes, and snippets.

View ryansturmer's full-sized avatar

Ryan Sturmer ryansturmer

View GitHub Profile
@ryansturmer
ryansturmer / config.json
Created October 12, 2015 15:51
Configuration file for G2 issue
{
"gco": 2,
"si": 250,
"1ma": 0,
"2ma": 1,
"3ma": 2,
"4ma": 3,
"5ma": 4,
"6ma": 5,
"1sa": 1.8,
N32G0Z0.80000
N33G0X11.74364Y1.50458Z0.20000F120.00000
N34G1X11.74364Y1.50458Z-0.26000F120.00000
N35G3X11.74443I0.00039J0.00000F60.00000
N36G2X11.86943Y1.62958I0.12500J0.00000F60.00000
N37G1X14.36786Y1.62958Z-0.26000F120.00000
N38G2X14.49286Y1.50458I0.00000J-0.12500F60.00000
N39G3X14.49364I0.00039J0.00000F60.00000
N40G1X14.49364Y2.05458Z-0.26000F120.00000
N41G3X14.49286I-0.00039J0.00000F60.00000
@ryansturmer
ryansturmer / tiny_circle.nc
Created December 9, 2015 19:33
Fails on G2 due to small circle.
N7 M4
N7 M8
N9 G4 P2
N14G0Z0.95000
N15G0X0.00000Y0.00000F119.40000
N16G0X2.31818Y3.29442Z0.20000F119.40000
N17G1X2.31818Y3.29442Z-0.12500F119.40000
N18G2X2.31880Y3.29408I0.00014J-0.00048F60.00000
N19G2X2.31846Y3.29346I-0.00048J-0.00014F60.00000
N20G2X2.31784Y3.29380I-0.00014J0.00048F60.00000
'----------------------------------------------------------------
'SHOPBOT ROUTER FILE IN INCHES
'GENERATED BY PARTWorks
'Minimum extent in X = 0.000 Minimum extent in Y = 0.000 Minimum extent in Z = -0.375
'Maximum extent in X = 10.000 Maximum extent in Y = 10.000 Maximum extent in Z = 0.000
'Length of material in X = 10.000
'Length of material in Y = 10.000
'Depth of material in Z = 0.375
'Home Position Information = Bottom Left Corner, Material Surface
'Home X = 0.000000 Home Y = 0.000000 Home Z = 0.500000
@ryansturmer
ryansturmer / install_fabmo.sh
Last active December 18, 2015 17:51
Clean install of the FabMo Engine for the Intel Edison
#!/bin/sh -vex
# To run as one-liner:
# wget https://goo.gl/JfLl3S -v -O fabmo_install.sh && chmod u+x ./fabmo_install.sh && ./fabmo_install.sh
# Stop running instances of the engine and updater
systemctl stop fabmo
systemctl stop fabmo-updater
# Clear out old installations
rm -rf /fabmo /opt/fabmo
@ryansturmer
ryansturmer / baby-chair.js
Last active August 17, 2016 16:33
Parametric Baby Chair
// Walter's Chair
var woodColor = [0.93,0.83,0.67];
function getParameterDefinitions() {
return [
{ name: 'seatDepth', type: 'float', initial: 12, caption: "Seat Depth" },
{ name: 'seatWidth', type: 'float', initial: 12, caption: "Seat Width" },
{ name: 'chairHeight', type: 'float', initial: 12, caption: "Chair Height" },
{ name: 'seatHeight', type: 'float', initial: 7, caption: "Seat Height" },
@ryansturmer
ryansturmer / back.stl
Created August 13, 2016 02:17
Chair Back
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryansturmer
ryansturmer / friction-joint.js
Last active August 20, 2016 04:05
Locking joint
function getParameterDefinitions() {
return [
{ name: 'detents', type: 'int', initial: 12, caption: "Detents" },
{ name: 'holeDiameter', type: 'float', initial: 0.25, caption: "Bolt Diameter" }
];
}
function main(params) {
var holeDiameter = params.holeDiameter;
var detents = params.detents;
@ryansturmer
ryansturmer / paint.py
Created October 15, 2016 03:34
Convert @PrimitivePic output to g-code for painting (quadratic bezier curves only)
import xml.etree.ElementTree as ET
import sys
import math
import re
import argparse
import os
def gx(n, x=None,y=None,z=None, f=None):
retval = ['G%d' % n]
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)):
@ryansturmer
ryansturmer / miter_panels.py
Created November 3, 2016 03:46
Functions for generating G-Code for mitered box panels
from math import cos, sin, tan, atan2, atan, pi
def gx(n, x=None,y=None,z=None, f=None):
retval = ['G%d' % n]
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)):
if b is not None:
if a == 'F':
b *= 60.0 # Feedrates in ipm not ips
retval.append(' %s%0.4f' % (a,b))
return ''.join(retval)