-
-
Save nag92/3ff10b7b9ff107fc6f05ec3fa698bcd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSG simpleSyntax =new Cylinder(10,10,40,(int)30).toCSG() // a one line Cylinder | |
//create a Cylinder | |
height = 22.5 | |
CSG wheel_body = new Cylinder(33, // Radius at the bottom | |
33, // Radius at the top | |
17.6, // Height | |
(int)30 //resolution | |
).toCSG().movez(height/2 - 17.6/2) | |
CSG hub = new Cylinder(14.3, // Radius at the bottom | |
14.3, // Radius at the top | |
height, // Height | |
(int)30 //resolution | |
).toCSG() | |
bearing_height = 2.5 | |
CSG slot = new Cylinder(11.2, // Radius at the bottom | |
11.2, // Radius at the top | |
bearing_height, // Height | |
(int)30 //resolution | |
).toCSG() | |
//CSG slot = new Cyliner(11.2,11.2,bearing_height,(int)30).CSG() | |
CSG slotted = hub.difference(slot) | |
slotted = slotted.difference(slot.movez(height-bearing_height)) | |
//create a Cylinder | |
CSG wheel = wheel_body.union(slotted) | |
return [wheel ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment