Skip to content

Instantly share code, notes, and snippets.

@madhephaestus
Last active June 5, 2016 15:16
Show Gist options
  • Save madhephaestus/07f489d46d23ceac8a1e8b3779719e9b to your computer and use it in GitHub Desktop.
Save madhephaestus/07f489d46d23ceac8a1e8b3779719e9b to your computer and use it in GitHub Desktop.
CSG main= new Cube( 40,// X dimention
40,// Y dimention
40// Z dimention
).toCSG()// this converts from the geometry to an object we can work with
CSG cut= new Cube( 20,// X dimention
20,// Y dimention
20// Z dimention
).toCSG()// this converts from the geometry to an object we can work with
return main.difference(cut).intersect( new Cube( 40,40,2).toCSG() )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment