Exit Full View
ZipUp

/Hardware/CaulkTool.foocad

CaulkTool

Tools for spreading caulk or sealant. Traditionally a dowel is dragged to form a smooth cove shape. Can we do better than that? I think the "kite" tool is better. However, I designed these tools after finishing my bathroom, so it is untested.

The angles are smaller than 90° so that it can be dragged at an angle.

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

class RoundEdge : Model {

    @Custom
    var size = Vector3( 70, 20, 2 )

    @Custom
    var radiuses = Vector3( 8, 5, 3 )
    
    @Custom
    var kiteExtra = 0.05

    @Piece
    meth simple() : Shape3d {
        val shape = Square( size.x - size.y, size.y ).center() +
            Circle( size.y/2 ).translateX( size.x/2 - size.y/2 ).mirrorX().also()
        return shape.extrude( size.z )
    }

    @Piece
    meth solid() : Shape3d {
        val circle = Circle( size.y / 2 )
        val full = circle.extrude( size.x ).rotateY(90).rotateX(-90).centerX()

        return full.bottomTo( -size.y*0.1 ) - Cube( size.x *2 ).center().topTo(0)
    }

    @Piece
    meth rectangle() : Shape3d {
        val shape = Square( size.x, size.y ).center()
            .roundCorner( 3, radiuses.x )
            .roundCorner( 2, radiuses.y )
            .roundCorner( 1, radiuses.z )
        return shape.extrude( size.z )
    }

    @Piece
    meth square() = kite( 0 )

    @Piece
    meth kite() = kite( kiteExtra )

    meth kite(kiteExtra : double) : Shape3d {

        val simple = PolygonBuilder().apply {
            moveTo( 0.5-kiteExtra, 0 )
            lineTo( 0, 0.5 )
            lineTo( -0.5+kiteExtra, 0 )
            lineTo( 0, -0.5+kiteExtra*3 )
        }.build().scale( size.x )
        val shape = simple
            .roundCorner( 2, radiuses.x )
            .roundCorner( 1, radiuses.y )
            .roundCorner( 0, radiuses.z )
        return shape.rotate(45).toPolygon().extrude( size.z )
    }        

    @Piece( printable=false )
    override fun build() : Shape3d {
        // Comment to show preview varieties
        return kite()

        val solid = solid()
        val simple = simple().backTo( solid.front - 1 )
        val rectangle = rectangle().backTo( simple.front - 1 )
        val square = square().backTo( rectangle.front - 1 )
        val kite = kite().backTo( square.front - 1 )

        return solid + simple + rectangle + square + kite
    }

}