Skip to content

base_bgtk.scad

pinkfish edited this page Jan 24, 2025 · 24 revisions

LibFile: base_bgtk.scad

This file has all the modules needed to generate varioius inserts for board games. It makes the generation of the inserts simpler by creating a number of useful base modules for making boxes and lids of various types specific to board game inserts. Specifically it makes tabbed lids and sliding lids easily.

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

include <boardgame_toolkit.scad>

File Contents

Constant: m_piece_wiggle_room

Description:

How many mm to use as gaps for when things join.


Constant: default_lid_thickness

Description:

The default lid thickness for all boxes.


Constant: default_wall_thickness

Description:

The default wall thickness for all boxes.


Constant: default_floor_thickness

Description:

The default lid thickness for all boxes.


Constant: default_slicing_layer_height


Constant: default_label_font

Description:

The default font to use for labels


Constant: default_label_solid_background

Description:

The default to use if the label should have a solid background or not.


Constant: default_material_colour

Description:

The default colour to use for material when making boxes.


Constant: default_label_colour

Description:

The default colour to use for the label when making boxes.


Constant: default_label_background_colour

Description:

The default colour to use for the label background when making boxes.


Function: DefaultValue()

Description:

Figures out the value, uses the input if it is not undefined, default if it is undefined.

Arguments:

By Position What it does
input input value to check, only used if not undefined
default default value to use, only used if the input is undefined.

Constant: SHAPE_TYPE_DENSE_HEX

Description:

Creates a shape with a dense hexes, so they overlap.


Constant: SHAPE_TYPE_DENSE_TRIANGLE

Description:

Creates a shape with a dense triangles, so they overlap.


Constant: SHAPE_TYPE_CIRCLE

Description:

Creates a shape with a circles.


Constant: SHAPE_TYPE_HEX

Description:

Creates a shape with a hexes.


Constant: SHAPE_TYPE_OCTOGON

Description:

Creates a shape with a octogons.


Constant: SHAPE_TYPE_TRIANGLE

Description:

Creates a shape with a triangle.


Constant: SHAPE_TYPE_NONE

Description:

Empty shape, no space filling.


Constant: SHAPE_TYPE_SQUARE

Description:

Layout a nice set of squares.


Constant: SHAPE_TYPE_SUPERSHAPE

Description:

Makes a nice Superformula shape.


Constant: SHAPE_TYPE_HILBERT

Description:

Layout a nice hilbert curve.


Constant: SHAPE_TYPE_CLOUD

Description:

Makes a nice cloud shape.


Module: DifferenceWithOffset()

Description:

Helper function that does an offset with the size inside the difference of the object makes it easier for constructing outlines.

Arguments:

By Position What it does
offset how much of an offset, -ve is inside the shape, +ve is outside the shape.

Clone this wiki locally