-
Notifications
You must be signed in to change notification settings - Fork 4
lids_base.scad
This file has all the shared lid pieces for making lids.
To use, add the following lines to the beginning of your file:
include <boardgame_toolkit.scad>
-
Section: Lid
default_lid_shape_widthdefault_lid_layout_widthdefault_lid_aspect_ratiodefault_lid_shape_thicknessdefault_lid_shape_roundingdefault_lid_shape_typedefault_lid_supershape_m1default_lid_supershape_m2default_lid_supershape_n1default_lid_supershape_n2default_lid_supershape_n3default_lid_supershape_adefault_lid_supershape_bIsDenseShapeType()DenseShapeEdges()LidMeshDense()LidMeshHex()LidMeshRepeating()LidMeshBasic()SlidingLidFingernail()MakeLidTab()MakeTabs()MakeLidLabel()
Building blocks for making various kinds of lids and labels.
Description:
Set this at the top of the file to change the default shape width of the box lid.
Description:
Set this at the top of the file to change the default layout width of the box lid.
Description:
Set this at the top of the file to change the default aspect ratio of the box lid.
Description:
Set this at the top of the file to change the default shape_thickness of the box lid.
Description:
Set this at the top of the file to change the default rounding of the box lid.
Description:
Set this at the top of the file to change the default shape type of the box lid.
Description:
Set this at the top of the file to change the default supershape m1 element
Description:
Set this at the top of the file to change the default supershape m]2 element
Description:
Set this at the top of the file to change the default supershape n1 element
Description:
Set this at the top of the file to change the default supershape n2 element
Description:
Set this at the top of the file to change the default supershape n3 element
Description:
Set this at the top of the file to change the default supershape a element
Description:
Set this at the top of the file to change the default supershape b element
Description:
If the shape type is dense or not.
Arguments:
| By Position | What it does |
|---|---|
shape_type |
the shape_type to check |
Description:
The number of edges on the dense shape.
Arguments:
| By Position | What it does |
|---|---|
shape_type |
the shape_type to check |
Topics: PatternFill
Usage:
- LidMeshDense(width = 70, length = 50, lid_thickness = 3, boundary = 10, radius = 5, shape_edges = 6);
Description:
Make a hex mesh for the lid. This makes a nice pattern for use on the lids.
Arguments:
| By Position | What it does |
|---|---|
width |
width of the mesh section |
length |
the length of the mesh section |
lid_thickness |
how high the lid is |
boundary |
how wide of a boundary edge to put on the side of the lid |
radius |
the radius of the polygon to create |
shape_thickness |
how thick to generate the gaps between the hexes (default 2) |
Example 1:
include <boardgame_toolkit.scad>
LidMeshDense(width = 100, length = 50, lid_thickness = 3, boundary = 10, radius = 10, shape_edges = 6) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_width = $layout_width);
}
Example 2:
include <boardgame_toolkit.scad>
LidMeshDense(width = 100, length = 50, lid_thickness = 3, boundary = 10, radius = 10, shape_edges = 3) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_TRIANGLE, shape_width = $layout_width);
}
Topics: PatternFill
Usage:
- LidMeshHex(width = 70, length = 50, lid_thickness = 3, boundary = 10, radius = 5);
Description:
Make a hex mesh for the lid. This makes a nice pattern for use on the lids.
Arguments:
| By Position | What it does |
|---|---|
width |
width of the mesh section |
length |
the length of the mesh section |
lid_thickness |
how high the lid is |
boundary |
how wide of a boundary edge to put on the side of the lid |
radius |
the radius of the polygon to create |
shape_thickness |
how thick to generate the gaps between the hexes |
Example 1:
include <boardgame_toolkit.scad>
LidMeshHex(width = 100, length = 50, lid_thickness = 3, boundary = 10, radius = 10);
Topics: PatternFill
Usage:
- LidMeshRepeating(50, 20, 3, 5, 10);
Description:
Make a mesh for the lid with a repeating shape. It uses the children of this to repeat the shape. Sets $layout_width as the layout width
Arguments:
| By Position | What it does |
|---|---|
width |
width of the mesh section |
length |
the length of the mesh section |
lid_thickness |
how high the lid is |
boundary |
how wide of a boundary edge to put on the side of the lid |
layout_width |
the width to use between each shape. |
aspect_ratio |
the aspect ratio (multiple by dy) (default 1.0) |
shape_edges |
the number of edges on the shape (default 4) |
Example 1:
include <boardgame_toolkit.scad>
LidMeshRepeating(width = 50, length = 50, lid_thickness = 3, boundary = 5, layout_width = 10)
difference() {
circle(r = 7);
circle(r = 6);
}
Description:
Creates a lid mesh with a set of known shapes. The width is the width of the shape for layout purposes and the shape_width is the width for generation purposes. The layout width and shape width default to being the same for dense layouts, and overlapping for non-dense layouts.
Arguments:
| By Position | What it does |
|---|---|
width |
width of the mesh section |
length |
the length of the mesh section |
lid_thickness |
how high the lid is |
boundary |
how wide of a boundary edge to put on the side of the lid |
radius |
the radius of the polygon to create |
dense_shape_edges |
number of edges on the dense shape |
shape_thickness |
how thick to generate the gaps between the hexes (default 2) |
Example 1:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10, dense = true) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 2, shape_width = $layout_width);
}
Example 2:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 70, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 1, shape_width = 14);
}
Example 3:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 70, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 1, shape_width = 11);
}
Example 4:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_DENSE_TRIANGLE, shape_thickness = 2, shape_width = $layout_width);
}
Example 5:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_CIRCLE, shape_thickness = 2, shape_width = 14);
}
Example 6:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_TRIANGLE, shape_thickness = 2, shape_width = $layout_width);
}
Example 7:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_HEX, shape_thickness = 1, shape_width = 14);
}
Example 8:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 16);
}
Example 9:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 13, shape_aspect_ratio=1.25);
}
Example 10:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 10.5, shape_aspect_ratio=1);
}
Example 11:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_SQUARE, shape_thickness = 2, shape_width = 11);
}
Example 12:
include <boardgame_toolkit.scad>
default_lid_shape_rounding = 3;
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_SQUARE, shape_thickness = 2, shape_width = 11);
}
Example 13:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_CLOUD, shape_thickness = 2, shape_width = $layout_width+1);
}
Example 14:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
ShapeByType(shape_type = SHAPE_TYPE_SUPERSHAPE, shape_thickness = 2);
}
Example 15:
include <boardgame_toolkit.scad>
LidMeshBasic(width = 100, length = 50, lid_thickness = 2, boundary = 10, layout_width = 10) {
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);
}
Topics: SlidingBox, SlidingLid
Usage:
- SlidingLidFingernail(radius = 10, lid_thickness = 3);
Description:
Creates a fingernail section for moving a sliding lid.
Arguments:
| By Position | What it does |
|---|---|
radius |
radius of the circle the gap is in |
lid_thickness |
height of the lid |
finger_gap |
the space to make for a finger gap (default = 1.5) |
sphere |
the size of the sphere for the inset (default 12) |
finger_length |
the length of the finger section (default = 15) |
Example 1:
include <boardgame_toolkit.scad>
SlidingLidFingernail(3);
Usage:
- MakeLidTab(5, 10, 2);
Description:
Makes a lid tab, a single lid lab, to use for boxes.
Arguments:
| By Position | What it does |
|---|---|
length |
the length of the tab |
height |
the height of the tab |
lid_thickness |
the height of the lid (defaults to default_lid_thickness) |
prism_width |
the width of the prism (defaults to 0.75) |
wall_thickness |
the thickness of the walls (default 2) |
Example 1:
include <boardgame_toolkit.scad>
MakeLidTab(length = 5, height = 10, lid_thickness = 2, prism_width = 0.75, wall_thickness = 2);
Usage:
- MakeTabs(50, 100, wall_thickness = 2, lid_thickness = 2);
Description:
Create the tabs for the box, this can be used on the lids and the box to create cutouts,
this just does the layout. Use the MakeLidTab() to make the tabs, it will place the children
at each of the specified offsets to make the tabs.
Arguments:
| By Position | What it does |
|---|---|
box_width |
width of the box (outside size) |
box_length |
length of the box (outside size) |
lid_thickness |
the height of the lid (default = default_lid_thickness) |
tab_length |
how long the tab is (default = 10) |
make_tab_width |
make tabs on the width side (default false) |
make_tab_length |
make tabs on the length side (default true) |
Example 1:
include <boardgame_toolkit.scad>
MakeTabs(50, 100)
MakeLidTab(length = 10, height = 6);
Topics: Label
Description:
Makes a label to put into the lid in the right place with the right rotation.
Arguments:
| By Position | What it does |
|---|---|
width |
outside width of the box |
length |
inside width of the box |
height |
outside height of the box |
lid_thickness |
thickness of the lid |
label_radius |
radius of the label corners |
border |
border of the item |
offset |
offset in from the edge for the label |
label_rotated |
if the label is rotated |
full_height |
if the label grid is the full height (when flipped upsidedown) |
label_colour |
the colout of the label (default default_label_colour) |
solid_background |
if the background should be solid (default false) |
Example 1:
include <boardgame_toolkit.scad>
MakeLidLabel(100, 20, text_height = 50, text_width = 10, lid_thickness = 2, text_str =
"frog", border = 2,
offset = 4, font = default_label_font, label_radius = 2, label_rotated = false, full_height = true);
Example 2:
include <boardgame_toolkit.scad>
MakeLidLabel(100, 20, text_height = 50, text_width = 10, lid_thickness = 2, text_str =
"frog", border = 2,
offset = 4, font = default_label_font, label_radius = 2, label_rotated = true, full_height = false);
Example 3:
include <boardgame_toolkit.scad>
MakeLidLabel(100, 20, text_height = 50, text_width = 10, lid_thickness = 2, text_str =
"frog", border = 2,
offset = 4, font = default_label_font, label_radius = 2, label_rotated = true, full_height = false,
solid_background = true);
Example 4:
include <boardgame_toolkit.scad>
MakeLidLabel(100, 20, text_height = 50, text_width = 10, lid_thickness = 2, text_str =
"frog", border = 2,
offset = 4, font = default_label_font, label_radius = 2, label_rotated = true, full_height = true,
solid_background = true);
Table of Contents
Function Index
Topics Index
Cheat Sheet
Tutorials
Boxes:
- cap_box.scad
- cap_box_polygon.scad
- filament_hinge_box.scad
- hinge_box.scad
- inset_box.scad
- magnetic_box.scad
- no_lid.scad
- sliding_box.scad
- sliding_catch_box.scad
- slipover_box.scad
- slipover_path_box.scad
Basics:
Dividers:
Shapes:
Slicing:
CardLibrary:
Miscellaneous: