OpenSCAD

Those with small screens can open the slideshow in a new window.

After working through this slideshow, I typically have my students create a puzzle cube like this one. Unfortunately, when they design their pieces to fit together perfectly, 3D printers tend to make them a little too tight. To combat this problem, I created a module called shave() which shaves whatever amount you choose off each face of your puzzle pieces.

To use the function, simple copy and paste the code below into OpenSCAD.
module shave(amount)
{
    translate([0,0,-amount])
    {
        difference()
        {
            cube([99,99,99],center=true);
            minkowski()
            {
                difference()
                {
                    cube([100,100,100],center=true);
                    children();
                }
                cube([amount*2,amount*2,amount*2],center=true);
            }
        }
    }
}

To use my shave() module, create another module out of your puzzle piece and...
module puzzlePieceA()
{
    cube([30,10,10]);
    translate([0,10,0])
        cube([20,10,10]);
    translate([0,20,0,])
        cube([10,10,10]);
}

//shave .3 millimeters off each face of the puzzle piece
shave(.3) puzzlePieceA();

You cannot preview the object (it will appear two dimensional). Instead, you must render it (press F6).
Comments