FooCAD Source Codeclass ScrabbleLazySusan : Model {
val size = 112 * 3 + 10
val thickness = 12
var exploded = 100
override fun build() : Shape3d {
val bottom = Cube( size, size, thickness ).centerXY() -
Cylinder( 100, 10 ).translate( 54, 0, -1 ) // To screw the top on.
val bearing = Cube( 94, 94, 8 ).centerXY().bottomTo( bottom.top ).color( "GhostWhite" )
val middle = ( Square( size ).center() - Circle( size * 0.4 ) )
.extrude( thickness )
.bottomTo( bottom.top )
.color("Orange")
val top = Cube( size, size, thickness ).centerXY().bottomTo( middle.top )
.color( "Red" )
return top.translateZ(exploded*2) + middle.translateZ(exploded) +
bottom + bearing.translateZ(exploded*0.2)
}
}