Skip to content

Instantly share code, notes, and snippets.

View madhephaestus's full-sized avatar

Kevin Harrington madhephaestus

View GitHub Profile
@madhephaestus
madhephaestus / grabtest.groovy
Created February 3, 2020 16:39 — forked from keionbis/grabtest.groovy
grabtest.groovy
// https://mvnrepository.com/artifact/net.java.dev.jna/jna
@Grapes(
@Grab(group='net.java.dev.jna', module='jna', version='4.2.2')
)
println "test"
return null
@madhephaestus
madhephaestus / RBE 200x Foam.groovy
Last active August 13, 2019 13:48 — forked from zseker/RBE 200x Foam.groovy
Adding new file from BowlerStudio
double z =70;
CSG breadboard = new Cube(85,// X dimention
55,// Y dimention
z// Z dimention
).toCSG().toXMin().toYMin().toZMin()
CSG cableBox = new Cube(190,// X dimention
@madhephaestus
madhephaestus / magazineDisplay.groovy
Created June 21, 2019 15:05 — forked from jyxiao1/magazineDisplay.groovy
3d model of a laser cutting template for a display
import java.lang.Math;
import eu.mihosoft.vrl.v3d.ext.quickhull3d.*
import eu.mihosoft.vrl.v3d.Vector3d
//Your code here
tierWidth = 145.625;
tierOverhang = 10;
tierThickness = 2;
tierHeight = 47.0202 + tierOverhang + tierThickness;
tierGap = 20;
@madhephaestus
madhephaestus / DefaultDhSolver.groovy
Last active June 21, 2019 21:25 — forked from NotOctogonapus/DefaultDhSolver.groovy
InputArmBase_copy copy of InputArmBase
import java.util.ArrayList;
import com.neuronrobotics.sdk.addons.kinematics.DHChain;
import com.neuronrobotics.sdk.addons.kinematics.DHLink;
import com.neuronrobotics.sdk.addons.kinematics.DhInverseSolver;
import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR;
import com.neuronrobotics.sdk.common.Log;
import Jama.Matrix;
import com.neuronrobotics.kinematicschef.InverseKinematicsEngine
import eu.mihosoft.vrl.v3d.svg.*;
import eu.mihosoft.vrl.v3d.Extrude;
File f = ScriptingEngine
.fileFromGit(
"https://gist.github.com/cgstephenson/3d23388d5b5db75be3c217d79ffcda88",//git repo URL
"master",
"airFoil.svg"// File from within the Git repo
)
SVGLoad s = new SVGLoad(f.toURI())
double wheelRadius = 33.0/2.0
wheelHeight=17.6
double radius = 6.0
CSG profile = new RoundedCube( wheelRadius,// X dimention
radius,// Y dimention
wheelHeight// Z dimention
)
.cornerRadius(radius)// sets the radius of the corner
.toCSG()// converts it to a CSG tor display
.toXMin()
import java.io.File;
import com.neuronrobotics.bowlerstudio.robots.FormacarumRover;
import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngineWidget;
import com.neuronrobotics.sdk.common.DeviceManager;
import com.neuronrobotics.sdk.dyio.DyIO;
import com.neuronrobotics.sdk.util.ThreadUtil;
//run the rover initialization scripts, ignore the display returns
ScriptingEngineWidget.inlineFileScriptRun(new File(System.getProperty("user.home")+"/git/9bbfbcae11130cdd4c3d/RoverStartup.groovy"), null);
@madhephaestus
madhephaestus / GCODEDemo.groovy
Last active June 1, 2016 19:53
GCODE devices demonstrated
import com.neuronrobotics.sdk.addons.kinematics.AbstractLink;
import com.neuronrobotics.sdk.addons.kinematics.DHChain;
import com.neuronrobotics.sdk.addons.kinematics.DHParameterKinematics;
import com.neuronrobotics.sdk.addons.kinematics.DhInverseSolver;
import com.neuronrobotics.sdk.addons.kinematics.LinkConfiguration;
import com.neuronrobotics.sdk.addons.kinematics.LinkFactory;
import com.neuronrobotics.sdk.addons.kinematics.LinkType;
import com.neuronrobotics.sdk.addons.kinematics.MobileBase;
import com.neuronrobotics.sdk.addons.kinematics.gcodebridge.GCodeHeater;
import com.neuronrobotics.sdk.addons.kinematics.gcodebridge.GcodeDevice;
@madhephaestus
madhephaestus / DH-Solver.groovy
Last active March 6, 2017 22:26
Example Physics Walker
import java.util.ArrayList;
import com.neuronrobotics.sdk.addons.kinematics.DHChain;
import com.neuronrobotics.sdk.addons.kinematics.DHLink;
import com.neuronrobotics.sdk.addons.kinematics.DhInverseSolver;
import com.neuronrobotics.sdk.addons.kinematics.math.TransformNR;
import com.neuronrobotics.sdk.common.Log;
import Jama.Matrix;
return new DhInverseSolver() {
@madhephaestus
madhephaestus / Paulas_Giraffe.xml
Created May 5, 2016 04:18
Paulas_Giraffe copy of DogRobot
<root>
<mobilebase>
<cadEngine>
<git>https://gist.github.com/6ec266cd72cf57e22f9026e8c15ca636.git</git>
<file>ThreeDPrintCad.groovy</file>
</cadEngine>
<driveEngine>
<git>https://gist.github.com/a8423ccd585c8de046dd41636c2e8596.git</git>
<file>Walking.groovy</file>
</driveEngine>