Skip to content

inset_box.scad

pinkfish edited this page Mar 20, 2026 · 17 revisions

LibFile: inset_box.scad

This file has all the modules needed to generate an inset box.

To use, add the following lines to the beginning of your file:

include <boardgame_toolkit.scad>

File Contents

  1. Section: TabbedBox

Section: TabbedBox

Module: InsetLid()

Topics: TabbedBox

Usage:

  • InsetLid(50, 100);

Description:

Make a lid inset into the box with tabs on the side to close the box. This just does the insets around the top.

Arguments:

By Position What it does
size [width, length] outside size of the lid
lid_thickness thickness of the lid (default default_lid_thickness)
wall_thickness thickness of the walls (default default_wall_thickness)
inset how far the side is inset from the edge of the box (default 1)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
size_spacing how much wiggle room to give in the model (default m_piece_wiggle_room)
material_colour the colour of the material in the box (default default_material_colour)

Example 1:

InsetLid() Example 1
include <boardgame_toolkit.scad>
InsetLid([50, 100]);




Module: InsetLidTabbed()

Topics: TabbedBox, TabbedLid

Usage:

  • InsetLidTabbed([30, 100]);

Description:

Makes an inset lid with the tabes on the side.

Arguments:

By Position What it does
size [width, length] outside size of the lid
lid_thickness thickness of the lid (default default_lid_thickness)
wall_thickness thickness of the walls (default default_wall_thickness)
inset how far to inset the lid (default 1)
size_spacing the wiggle room in the lid generation (default m_piece_wiggle_room)
make_tab_width makes tabes on thr width (default false)
make_tab_length makes tabs on the length (default true)
prism_width width of the prism in the tab. (default 0.75)
tab_length length of the tab (default 10)
tab_height height of the tab (default 6)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
material_colour the colour of the material in the box (default default_material_colour)

Example 1:

InsetLidTabbed() Example 1
include <boardgame_toolkit.scad>
InsetLidTabbed([30, 100]);




Module: InsetLidTabbedWithLabelAndCustomShape()

Topics: TabbedBox, TabbedLid

Usage: InsetLidTabbedWithLabelAndCustomShape(size=[100, 50], text\_str = "Frog");

Description:

Lid for a cap box, small cap to go on the box with finger cutouts. This uses the first child as the shape for repeating on the lid.

Arguments:

By Position What it does
size [width, length] outside size of the lid
text_str the string to use for the label
lid_boundary boundary around the outside for the lid (default 10)
layout_width the width of the layout pieces (default default_lid_layout_width)
size_spacing amount of wiggle room between pieces (default m_piece_wiggle_room)
lid_thickness thickness of the lid (default default_lid_thickness)
aspect_ratio the aspect ratio (multiple by dy) (default default_lid_aspect_ratio)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
tab_length length of the tabs (default 10)
tab_height height of the tabs (default 6)
make_tab_width makes tabes on thr width (default false)
make_tab_length makes tabs on the length (default true)
prism_width width of the prism in the tab. (default 0.75)
material_colour the colour of the material in the box (default default_material_colour)
label_options options for the label (default undef)
lid_pattern_dense if the layout is dense (default false)
lid_dense_shape_edges the number of edges on the dense layout (default 6)
pattern_inner_control if the pattern needs inner control (default false)

Example 1:

InsetLidTabbedWithLabelAndCustomShape() Example 1
include <boardgame_toolkit.scad>
InsetLidTabbedWithLabelAndCustomShape(size=[100, 50], text_str = "Frog") {
  ShapeByType(MakeShapeObject(shape_type = SHAPE_TYPE_SUPERSHAPE, shape_thickness = 2, supershape_m1 = 12, supershape_m2 = 12,
     supershape_n1 = 1, supershape_b = 1.5, shape_width = 15));
}

Module: InsetLidTabbedWithLabel()

Topics: TabbedBox, TabbedLid

Usage:

  • InsetLidTabbedWithLabel(size = [100, 100], lid_thickness = 3, text_str = "Trains");

Description:

This is a composite method that joins together the other pieces to make a simple inset tabbed lid with a label and a hex grid. The children to this as also pulled out of the lid so can be used to build more complicated lids.

Arguments:

By Position What it does
size [width, length] outside size of the lid
text_str The string to write
lid_thickness thickness of the lid (default default_lid_thickness)
lid_boundary how much boundary should be around the pattern (default 10)
tab_length length of the tabs (default 10)
tab_height height of the tabs (default 8)
make_tab_width makes tabes on thr width (default false)
make_tab_length makes tabs on the length (default true)
prism_width width of the prism in the tab. (default 0.75)
layout_width the width of the layout pieces (default default_lid_layout_width)
aspect_ratio the aspect ratio (multiple by dy) (default default_lid_aspect_ratio)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
size_spacing how much wiggle room around the piece (default m_piece_wiggle_room)
material_colour the colour of the material in the box (default default_material_colour)
label_options options for the label (default undef)
shape_options options for the shape (default undef)

Example 1:

InsetLidTabbedWithLabel() Example 1
include <boardgame_toolkit.scad>
InsetLidTabbedWithLabel(
    size = [100, 100], lid_thickness = 3, text_str = "Trains");

Module: MakeBoxWithInsetLidTabbed()

Topics: TabbedBox, TabbedLid

Usage:

  • MakeBoxWithInsetLidTabbed(size = [30, 100, 20]);

Description:

Makes a box with an inset lid. Handles all the various pieces for making this with tabs. This will make sure the cutouts are only inside the box and in the floor, if you want to cut out the sides of the box do this with a difference after making this object. The children and moves so 0,0,0 is the bottom inside of the box to make for easier arithmatic. Inside the children of the box you can use the $inner_height , $inner_width, $inner_length = length variables to deal with the box sizes.

Arguments:

By Position What it does
size [width, length, height] outside size of the box
wall_thickness how thick the walls are (default default_wall_thickness)
lid_thickness how hight the lid is (default default_lid_thickness)
tab_height how heigh to make the tabs (default 6)
inset how far to inset the lid (default 1)
make_tab_width make the tabs on the width (default false)
make_tab_length make the tabs on the length (default true)
prism_width width of the prism to generate (default 0.75)
tab_length how long the tab is (default 10)
stackable should we pull a piece out the bottom of the box to let this stack (default false)
size_spacing wiggle room to use when generatiung box (default m_piece_wiggle_room)
floor_thickness thickness of the floor (default default_floor_thickness)
tab_offset offset for the tab cutout (default 0.45)
material_colour the colour of the material in the box (default default_material_colour)
positive_only_children the list of children to be positive only
positive_negative_children the list of children to be positive and negative
positive_colour colour of the postive pieces default_positive_colour

Example 1:

MakeBoxWithInsetLidTabbed() Example 1
include <boardgame_toolkit.scad>
MakeBoxWithInsetLidTabbed(size = [30, 100, 20]);




Module: InsetLidRabbitClip()

Topics: RabbitClipBox

Usage: InsetLidRabbitClip(size=[30, 100]);

Description:

Makes an inset lid with the tabes on the side.

Arguments:

By Position What it does
size [width, length] outside size of the lid
lid_thickness height of the lid (default 2)
wall_thickness thickness of the walls (default 2)
inset how far to inset the lid (default 1)
size_spacing the wiggle room in the lid generation (default m_piece_wiggle_room)
make_rabbit_width makes tabes on thr width (default false)
make_rabbit_length makes tabs on the length (default true)
rabbit_length length of the rabbit piece (downwards direction) (default 6)
rabbit_width width of the rabbit piece (crosswise direction) (default 7)
rabbit_lock if the rabbit should habe a locking piece on it (default false)
rabbit_compression how much sideway give on the rabbit (default 0.1)
rabbit_thickness thickness of the rabbit (default 0.8)
rabbit_snap how deep the inner depth should be for the snap curve (default 0.25)
rabbit_offset how much of an offset on each side of the rabbit to attach to the lid (default 3)
rabbit_depth extrustion depth of the rabbit (default 1.5)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
material_colour the colour of the material in the box (default default_material_colour)

Example 1:

InsetLidRabbitClip() Example 1
include <boardgame_toolkit.scad>
InsetLidRabbitClip(size=[30, 100]);




Module: InsetLidRabbitClipWithLabelAndCustomShape()

Topics: RabbitClipBox

Usage: InsetLidRabbitClipWithLabelAndCustomShape(size=[100, 50], text\_str = "Frog");

Description:

Lid for an inset lid with a rabbit clip. This handles the first child as the pattern for the lid and the following items as children to the lid itself.

Arguments:

By Position What it does
size [width, length] outside size of the lid
text_str the string to use for the label
lid_boundary boundary around the outside for the lid (default 10)
layout_width the width of the layout pieces (default default_lid_layout_width)
size_spacing amount of wiggle room between pieces (default m_piece_wiggle_room)
lid_thickness thickness of the lid (default default_lid_thickness)
aspect_ratio the aspect ratio (multiple by dy) (default default_lid_aspect_ratio)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
make_rabbit_width makes tabes on thr width (default false)
make_rabbit_length makes tabs on the length (default true)
rabbit_width width of the rabbit piece (crosswise direction) (default 7)
rabbit_length length of the rabbit piece (downwards direction) (default 6)
rabbit_lock if the rabbit should habe a locking piece on it (default false)
rabbit_compression how much sideway give on the rabbit (default 0.1)
rabbit_thickness thickness of the rabbit (default 0.8)
rabbit_snap how deep the inner depth should be for the snap curve (default 0.25)
rabbit_offset how much of an offset on each side of the rabbit to attach to the lid (default 3)
rabbit_depth extrustion depth of the rabbit (default 1.5)
pattern_inner_control if the pattern needs inner control (default false)
lid_pattern_dense if the layout is dense (default false)
lid_dense_shape_edges the number of edges on the dense layout (default 6)
material_colour the colour of the material in the box (default default_material_colour)
label_options options for the label (default undef)

