Exit Full View
Up

/GardenFurniture/ShedPath.foocad

ShedPath
FooCAD Source Code
class ShedPath : Model {
    
    override fun build() : Shape3d {
        val base = Cube( 1900, 2800, 50 ).color( "Red" ).darker()

        val inside = Cube( 1900-400, 2800-400, 50 )
            .translate(200,200,1)
            .color( "Yellow" ).darker()

        val step = Cube( 600, 1600, 50)
            .translate( 1300, -1600, 0 )
            .rotateX(7)
            .color("DarkSlateGray")

        val path = Cube( 600, 2000, 50)
            .translate( 1900,-3000, -150)
            .color("Red").darker()

        println( "Width = ${1900~/100} bricks" )
        println( "Depth = ${2800~/200} bricks" )
        println( "Edge = ${(1900~/100) *2 + (2800~/100) * 2 - 4}")
        println( "Total = ${(1900~/100) * (2800~/200)} bricks" )

        return base + inside + step + path
    }
}