Merge pull request #6 from kiruma524/tutorial

Next smth
This commit is contained in:
kiruma524 2021-08-05 16:49:34 +03:00 committed by GitHub
commit a0d3e46f61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,7 +248,7 @@ private class GdmlTransformerEnv(val settings: GdmlTransformer) {
name = name name = name
) )
} }
is GdmlXtru -> extrude(name) { is GdmlXtru -> extruded(name) {
shape { shape {
solid.vertices.forEach { solid.vertices.forEach {
point(it.x * lScale, it.y * lScale) point(it.x * lScale, it.y * lScale)
@ -284,7 +284,7 @@ private class GdmlTransformerEnv(val settings: GdmlTransformer) {
name = name, name = name,
) )
is GdmlOrb -> sphere(solid.r * lScale, name = name) is GdmlOrb -> sphere(solid.r * lScale, name = name)
is GdmlPolyhedra -> extrude(name) { is GdmlPolyhedra -> extruded(name) {
//getting the radius of first //getting the radius of first
require(solid.planes.size > 1) { "The polyhedron geometry requires at least two planes" } require(solid.planes.size > 1) { "The polyhedron geometry requires at least two planes" }
val baseRadius = solid.planes.first().rmax * lScale val baseRadius = solid.planes.first().rmax * lScale