Skip to content

Instantly share code, notes, and snippets.

@Octogonapus
Last active February 24, 2018 06:45
Show Gist options
  • Save Octogonapus/d3ada0fc0e5973b27565a2b4a7725755 to your computer and use it in GitHub Desktop.
Save Octogonapus/d3ada0fc0e5973b27565a2b4a7725755 to your computer and use it in GitHub Desktop.
antweight combat robot base
def motorDiam = 35, motorLength = 35
CSG motor = new Cylinder(motorDiam/2, motorDiam/2, motorLength, 80).toCSG()
motor = motor.roty(90)
motor = motor.movex(-motor.getMinX()).movez(-motor.getMinZ())
CSG base = new Cube(180, 120, 40).toCSG()
base = base.movez(-base.getMinZ())
CSG rightMotor = motor.movex(base.getMaxX() - motor.getTotalX()/2).movex(-10)
.movez(base.getMaxZ() - motor.getTotalZ())
base = base.difference(rightMotor).difference(rightMotor.mirrorx())
CSG cutout = new Cube(180 - 2*motorLength, 100, 35).toCSG()
cutout = cutout.movez(-cutout.getMinZ())
base = base.difference(cutout.movez(base.getMaxZ() - cutout.getTotalZ()))
base.setName("base")
return base
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment