-
Notifications
You must be signed in to change notification settings - Fork 3
shapes.scad
This file has all the modules needed to make various shapes.
To use, add the following lines to the beginning of your file:
include <boardgame_toolkit.scad>
-
Section: Shapes
Sword2d()Sword2dOutline()Crossbow2d()Crossbow2dOutline()Sledgehammer2d()Sledgehammer2dOutline()Shoe2d()Shoe2dOutline()Bag2d()Bag2dOutline()Torch2d()Torch2dOutline()Teapot2d()Coin2d()CoinPile2d()australia_map_lengthaustralia_map_widthAustraliaMapWidth()AustraliaMap2d()Rock2d()ruins_2d_lengthruins_2d_widthRuins2dWidth()Ruins2d()RockWall2d()D20Outline2d()SawBlade2d()SawBlade2dOutline()Handshake2d()Fist2d()Fist2dOutline()Leaf2d()LaurelWreath2d()Anvil2d()HalfEye2d()SideEye2d()CloudShape2d()SingleLog2d()Tower2d()Sign2d()ShapeNeedsInnerControl()ShapeByType()PortugalCastle()TrainOutline()WagonOutline()
Shapes to use in boxes and stuff.
Description:
2d shape of a sword.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the sword |
width |
width of the sword |
blade_width |
width of the blade (default width / 3) |
hilt_length |
length of the hilt (default length / 15) |
hilt_pos |
position on the blade where the hilt starts (default length / 7) |
blade_rounding |
how much rounding on the end of the blade (default 1) |
hilt_rounding |
how much rounding on the hilt (default 1) |
Example 1:
include <boardgame_toolkit.scad>
Sword2d(100, 20);
Description:
2d outline of a sword.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the sword |
width |
width of the sword |
blade_width |
width of the blade (default width / 3) |
hilt_length |
length of the hilt (default length / 15) |
hilt_pos |
position on the blade where the hilt starts (default length / 7) |
blade_rounding |
how much rounding on the end of the blade (default 1) |
hilt_rounding |
how much rounding on the hilt (default 1) |
line_width |
how wide the line is (default 1) |
Example 1:
include <boardgame_toolkit.scad>
Sword2dOutline(100, 20);
Description:
A 2d crossbow shape.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the cross bpw. |
width |
width of the cross bow |
handle_width |
width of the handle bit (default width/8) |
bow_width |
width of the bow section of the bow (default width/4) |
outer_circle |
how big of a circle with the crossbow to draw (default width*2) |
Example 1:
include <boardgame_toolkit.scad>
Crossbow2d(70, 50);
Description:
An outline of a 2d crossbow shape.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the cross bpw. |
width |
width of the cross bow |
handle_width |
width of the handle bit (default width/8) |
bow_width |
width of the bow section of the bow (default width/4) |
outer_circle |
how big of a circle with the crossbow to draw (default width*2) |
line_width |
width of the line to display (default 1) |
Example 1:
include <boardgame_toolkit.scad>
Crossbow2dOutline(70, 50);
Description:
An outline of a 2d crossbow shape.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the cross bpw. |
width |
width of the cross bow |
handle_width |
width of the handle bit (default width/4) |
head_lenght |
length of the head (default length/3.5) |
rounding_head |
rounding amoubnt on the head (default width/5) |
rounding_handle |
rounding amount on the handle (default width/10) |
Example 1:
include <boardgame_toolkit.scad>
Sledgehammer2d(70, 50);
Description:
An outline of a 2d crossbow shape.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the cross bpw. |
width |
width of the cross bow |
handle_width |
width of the handle bit (default width/4) |
head_lenght |
length of the head (default length/3.5) |
rounding_head |
rounding amoubnt on the head (default 2) |
rounding_handle |
rounding amount on the handle (default 1) |
line_width |
width of the lione (default 1) |
strap_width |
width of the strap outline(default line_width*4) |
Example 1:
include <boardgame_toolkit.scad>
Sledgehammer2dOutline(70, 50);
Description:
An nice 2d shoe shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the shoe |
leg_length |
length of the leg bit of the shoe (default size/3) |
sole_height |
height of the sole base of the shoe (default size/20) |
base_width |
height of the base part of the shoe (default size/3) |
Example 1:
include <boardgame_toolkit.scad>
Shoe2d(50);
Description:
An nice 2d shoe outline shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the shoe |
leg_length |
length of the leg bit of the shoe (default size/3) |
sole_height |
height of the sole base of the shoe (default size/20) |
base_width |
height of the base part of the shoe (default size/3) |
line_width |
width of the outline line (default 1) |
Example 1:
include <boardgame_toolkit.scad>
Shoe2dOutline(50);
Description:
An nice 2d bag shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the bag |
base_round_diameter |
round diameter of the base circles (default size/4) |
main_round_diameter |
round diameter of the middle bulge bit (default size/2) |
neck_width |
width of the neck of the bag (default size/6) |
rope_length |
length of the rope (default size/4) |
Example 1:
include <boardgame_toolkit.scad>
Bag2d(50);
Description:
An nice 2d bag outline shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the bag |
base_round_diameter |
round diameter of the base circles (default size/4) |
main_round_diameter |
round diameter of the middle bulge bit (default size/2) |
neck_width |
width of the neck of the bag (default size/6) |
line_width |
width of the line to use for the outline |
Example 1:
include <boardgame_toolkit.scad>
Bag2d(50);
Description:
An nice 2d torch shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the torch |
handle_width |
the width of the handle (default width/2) |
head_length |
length of the head (default length/7) |
Example 1:
include <boardgame_toolkit.scad>
Torch2d(100, 20);
Description:
An nice 2d torch outline shape.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the torch |
handle_width |
the width of the handle (default width/2) |
head_length |
length of the head (default length/7) |
line_width |
width of the line (default 1) |
Example 1:
include <boardgame_toolkit.scad>
Torch2dOutline(100, 20);
Description:
An nice 2d teapor shape.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the teapot |
width |
width of the teapot |
top_width |
top width of the teapot (default width*6/10) |
top_length |
length to the top part of the teapot. |
top_circle_diameter |
circle of the top part of the teapot |
handle_rounding |
rounding amount to use int he top handle |
handle_width |
width of the top handle |
spout_length |
length of the spout |
side_handle_length |
length of the side handle |
side_handle_rounding |
rounding of the bottom part of the handle |
Example 1:
include <boardgame_toolkit.scad>
Teapot2d(100, 70);
Description:
A simple coin icon to use in things.
Arguments:
| By Position | What it does |
|---|---|
size |
the size of the coin |
text |
text to put in the coin (default 1) |
text_size |
size of the text to use (dewfault size/2) |
Example 1:
include <boardgame_toolkit.scad>
Coin2d(50);
Example 2:
include <boardgame_toolkit.scad>
Coin2d(50, text = "5");
Description:
Makes a coin pile to use in other places.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the pile |
coin_num |
number of coins in the pile (default 5) |
rounding |
how much to round the coins (default (size * 3 / 4) / (calc_coin_num * 2)) |
Example 1:
include <boardgame_toolkit.scad>
CoinPile2d(50);
Example 2:
include <boardgame_toolkit.scad>
CoinPile2d(50, coin_num=3);
Example 3:
include <boardgame_toolkit.scad>
CoinPile2d(50, coin_num=10);
Description:
The length of the australian svg map
Description:
The width of the australian svg map
Description:
Works out the width of the map from the length.
Description:
a map of australia
Arguments:
| By Position | What it does |
|---|---|
length |
length of the map |
Example 1:
include <boardgame_toolkit.scad>
AustraliaMap2d(100);
Description:
Makes a rock shape to use in walls and things.
Arguments:
| By Position | What it does |
|---|---|
width |
width of the rock |
length |
length of the rock |
rounding |
rounding on the edge of the rock (default min(width,lenght)/5) |
Description:
The length of the ruins svg
Description:
The length of the ruins svg
Description:
Works out the width of the map from the length.
Description:
Makes a small ruins image to use in stuff.
Example 1:
include <boardgame_toolkit.scad>
Ruins2d(50);
Description:
Makes a nice rock wall
Arguments:
| By Position | What it does |
|---|---|
size |
size of the rock wall |
num_rows |
number of rows (default 10) |
num_cols |
numer of cols (default 40) |
Example 1:
include <boardgame_toolkit.scad>
RockWall2d(50);
Description:
Makes a nice d20 outline for some dice.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the die image |
offset |
the size of the walls |
Example 1:
include <boardgame_toolkit.scad>
D20Outline2d(10, 0.5);
Description:
Makes a nice 2d saw blade.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the saw blade |
inner_spindle_size |
size of the inside spindle (default size/10) |
Example 1:
include <boardgame_toolkit.scad>
SawBlade2d(50);
Description:
Makes a nice 2d saw blade.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the saw blade |
inner_spindle_size |
size of the inside spindle (default size/10) |
Example 1:
include <boardgame_toolkit.scad>
SawBlade2d(50);
Description:
Creates two hands shaking hands.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the hands. |
Example 1:
include <boardgame_toolkit.scad>
Handshake2d(30);
Description:
A nice fist for use in stuff. Fist is from fist printables by Vendicar Design
Arguments:
| By Position | What it does |
|---|---|
size |
size of the fist |
Example 1:
include <boardgame_toolkit.scad>
Fist2d(20);
Description:
Outline of a fst
Arguments:
| By Position | What it does |
|---|---|
size |
size of the fist |
line_width |
width of the line (default 1) |
Description:
Makes a nice leaf.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the leaf |
Description:
Makes a laurel wreathe for use all over the place
Arguments:
| By Position | What it does |
|---|---|
size |
size of the laurel |
Description:
Makes a nice 2d anvil.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the anvil |
with_hammer |
show a hammer on the anvil and spark too |
Example 1:
include <boardgame_toolkit.scad>
Anvil2d(30);
Example 2:
include <boardgame_toolkit.scad>
Anvil2d(30, with_hammer = true);
Description:
Makes a single eye for use in various things where eyes are needed. This is a half eye on an angle.
Arguments:
| By Position | What it does |
|---|---|
angle |
angle the eye is on |
outer_size |
size of the outside circle. |
inner_size |
size of the inside circle |
pupil_size |
size of the pupil |
Example 1:
include <boardgame_toolkit.scad>
HalfEye2d(30);
Example 2:
include <boardgame_toolkit.scad>
HalfEye2d(60);
Example 3:
include <boardgame_toolkit.scad>
translate([-6, 0, 0]) HalfEye2d(60);
translate([6, 0, 0]) mirror([1, 0]) HalfEye2d(60);
// Nose.
translate([0, -4, 0]) {
circle(d=3);
translate([0, -2]) {
rect([1, 3]);
translate([-3, -1.5]) ring(r1=2.5, r2=3, angle=[360, 180], n=32);
translate([3, -1.5]) mirror([1, 0]) ring(r1=2.5, r2=3, angle=[360, 180], n=32);
}
}
Description:
Makes a single eye for use in various things where eyes are needed. This is a half eye on an angle.
Arguments:
| By Position | What it does |
|---|---|
angle |
angle the pupil is at |
outer_size |
size of the outside circle. |
inner_size |
size of the inside circle |
pupil_size |
size of the pupil |
Example 1:
include <boardgame_toolkit.scad>
SideEye2d(30);
Example 2:
include <boardgame_toolkit.scad>
SideEye2d(90);
Example 3:
include <boardgame_toolkit.scad>
translate([6, 0, 0]) SideEye2d(90);
translate([-6, 0, 0]) SideEye2d(90);
translate([0, -4, 0]) {
translate([1, 0.6]) rotate(30) rect([4, 1]);
translate([-1, 0.6]) rotate(150) rect([4, 1]);
circle(d=3);
}
Description:
Makes a cloud object. This object was made by Twanne on thingiverse: https://www.thingiverse.com/thing:641665/files
Arguments:
| By Position | What it does |
|---|---|
width |
The width of the cloud. This also determine the height, because the height is half the width. |
height |
Height of the object. |
line_width |
width of the outside line (0 if no line) |
Example 1:
include <boardgame_toolkit.scad>
CloudShape2d(100);
Description:
A single log image.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the log |
line_width |
width of the line |
Example 1:
include <boardgame_toolkit.scad>
SingleLog2d(15);
Description:
Make a single keep tower for use in gams and stuff.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the tower |
Example 1:
include <boardgame_toolkit.scad>
Tower2d(20);
Description:
Makes a sign shape to use for stuff.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the sign |
Description:
If the specified shape needs inner control
Arguments:
| By Position | What it does |
|---|---|
shnape_type |
the type of shape to check |
Description:
Creates shapes by a specific type to use in the lids. This is pulled out so the shape creation layout are handled independantly.
Example 1:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 2, shape_width = 10);
Example 2:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 1, shape_width = 14);
Example 3:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DENSE_HEX, shape_thickness = 1, shape_width = 11);
Example 4:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DENSE_TRIANGLE, shape_thickness = 2, shape_width = 10);
Example 5:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_CIRCLE, shape_thickness = 2, shape_width = 14);
Example 6:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_TRIANGLE, shape_thickness = 2, shape_width = 10);
Example 7:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_HEX, shape_thickness = 1, shape_width = 14);
Example 8:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 16);
Example 9:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 13, shape_aspect_ratio=1.25);
Example 10:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_OCTOGON, shape_thickness = 1, shape_width = 10.5, shape_aspect_ratio=1);
Example 11:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_SQUARE, shape_thickness = 2, shape_width = 11);
Example 12:
include <boardgame_toolkit.scad>
default_lid_shape_rounding = 3;
ShapeByType(shape_type= SHAPE_TYPE_SQUARE, shape_thickness = 2, shape_width = 11);
Example 13:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_CLOUD, shape_thickness = 2, shape_width = 11);
Example 14:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_SUPERSHAPE, shape_thickness = 2);
Example 15:
include <boardgame_toolkit.scad>
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);
Example 16:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
$polygon_grid_rows = 2;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R1, shape_thickness = 1, shape_width = 10);
Example 17:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R2, shape_thickness = 1, shape_width = 10);
Example 18:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R3, shape_thickness = 1, shape_width = 10);
Example 19:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R4, shape_thickness = 1, shape_width = 10);
Example 20:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R5, shape_thickness = 1, shape_width = 10);
Example 21:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R6, shape_thickness = 1, shape_width = 10);
Example 22:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R7, shape_thickness = 1, shape_width = 10);
Example 23:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R8, shape_thickness = 1, shape_width = 10);
Example 24:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R9, shape_thickness = 1, shape_width = 10);
Example 25:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R10, shape_thickness = 1, shape_width = 10);
Example 26:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R11, shape_thickness = 1, shape_width = 10);
Example 27:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R12, shape_thickness = 1, shape_width = 10);
Example 28:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R13, shape_thickness = 1, shape_width = 10);
Example 29:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R14, shape_thickness = 1, shape_width = 10);
Example 30:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_PENTAGON_R15, shape_thickness = 1, shape_width = 10);
Example 31:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_ESCHER_LIZARD, shape_thickness = 1, shape_width = 10);
Example 32:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_RHOMBI_TRI_HEXAGONAL, shape_thickness = 1, shape_width = 10);
Example 33:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_HALF_REGULAR_HEXAGON, shape_thickness = 1, shape_width = 10);
Example 34:
include <boardgame_toolkit.scad>
$polygon_x = 0;
$polygon_y = 0;
ShapeByType(shape_type = SHAPE_TYPE_DROP, shape_thickness = 1, shape_width = 10);
Example 35:
include <boardgame_toolkit.scad>
$polygon_width = 100;
$polygon_length = 100;
ShapeByType(shape_type = SHAPE_TYPE_VORONOI, shape_thickness = 1, shape_width = 10);
Example 36:
include <boardgame_toolkit.scad>
$polygon_width = 100;
$polygon_length = 100;
ShapeByType(shape_type = SHAPE_TYPE_PENROSE_TILING_5, shape_thickness = 1, shape_width = 10);
Example 37:
include <boardgame_toolkit.scad>
$polygon_width = 100;
$polygon_length = 100;
ShapeByType(shape_type = SHAPE_TYPE_PENROSE_TILING_7, shape_thickness = 1, shape_width = 10);
Example 38:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DELTOID_TRIHEXAGONAL, shape_thickness = 1, shape_width = 10);
Example 39:
include <boardgame_toolkit.scad>
ShapeByType(shape_type = SHAPE_TYPE_DELTOID_TRIHEXAGONAL_KITE, shape_thickness = 1, shape_width = 10);
Description:
The castle used on the flag of portugal
Arguments:
| By Position | What it does |
|---|---|
stroke_width |
width of the stroke to use for the castle outline |
width |
the final width of the castle. |
Example 1:
include <boardgame_toolkit.scad>
PortugalCastle(0.2, 50);
Description:
Creates a nice train outline to use for stuff.
Arguments:
| By Position | What it does |
|---|---|
length |
length of the train |
Example 1:
include <boardgame_toolkit.scad>
TrainOutline(100);
Description:
Create a wagon outline from the exciting svg.
Arguments:
| By Position | What it does |
|---|---|
length |
the length of the wagon |
Example 1:
include <boardgame_toolkit.scad>
WagonOutline(50);
Table of Contents
Function Index
Topics Index
Cheat Sheet
Tutorials
Boxes:
- cap_box.scad
- cap_box_polygon.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:
Miscellaneous: