Last active
June 19, 2023 12:43
-
-
Save madhephaestus/b6ebfe4bb8210bb61c8a 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
/.project | |
/.classpath | |
/.cproject | |
/cache/ | |
/*.class/.settings | |
/.project | |
/.classpath | |
/.cproject | |
/cache/ | |
/*.class | |
/.settings | |
/.project | |
/.classpath | |
/.cproject | |
/cache/ | |
/*.class |
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
import eu.mihosoft.vrl.v3d.CSG | |
import eu.mihosoft.vrl.v3d.Cylinder | |
import eu.mihosoft.vrl.v3d.Hexagon | |
CSG simpleSyntax =new Cylinder(10,40).toCSG() // a one line Cylinder | |
//create a Cylinder | |
CSG myCylinder = new Cylinder(10, // Radius at the bottom | |
20, // Radius at the top | |
40, // Height | |
(int)30 //resolution | |
).toCSG()//convert to CSG to display ).toCSG()//convert to CSG to display | |
.movey(50) | |
//create a Cylinder | |
CSG pyramid = new Cylinder( 20, // Radius at the bottom | |
0, // Radius at the top | |
40, // Height | |
(int)4 //resolution | |
).toCSG()//convert to CSG to display | |
.movex(50) | |
//create a Cylinder | |
CSG hex = new Hexagon( 20, // Flat to flat radius | |
40 // Height | |
).toCSG()//convert to CSG to display | |
.movex(50) | |
.movey(50) | |
hex.setName("hex") | |
simpleSyntax.setName("simpleSyntax") | |
myCylinder.setName("myCylinder") | |
pyramid.setName("pyramid") | |
return [simpleSyntax,myCylinder ,pyramid,hex] |
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
{ | |
"locations": { | |
"simpleSyntax": { | |
"x": 10.0, | |
"y": 10.0, | |
"z": 0.0, | |
"rotation": { | |
"storage": { | |
"q0": 1.0, | |
"q1": 0.0, | |
"q2": 0.0, | |
"q3": 0.0 | |
} | |
} | |
}, | |
"myCylinder": { | |
"x": 104.29302412163052, | |
"y": 0.14330036795878698, | |
"z": 0.0, | |
"rotation": { | |
"storage": { | |
"q0": 1.0, | |
"q1": 0.0, | |
"q2": 0.0, | |
"q3": 0.0 | |
} | |
} | |
}, | |
"pyramid": { | |
"x": 3.5189981795381264, | |
"y": 20.0, | |
"z": 0.0, | |
"rotation": { | |
"storage": { | |
"q0": 1.0, | |
"q1": 0.0, | |
"q2": 0.0, | |
"q3": 0.0 | |
} | |
} | |
}, | |
"hex": { | |
"x": 89.52709725151706, | |
"y": -40.0, | |
"z": 0.0, | |
"rotation": { | |
"storage": { | |
"q0": 1.0, | |
"q1": 0.0, | |
"q2": 0.0, | |
"q3": 0.0 | |
} | |
} | |
} | |
}, | |
"bedX": 250.0, | |
"bedY": 250.0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sympa csg