/Garden/RotataryLineTip.foocad

Lets me hook my peg-bag to the end of my rotary clothes drier's stem.
import uk.co.nickthecoder.foocad.extras.v1.*
import static uk.co.nickthecoder.foocad.extras.v1.Extras.*
import uk.co.nickthecoder.foocad.smartextrusion.v1.*
import static uk.co.nickthecoder.foocad.smartextrusion.v1.SmartExtrusion.*
import uk.co.nickthecoder.foocad.cup.v1.*
import static uk.co.nickthecoder.foocad.cup.v1.Cup.*
class RotataryLineTip : Model {
var size = Vector3( 21, 21, 16 )
var thickness = 2.0
var slotSize = Vector2( 5, 10 )
var lipSize = Vector2( 6, 9 )
var lipEdge = 2
override fun build() : Shape3d {
val shape = Square( size.x, size.y ).center()
.roundAllCorners( 1,5 )
val main = shape.cup( size.z, thickness )
.baseThickness( thickness + 1 )
.outsideBottom( Chamfer(1) )
.mirrorZ().bottomTo( 0 )
val slot = Square( size.y * 2, slotSize.x ).center()
.extrude( slotSize.y )
val lipShape = Square( lipEdge, lipSize.y ) +
Triangle( lipSize.x-1, lipSize.y ).mirrorY().frontTo(0).translateX(lipEdge)
val lip = lipShape.toPolygon().roundAllCorners(1)
.extrude(size.y - 2)
.rotateY(-90)
.centerX()
.frontTo( main.back - 1 )
return main - slot + lip
}
}
