Exit Full View

FooCAD / src / dist / extensions / uk.co.nickthecoder.foocad / cup / v1 / help.txt

Use this to create bowl, boxes, cups, pots...

Most of the hard work is done by the SmartExtrusion extension.

How do you make a box (ignoring the top)
We could do this :
    Cube( 10 ).centerXY() - Cube( 8 ).centerXY().bottomTo( 2 )

This would give a box with a base of 2mm, and walls of thickness 1mm.
But it would be nice to round the edges of the box. So...

    val shape = Square( 10 ).center().roundAllCorners(2)
    val box = shape.extrude(10) -
        shape.offset( -1 ).extrude( 10 ).bottomTo( 2 )

But it would be nice to chamfer the bottom edges.
So instead of a simple `extrude` we can use SmartExtrude.

And that's all that this extension does.
It's a SmartExtrusion subtracted from another SmartExtrusion.

There are 4 edges (e.g. Chamfers or Fillets).
When you first create a Cup, all edges are null.

To chamfer the bottom edge (both the outside and inside shapes) :

    myCup.bottomEdge( Chamfer( 3 ) )

For speed of printing, and reducing the amount of plastic used,
I like to have thin walls, and add a lip around the top for strength.
A simple (but nasty looking) solution would be :

    myCup.topOutsideEdge( Chamfer( -3, 3 ) )

Using a negative number for the `offset` make the top splay outwards,
but the height of the chamfer must always be positive.

For a nicer looking, use

    Cup.fatLip( lipHeight, chamfer )

where chamfer < lipHeight

This gives a square edge at the top, which is good if you want the box to have a lid.
Otherwise, we could use :

    Cup.fatLip( lipHeight, outwardChamfer, inwardChamfer )