FooCAD Source Codeimport static uk.co.nickthecoder.foocad.along.v2.Along.*
import static uk.co.nickthecoder.foocad.layout.v1.Layout2d.*
import static uk.co.nickthecoder.foocad.layout.v1.Layout3d.*
class CircularSawFrame : Model {
val width = 2400
val height = 1200
val marginX = 100
val marginZ = 100
val frameLumber = Lumber( "frame", 35, 25 )
val edgeLumber = Lumber( "edge", 60, 60 )
override fun build() : Shape3d {
val across = frameLumber.cut( width + marginX ).alongX().spreadZ( 6, height + marginZ )
.color("Green")
val down = frameLumber.cut( height + marginZ ).spreadX( 8, width + marginX )
.translateY( frameLumber.thickness() )
.color("Green").darker()
// The rods go into these holes to support the sheet material at the bottom and left edges.
// So that the holes can be adjusted, add off center bushings, which can be rotated
// so that all the rods line up perfectly, and at right angles to each other.
// Screw the bushings in place after adjustment.
val hole = Cylinder( edgeLumber.width()*3, 15 ).rotateX(90).center()
val holesAcross = 13
val bottom = (
edgeLumber.cut( width + marginX ).alongX2() -
hole.repeatX( holesAcross, (width+marginX)/(holesAcross+1) ).translateZ( edgeLumber.width()/2 )
.leftTo(width/holesAcross)
)
.topTo(0)
val left = (
edgeLumber.cut( height + marginZ + edgeLumber.thickness()).rotateZ(90) -
hole.repeatZ( 7, height/7 ).translateX( -edgeLumber.width()/2 )
.translateZ(height/7)
)
.bottomTo(-edgeLumber.thickness())
.rightTo(0)
val frame = across + down + bottom + left
return frame.rotateX(-5)
}
}