Skip to content

Instantly share code, notes, and snippets.

View Octogonapus's full-sized avatar

:) Octogonapus

  • Leuko
  • 08:53 (UTC -04:00)
View GitHub Profile
@Octogonapus
Octogonapus / csgDatabase.json
Created November 30, 2017 16:23 — forked from madhephaestus/.gitignore
JavaCadExample
{
}
@Octogonapus
Octogonapus / 60t gear c channel mount.groovy
Last active December 9, 2017 23:49
60t gear c channel mount
import com.neuronrobotics.bowlerstudio.vitamins.*;
double shaftWidth = 6.5, shaftLength = 20;
double startRadians = Math.toRadians(0), endRadians = Math.toRadians(90);
double startRadius = 0.7 * 25.4, endRadius = 13 * 25.4;
double screwHoleRadius = 4.4/2;
double mountThickness = 21.5;
CSG gear = Vitamins.get("vexGear", "HS60T").movez(-12.7/2);
CSG shaft = new Cube(shaftWidth, shaftWidth, shaftLength).toCSG();
@Octogonapus
Octogonapus / ellipse-gen
Last active December 24, 2017 02:03
Place CSGs along an ellipse
CSG getEllipse(double xRadius, double yRadius, double z) {
List<Vector3d> points = [];
for (double i = 0; i < 2 * Math.PI; i += 0.01) {
points.add(new Vector3d((xRadius*yRadius*Math.cos(i)) / Math.sqrt((Math.pow((yRadius*Math.cos(i)), 2) + Math.pow((xRadius*Math.sin(i)), 2))),
(xRadius*yRadius*Math.sin(i)) / Math.sqrt((Math.pow((yRadius*Math.cos(i)), 2) + Math.pow((xRadius*Math.sin(i)), 2))),
0));
}
return Extrude.points(new Vector3d(0, 0, z), points);
@Octogonapus
Octogonapus / ast-explorer
Last active December 26, 2017 06:50
ast-explorer
import org.codehaus.groovy.ast.*;
import org.codehaus.groovy.ast.expr.*;
import org.codehaus.groovy.ast.stmt.*;
import org.codehaus.groovy.transform.*;
import org.codehaus.groovy.control.*;
import org.codehaus.groovy.control.customizers.*;
import com.neuronrobotics.bowlerstudio.scripting.GroovyHelper;
import com.neuronrobotics.bowlerstudio.scripting.IDebugScriptRunner;
import com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage;
import com.neuronrobotics.bowlerstudio.scripting.ScriptingEngine;
@Octogonapus
Octogonapus / getInsert
Created December 29, 2017 21:52
getInsert
CSG getInsert(boolean isRound) {
CSG roundPart = new Cylinder(10/2, 10/2, 1.2, 80).toCSG();
CSG shaft = new Cube(6.4, 6.4, 5.15).toCSG();
CSG axleHole;
if (isRound) {
double diameter = Math.sqrt(Math.pow(3.1, 2) + Math.pow(3.1, 2));
axleHole = new Cylinder(diameter/2, diameter/2, 5.15, 80).toCSG();
} else {
axleHole = new Cube(3.1, 3.1, 5.15).toCSG();
@Octogonapus
Octogonapus / structure_synth_test
Last active January 3, 2018 19:35
structure synth test
/*
Source Structure Synth code:
R1
set maxdepth 25
rule R1 {
{ x 0.5 rx 10 s 0.95 } R1;
{ s 5 } box;
@Octogonapus
Octogonapus / end1_fixed.stl
Last active January 6, 2018 19:50
Open Cable Chain Ends
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Octogonapus
Octogonapus / four_393_mount.groovy
Last active January 6, 2018 19:55
Mount for 4 393 motors with central output shaft
double baseX = 126, baseXTab = 12;
double baseY = 49, baseYArch = 60.5;
double baseZ = 20.5;
double hsAxleX = 6.35;
double screwRadius = 5/2;
double tabCutoutX = 20, tabCutoutY = 23;
double gearTooloffset = 2, motorToolOffset = 0.5;
Vitamins.setGitRepoDatabase("https://github.com/octogonapus/Hardware-Dimensions.git")
@Octogonapus
Octogonapus / camera_mount_left_half.stl
Last active January 8, 2018 16:32
Camera mount to threaded rod
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Octogonapus
Octogonapus / BowlerWorkCell.xml
Created January 12, 2018 22:28
BowlerWorkCell copy of HephaestusWorkCell
<root>
<mobilebase>
<cadEngine>
<git>https://gist.github.com/82d0c9c66a492cc30850143df6155833.git</git>
<file>seaLinkGen.groovy</file>
</cadEngine>
<driveEngine>
<git>https://gist.github.com/82d0c9c66a492cc30850143df6155833.git</git>
<file>WalkingDriveEngine.groovy</file>
</driveEngine>