Skip to content

Instantly share code, notes, and snippets.

@zseker
Last active August 13, 2019 13:44
Show Gist options
  • Save zseker/e014635aa969e8ae78622adaf03a8ec0 to your computer and use it in GitHub Desktop.
Save zseker/e014635aa969e8ae78622adaf03a8ec0 to your computer and use it in GitHub Desktop.
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().movex(270).movey(20)
CSG cableBox = new Cube(190,// X dimention
80,// Y dimention
z// Z dimention
).toCSG().toXMin().toZMin().movey(160)
CSG powerbank = new Cube(139.7,// X dimention
30.48,// Y dimention
z// Z dimention
).toCSG()
CSG loadCell = new Cube(80,// X dimention
14,// Y dimention
z// Z dimention
).toCSG()
CSG sensors = new Cube(85,// X dimention
85,// Y dimention
z// Z dimention
).toCSG()
CSG stepperMotor = new Cube(35.2,// X dimention
35.2,// Y dimention
z// Z dimention
).toCSG()
CSG sharpRangeFinder = new Cube(45,// X dimention
21,// Y dimention
z// Z dimention
).toCSG()
CSG motor = new Cylinder( 19, // Radius at the top
19, // Radius at the bottom
z, // Height
(int)80 //resolution
).toCSG() // three of this motor
CSG positioningCamera = new Cylinder( 32, // Radius at the top
32, // Radius at the bottom
z, // Height
(int)80 //resolution
).toCSG()
CSG topCube = new Cube(356,// X dimention
72,// Y dimention
z// Z dimention
).toCSG(). toXMin().toYMin().toZMin().movex(16)
CSG secondCube = new Cube(388,200,z).toCSG().toXMin().toYMin().movey(72).toZMin()
CSG thirdCube = new Cube(348,30,z).toCSG().toXMin().toYMin().toZMin().movey(272).movex(20)
CSG fourthCube = new Cube(388,72,z).toCSG().toXMin().toYMin().toZMin().movey(302)
CSG bottomCube = new Cube(270,16,z).toCSG().toXMin().toYMin().toZMin().movex(59).movey(374)
CSG firstTwoCubes = topCube.union(secondCube)
CSG firstThreeCubes = firstTwoCubes.union(thirdCube)
CSG firstFourCubes = firstThreeCubes.union(fourthCube)
CSG entireFoam = firstFourCubes.union(bottomCube)
CSG foamPlusBreadboard = entireFoam.difference(breadboard)
return[foamPlusBreadboard]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment