Skip to content

inset_box.scad

pinkfish edited this page Nov 26, 2025 · 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
width the width of the box (outside width)
length the length of the box (outside length)
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
width width of the box (outside width)
length length of the box (outside length)
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(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
width outside width of the box
length outside length of the box
lid_boundary boundary around the outside for the lid (default 10)
lid_thickness thickness of the lid (default default_lid_thickness)
size_sizeing amount of wiggle room between pieces (default m_piece_wiggle_room)
text_str the string to use for the label
text_length the length of the text to use (defaults to 3/4 of length/width)
text_scale the scale of the text, making it higher or shorter on the width (default 1.0)
label_radius radius of the label corners (default text_width/4)
label_type the type of the label (default default_label_type)
label_border border of the item (default 2)
label_offset offset in from the edge for the label (default 4)
layout_width the width of the layout pieces (default default_lid_layout_width)
shape_width width of the shape (default default_lid_shape_width)
shape_thickness how wide the pieces are (default default_lid_shape_thickness)
aspect_ratio the aspect ratio (multiple by dy) (default default_lid_aspect_ratio)
size_spacing extra spacing to apply between pieces (default m_piece_wiggle_room)
tab_height height of the tabs (default 6)
tab_length length of the tabs (default 10)
inset inset of the edge (default 1)
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)
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)
label_background_colour the colour of the label background (default default_label_background_colour)
finger_hole_size size of the finger hole to use in the lid (default 10)

Example 1:

InsetLidTabbedWithLabelAndCustomShape() Example 1
include <boardgame_toolkit.scad>
InsetLidTabbedWithLabelAndCustomShape(100, 50, text_str = "Frog") {
  ShapeByType(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(width = 100, length = 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
width width of the box (outside dimension)
length length of the box (outside dimension)
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)
text_length the length of the text to use (defaults to 3/4 of length/width)
text_scale the scale of the text, making it higher or shorter on the width (default 1.0)
label_radius radius of the label corners (default text_width/4)
label_type the type of the label (default default_label_type)
label_border how wide the border strip on the label should be (default 2)
label_offset how far inside the border the label should be (degault 4)
tab_height height of the tabs (default 6)
tab_length length of the tabs (default 10)
inset inset of the edge (default 1)
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)
shape_width width of the shape (default default_lid_shape_width)
shape_thickness how wide the pieces are (default default_lid_shape_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)
material_colour the colour of the material in the box (default default_material_colour)
label_background_colour the colour of the label background (default default_label_background_colour)
finger_hole_size size of the finger hole to use in the lid (default 10)

Example 1:

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

Module: MakeBoxWithInsetLidTabbed()

Topics: TabbedBox, TabbedLid

Usage:

  • MakeBoxWithInsetLidTabbed(width = 30, length = 100, height = 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
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_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)
material_colour the colour of the material in the box (default default_material_colour)
finger_hole_size size of the finger hole to use in the lid (default 10)
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(width = 30, length = 100, height = 20);

Module: InsetLidRabbitClip()

Topics: RabbitClipBox

Usage:

  • InsetLidRabbitClip(30, 100);

Description:

Makes an inset lid with the tabes on the side.

Arguments:

By Position What it does
width width of the box (outside width)
length length of the box (outside length)
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_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(30, 100);




Module: InsetLidRabbitClipWithLabelAndCustomShape()

Topics: RabbitClipBox

Usage: InsetLidRabbitClipWithLabelAndCustomShape(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
width outside width of the box
length inside width of the box
lid_boundary boundary around the outside for the lid (default 10)
lid_thickness thickness of the lid (default default_lid_thickness)
size_sizeing amount of wiggle room between pieces (default m_piece_wiggle_room)
text_str the string to use for the label
text_length the length of the text to use (defaults to 3/4 of length/width)
text_scale the scale of the text, making it higher or shorter on the width (default 1.0)
label_radius radius of the label corners (default text_width/4)
label_type the type of the label (default default_label_type)
label_border border of the item (default 2)
label_offset offset in from the edge for the label (default 4)
layout_width the width of the layout pieces (default default_lid_layout_width)
shape_width width of the shape (default default_lid_shape_width)
shape_thickness how wide the pieces are (default default_lid_shape_thickness)
aspect_ratio the aspect ratio (multiple by dy) (default default_lid_aspect_ratio)
size_spacing extra spacing to apply between pieces (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_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)
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_background_colour the colour of the label background (default default_label_background_colour)
finger_hole_size size of the finger hole to use in the lid (default 10)

Example 1:

InsetLidRabbitClipWithLabelAndCustomShape() Example 1
include <boardgame_toolkit.scad>
InsetLidRabbitClipWithLabelAndCustomShape(100, 50, text_str = "Frog") {
  ShapeByType(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(width = 100, length = 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
width width of the box (outside dimension)
length length of the box (outside dimension)
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)
text_length the length of the text to use (defaults to 3/4 of length/width)
text_scale the scale of the text, making it higher or shorter on the width (default 1.0)
label_radius radius of the label corners (default text_width/4)
label_type the type of the label (default default_label_type)
label_border how wide the border strip on the label should be (default 2)
label_offset how far inside the border the label should be (degault 4)
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)
layout_width the width of the layout pieces (default default_lid_layout_width)
shape_width width of the shape (default default_lid_shape_width)
shape_thickness how wide the pieces are (default default_lid_shape_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)
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_background_colour the colour of the label background (default default_label_background_colour)
finger_hole_size size of the finger hole to use in the lid (default 10)

Example 1:

InsetLidRabbitClipWithLabel() Example 1
include <boardgame_toolkit.scad>
InsetLidRabbitClipWithLabel(
    width = 100, length = 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(width = 30, length = 100, height = 20);

Clone this wiki locally