Skip to content

Instantly share code, notes, and snippets.

@madhephaestus
Created November 20, 2015 00:35
Show Gist options
  • Save madhephaestus/b1356537edaaad7c4b35 to your computer and use it in GitHub Desktop.
Save madhephaestus/b1356537edaaad7c4b35 to your computer and use it in GitHub Desktop.
double size =40;
CSG cube = new Cube( size,// X dimention
size,// Y dimention
size// Z dimention
).toCSG()
//create a sphere
CSG sphere = new Sphere(size/20*12.5).toCSG()
// perform a union
CSG cubePlusSphere = cube.difference(sphere);
return [cubePlusSphere , cube.movex(size*1.5), sphere.movey(size*1.5)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment