Exit Full View
Up

/Games/PullupHandle.foocad

PullupHandle
FooCAD Source Code
import uk.co.nickthecoder.foocad.smartextrusion.v1.*
import static uk.co.nickthecoder.foocad.smartextrusion.v1.SmartExtrusion.*

class PullupHandle : Model {

    val thickness = 20

    meth shape() : Shape2d {

        val topCurve = Circle(14).translateX(5)
        val bottomCurve = Circle(20).translate(40, -40)

        return topCurve.mirrorX().also().hull( bottomCurve.mirrorX().also() )

    }

    override fun build() : Shape3d {
        val inside = shape()
        val shape = inside.offset( thickness ) - inside
        val strap = Cube( 25, 100, 2 ).centerX().previewOnly()

        val main = shape.smartExtrude(thickness)
            .top( Fillet( thickness/2 ) )
            .bottom( roundedChamfer( thickness/2 ) )

        return main + strap
    }

}