Skip to content

Tutorial simple_boxes

pinkfish edited this page Nov 23, 2024 · 12 revisions

Create simple boxes with simple cutouts.

Sliding boxes

Simple box

Create a sliding lid box with a cut of the entire inside of the box. This also makes the matching sliding lid.

include <boardgame_toolkit.scad>

money_thickness = 10;
money_length = 134;
money_width = 60;
wall_thickness = 2;

money_section_width = money_width + wall_thickness * 2;
money_section_length = money_length + wall_thickness * 2;
top_section_height = 20;

module SquareBox()
{
    MakeBoxWithSlidingLid(width = money_section_width, length = money_section_length, height = top_section_height)
    {
        cube([ money_width, money_length, top_section_height ]);
    }
    text_str = "Square";
    text_width = 80;
    text_height = 20;
    translate([ money_section_width + 10, 0, 0 ]) SlidingBoxLidWithLabel(
        width = money_section_width, length = money_section_length, text_width = text_width,
        text_height = text_height, text_str = text_str, label_rotated = true);
}

SquareBox();

Figure 1

Simple box, rounded cutout

include <boardgame_toolkit.scad>

money_thickness = 10;
money_length = 134;
money_width = 60;
wall_thickness = 2;

money_section_width = money_width + wall_thickness * 2;
money_section_length = money_length + wall_thickness * 2;
top_section_height = 20;

module TokensBox()
{
    MakeBoxWithSlidingLid(width = money_section_width, length = money_section_length, height = top_section_height)
    {
        RoundedBoxAllSides(width = money_section_width - wall_thickness * 2,
            length = money_section_length - wall_thickness * 2, 
            height = top_section_height, radius = 10);
    }
    text_str = "Tokens";
    text_width = 80;
    text_height = 20;
    translate([ money_section_width + 10, 0, 0 ]) SlidingBoxLidWithLabel(
        width = money_section_width, length = money_section_length, text_width = text_width,
        text_height = text_height, text_str = text_str, label_rotated = true);
}

TokensBox();

Figure 2

Simple Box with finger cutout

Create a sliding lid box with a cut of the entire inside of the box, adding in a finger cutout to access the cards.
This also makes the matching sliding lid.

include <boardgame_toolkit.scad>

money_thickness = 10;
money_length = 134;
money_width = 60;
wall_thickness = 2;

money_section_width = money_width + wall_thickness * 2;
money_section_length = money_length + wall_thickness * 2;
top_section_height = 20;

module MoneyBox()
{
    MakeBoxWithSlidingLid(width = money_section_width, length = money_section_length, height = top_section_height)
    {
        cube([ money_width, money_length, top_section_height ]);
        
        translate([ money_section_width / 2 - 15, 0, top_section_height - 20 ])
            FingerHoleBase(radius = 15, height = 20);
    }
    text_str = "Money";
    text_width = 80;
    text_height = 20;
    translate([ money_section_width + 10, 0, 0 ]) SlidingBoxLidWithLabel(
        width = money_section_width, length = money_section_length, text_width = text_width,
        text_height = text_height, text_str = text_str, label_rotated = true);
}

MoneyBox();

Figure 3

Simple box with 2x2 compartments

Creates a box with a 2x2 grid compartments.

include <boardgame_toolkit.scad>

money_thickness = 10;
money_length = 134;
money_width = 60;
wall_thickness = 2;

money_section_width = money_width + wall_thickness * 2;
money_section_length = money_length + wall_thickness * 2;
top_section_height = 20;

module GridBox()
{
    MakeBoxWithSlidingLid(width = money_section_width, length = money_section_length, height = top_section_height)
    {
        RoundedBoxGrid(width = money_section_width-wall_thickness * 2, length = money_section_length-wall_thickness * 2, 
            height = top_section_height, rows = 2, cols = 2, radius = 4, all_sides = true);
    }
    text_str = "Grid";
    text_width = 80;
    text_height = 20;
    translate([ money_section_width + 10, 0, 0 ]) SlidingBoxLidWithLabel(
        width = money_section_width, length = money_section_length, text_width = text_width,
        text_height = text_height, text_str = text_str, label_rotated = true);
}

GridBox();

Figure 4

Tabbed Boxes

Simple tabbed box

Create a tabbed lid box with a cut of the entire inside of the box. This also makes the matching tabbed lid.

include <boardgame_toolkit.scad>

money_thickness = 10;
money_length = 134;
money_width = 60;
wall_thickness = 2;

money_section_width = money_width + wall_thickness * 2;
money_section_length = money_length + wall_thickness * 2;
top_section_height = 20;

module TabbedBox()
{
    MakeBoxWithInsetLidTabbed(width = money_section_width, length = money_section_length, height = top_section_height)
    {
        cube([ money_width, money_length, top_section_height ]);
    }
    text_str = "Tabbed";
    text_width = 80;
    text_height = 20;
    translate([ money_section_width + 10, 0, 0 ]) InsetLidTabbedWithLabel(
        width = money_section_width, length = money_section_length, text_width = text_width,
        text_height = text_height, text_str = text_str, label_rotated = true);
}

TabbedBox();

Figure 5

Capped box

Make a lid and base for a capped box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;

MakeBoxWithCapLid(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2,
                    lid_finger_hold_len = 14)
    RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 2,
                        length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                        radius = 5);

Figure 6

Slipover box

Make a lid and base for a slipover box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;

MakeBoxWithSlipoverLid(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2)
    RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 2,
                        length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                        radius = 5);

Figure 7

Sliding Catch box

Make a lid and base for a sliding catch box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;

MakeBoxWithSlidingCatchLid(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2)
    RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 2,
                        length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                        radius = 5);

Figure 8

Magnetic box

Make a lid and base for a magnetic box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;


MakeBoxWithMagneticLid(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2,
                    magnet_diameter = 5, magnet_thickness = 1) {
    intersection() {
        MakeBoxWithMagneticLidInsideSpace(width = canvas_piece_box_width, length = canvas_piece_box_length, 
            height = canvas_piece_box_height, magnet_diameter = 5, magnet_thickness = 1);
        RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 2,
                            length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                            radius = 5);
    }
}

Figure 9

Rabbit Clip box

Make a lid and base for a rabbit clip box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;


MakeBoxWithInsetLidRabbitClip(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2) {
    RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 2,
                        length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                        radius = 5);
}

Figure 10

Hinge box

Make a box with a hinge in it, the hinge and box are in the same print, this is a print in place box.

include <boardgame_toolkit.scad>

canvas_piece_box_width = 41;
canvas_piece_box_length = 73;
canvas_piece_box_height = 29;
wall_thickness = 3;


MakeBoxAndLidWithInsetHinge(width = canvas_piece_box_width, length = canvas_piece_box_length,
                    height = canvas_piece_box_height, wall_thickness = wall_thickness, lid_thickness = 2) {
    // Box section.
    RoundedBoxAllSides(width = canvas_piece_box_width - wall_thickness * 4,
                        length = canvas_piece_box_length - wall_thickness * 2, height = canvas_piece_box_height,
                        radius = 5);
    // Lid section.
    cube([canvas_piece_box_width - wall_thickness * 4,canvas_piece_box_length - wall_thickness * 2,canvas_piece_box_height]);
}

Figure 11

Clone this wiki locally