Example 1:

InsetLidRabbitClipWithLabelAndCustomShape() Example 1
include <boardgame_toolkit.scad>
InsetLidRabbitClipWithLabelAndCustomShape(size=[100, 50], text_str = "Frog") {
  ShapeByType(MakeShapeObject(shape_type = SHAPE_TYPE_SUPERSHAPE, shape_thickness = 2, supershape_m1 = 12, supershape_m2 = 12,
     supershape_n1 = 1, supershape_b = 1.5, shape_width = 15));
}

Module: InsetLidRabbitClipWithLabel()

Topics: RabbitClipBox

Usage:

  • InsetLidRabbitClipWithLabel(size = [100, 100], lid_thickness = 3, text_str = "Trains");

Description:

This is a composite method that joins together the other pieces to make a simple inset tabbed lid with a label and a hex grid. The children to this as also pulled out of the lid so can be used to build more complicated lids.

Arguments:

By Position What it does
size [width, length] outside size of the lid
text_str The string to write
lid_thickness height of the lid (default 3)
lid_boundary how much boundary should be around the pattern (default 10)
make_rabbit_width makes tabes on thr width (default false)
make_rabbit_length makes tabs on the length (default true)
aspect_ratio the aspect ratio (multiple by dy) (default 1.0)
rabbit_width width of the rabbit piece (crosswise direction) (default 7)
rabbit_length length of the rabbit piece (downwards direction) (default 6)
rabbit_lock if the rabbit should habe a locking piece on it (default false)
rabbit_compression how much sideway give on the rabbit (default 0.1)
rabbit_thickness thickness of the rabbit (default 0.8)
rabbit_snap how deep the inner depth should be for the snap curve (default 0.25)
rabbit_offset how much of an offset on each side of the rabbit to attach to the lid (default 3)
layout_width the width of the layout pieces (default default_lid_layout_width)
rabbit_depth extrustion depth of the rabbit (default 1.5)
lid_rounding how much rounding on the edge of the lid (default wall_thickness/2)
size_spacing how much wiggle room around the piece (default m_piece_wiggle_room)
material_colour the colour of the material in the box (default default_material_colour)
label_options options for the label (default undef)
shape_options options for the shape (default undef)

Example 1:

InsetLidRabbitClipWithLabel() Example 1
include <boardgame_toolkit.scad>
InsetLidRabbitClipWithLabel(
    size = [100, 100], lid_thickness = 3, text_str = "Trains");

Module: MakeBoxWithInsetLidRabbitClip()

Topics: RabbitClipBox

Usage:

  • MakeBoxWithInsetLidRabbitClip(width = 30, length = 100, height = 20);

Description:

Makes a box with an inset lid. Handles all the various pieces for making this with rabbit clips. The children are moved so 0,0,0 is the bottom inside of the box to make for easier arithmatic. Inside the children of the box you can use the $inner_height , $inner_width, $inner_length = length variables to deal with the box sizes.

Arguments:

By Position What it does
width width of the box (outside width)
length length of the box (outside length)
height height of the box (outside height)
wall_thickness how thick the walls are (default default_wall_thickness)
lid_thickness how hight the lid is (default default_lid_thickness)
tab_height how heigh to make the tabs (default 6)
inset how far to inset the lid (default 1)
make_rabbit_width makes tabes on thr width (default false)
make_rabbit_length makes tabs on the length (default true)
rabbit_length length of the rabbit piece (downwards direction) (default 6)
rabbit_width width of the rabbit piece (crosswise direction) (default 7)
rabbit_lock if the rabbit should habe a locking piece on it (default false)
rabbit_compression how much sideway give on the rabbit (default 0.1)
rabbit_snap how deep the inner depth should be for the snap curve (default 0.25)
rabbit_offset how much of an offset on each side of the rabbit to attach to the lid (default 3)
rabbit_depth extrustion depth of the rabbit (default 1.5)
size_spacing wiggle room to use when generatiung box (default m_piece_wiggle_room)
floor_thickness thickness of the floor (default default_floor_thickness)
positive_only_children the list of children to be positive only
positive_negative_children the list of children to be positive and negative
positive_colour colour of the postive pieces default_positive_colour

Example 1:

MakeBoxWithInsetLidRabbitClip() Example 1
include <boardgame_toolkit.scad>
MakeBoxWithInsetLidRabbitClip(size = [30, 100, 20]);




Clone this wiki locally