/Garden/HedgehogBox.foocad

A box for hibernating hedgehogs. The box is made from planks of wood in two "stories". Cut one plank in half lengthways (see halfDecking)
The roof is a cheap paving slab.
Build the two stories, and then connect them with a few pocket hole screws. Then attach the floor from the bottom. NOTE. The floor needs small gaps (4mm?) for expansion.
Finally add the light green "tilt" piece. I'm not sure if this is needed. The idea is to lift the floor up slightly, and ensure that water cannot pool in the sleeping quarters ;-)
Note, in the rendered version the floor extends beyond the entrance. This last plank can be cut flush with the box. The offcut can be used for the light green "tilt" piece ;-)
Each year, add a new corregated cardboard carpet ;-) and some straw.
For a professionally made version see : [https://www.green-feathers.co.uk/collections/bird-boxes/products/eco-friendly-hedgehog-house]
import static uk.co.nickthecoder.foocad.along.v3.Along.* import uk.co.nickthecoder.foocad.woodworking.v1.* import static uk.co.nickthecoder.foocad.woodworking.v1.Woodworking.* import static uk.co.nickthecoder.foocad.layout.v1.Layout2d.* import static uk.co.nickthecoder.foocad.layout.v1.Layout3d.* class HedgehogBox : AbstractModel() { val tileSize = Vector3( 450, 450, 25 ) var size = Vector2( 420, 400 ) var openingSize = 120 @Piece( printable = false ) override fun build() : Shape3d { val decking = Wood( "main", 120, 25 ) val halfDecking = Wood( "main", 60, 25 ) val batton = Wood( "batton", 32, 32 ) val sides1 = decking.cut( size.x ) .label("side1") .edgeDownAlongX() .translateY(- decking.thickness) .translateY(size.y - decking.thickness).also() val sides2 = halfDecking.cut( size.x ) .label("side2") .edgeDownAlongX() .translateY(- decking.thickness) .translateY(size.y - decking.thickness).also() .bottomTo( sides1.top + 1 ) val sides = (sides1 + sides2) val across1 = decking.cut( size.y - decking.thickness * 2 ) .label( "across1" ) .color("Green") .edgeDownAlongY() val across2 = halfDecking.cut( size.y - decking.thickness * 2 ) .label( "across2" ) .color("Green") .edgeDownAlongY() .bottomTo( across1.top + 1 ) val withOpening = decking.cut( size.y - decking.thickness * 2 - openingSize ) .label( "withOpening" ) .color("Green") .edgeDownAlongY() val back = across1 + across2 val front = (across2 + withOpening) .rightTo( size.x ) val mid = (across2 + withOpening) .mirrorY().frontTo(0) .rightTo( front.left - openingSize ) val roof = Cube( tileSize ) .centerTo( size.x / 2, size.y / 2 - decking.thickness, 0 ) .bottomTo( decking.width * 1.5 + 1 ) .previewOnly() val overEntrance = batton.cut( openingSize + decking.thickness * 2 ) .edgeDownAlongY() .color( "LightGreen") .leftTo( sides1.right ) .backTo( sides.back ) .bottomTo( decking.width ) val floor = decking.cut( size.y ) .label( "floor" ) .rotateX(-90) .frontTo( - decking.thickness ) .tileX(4, 4) .color( "White" ) val tilt = batton.cut( size.y ) .label("tilt") .sideDownAlongY() .scaleZ(0.3) .frontTo( -decking.thickness ) .topTo(floor.bottom) .color( "LightGreen") val all = sides + back + mid + front + overEntrance + tilt + floor + roof return all.rotateY(1) } }