Exit Full View
Up

/Garden/HeartFruitShaper.foocad

HeartFruitShaper
FooCAD Source Code
include FruitShaper.foocad

class HeartFruitShaper : FruitShaper {
    
    override fun plainProfile() : Shape2d {
        val half = Circle( 50 ).translate( 30, 0 ) hull
                Circle( 10 ).translate( 0, -100 )
        val heart = half.mirrorX().also()
        // Round the "dip" near the top. Rotate, so that the join is along the edges.
        return heart.roundCorner( heart.firstPath.points.size()/2+1, 16 ).rotate(90)
    }
}