import static uk.co.nickthecoder.foocad.layout.v1.Layout2d.* import static uk.co.nickthecoder.foocad.layout.v1.Layout3d.* import static uk.co.nickthecoder.foocad.along.v2.Along.* /* The top could be slanted quite easily (but not shown on the plan). The top could be covered with a polycarb sheet, or even tiles. If the top is to be removable, consider a permanent mesh, to prevent birds getting in. The sides could be "glazed" in various ways. If using plastic sheeting, then the sides, and doors could be double glazed ;-) I'm not sure I want hinged doors (as I may plant flowers in front). So how about a "gutter" at the bottom and a clippy bit at the top, and take the whole door off. Could also slide open (but not very freely)? Consider bricks at the base, so that the wood doesn't touch soil. Maybe heavy blocks, raising the bed inside??? Size To use it as a mini greenhouse, the internal size should be at least 1000x400 to hold a x4 seed tray. Build the front and back frames, then add the front-to-back pieces. Add diagonals for stability with scraps of wood. */ class TallColdframe : Model { @Custom( about="Exterior size" ) var size = Vector3( 1200, 600, 1700 ) var plank = Lumber("huge", 150, 42).color("Orange").stockLength(3600) var post = Lumber("cls", 70, 45).color("Blue").stockLength(2400) var OLDpost = Lumber("half-huge", 75, 47).color("Green").stockLength(3600) var framing = Lumber( "framing", 50, 25).color("DarkOrange").stockLength(3600) fun side() : Shape3d { val across = post.cut( size.y - plank.thickness()*2 ) .alongY().frontTo(plank.thickness()) .topTo( size.z ).also() val mid = post.cut( size.y - post.width()*2 ) .label("side-mid") .alongY() .spreadZ(2, size.z/3) .centerTo(across.middle) val lap = LapJoint( post, 0, plank.width() - post.width(), plank.thickness(), post.width() ) val upright = post.cut( size.z - post.width()*2 ) .label( "side-upright" ) .cutZRatio(lap, 0) .cutZRatio(lap, 1) val uprights = upright .rotateZ(90).leftTo(0) .mirrorY().backTo( size.y ).also(2) .bottomTo( post.width() ) .darker() return across + mid + uprights } fun door() : Shape3d { val margin = 40 val height = size.z - margin*2 val width = (size.x - 2)/2 val upright = framing.cut( height ) .label("door-upright") val uprights = upright.rightTo(width).also() val across = framing.cut( width -upright.size.x*2 ) .label("door-across") .alongX2() .bottomTo(0) .leftTo(upright.right) .spreadZ( 4, height ) .darker() val result = uprights + across return result.backTo(0).leftTo(-size.x/2).bottomTo(margin) } override fun build() : Shape3d { val side = side() val sides = side.rightTo( size.x ).also().centerX() val bottoms = plank.cut( sides.size.x ) .label("top-bottom") .alongX2().bottomTo(0) .backTo(sides.back).also() .centerX() val tops = bottoms.topTo(sides.top) val doors = door().rightTo(size.x/2).also() return ( sides + bottoms + tops + doors )//.tileX( 2, 300 ) } }