-
Notifications
You must be signed in to change notification settings - Fork 4
tesselations.scad
This file has all the modules needed to make a variety of tesselations.
To use, add the following lines to the beginning of your file:
include <boardgame_toolkit.scad>
HexagonTesselationRepeatAtLocation()HexagonTesselationRepeat()TriangleTesselationRepeatAtLocation()TriangleTesselationRepeat()HexagonalTesselationGenerateEdge()HexagonalTesselation()SquareTesselation()TesselationSideLine()TesselationDrop()TesselationLeaf()TesselationLeafOutline()TesselationLeafOutlineMakePolygon()TesselationLeafOutlineMakeVeins()TesselationLeafOutlineThree()DeltoidTrihexagonalTiling()DeltoidTrihexagonalTilingGetPoints()DeltoidTrihexagonalTilingInnerParts()HalfRegularHexagon()RhombiTriHexagonal()TesselationPegasus()
Description:
Used to create a hexagonal tesselation at a specific spot in a grid given an x and a y location.
Arguments:
| By Position | What it does |
|---|---|
x |
the x location to generate at |
y |
the y location to generate at |
size |
the size of the hex |
pts |
the points (function only) |
Example 1:
include <boardgame_toolkit.scad>
HexagonTesselationRepeatAtLocation(x=0, y=0, size=20)
LizardTriangle(size=20, thickness=1);
Example 2:
include <boardgame_toolkit.scad>
region(HexagonTesselationRepeatAtLocation(x=0, y=0, size=20,
pts=LizardTriangle(size=20, thickness=1)));
Description:
Creates any hexagonal tesselation spaced correctly, using the triangle layout.
Arguments:
| By Position | What it does |
|---|---|
rows |
number of rows to generate |
cols |
number of columns to generate |
size |
the size of the tesselation |
Example 1:
include <boardgame_toolkit.scad>
HexagonTesselationRepeat(rows=4, cols=4, size=20)
LizardTriangle(size=20, thickness=1);
Example 2:
include <boardgame_toolkit.scad>
HexagonTesselationRepeat(rows=4, cols=4, size=20)
RhombiTriHexagonal(40); // need to double this since not using a triangle
Description:
Creates any hexagonal tesselation spaced correctly, using the triangle layout. x = the x location to generate at y = the y location to generate at size = the size of the triangle
Example 1:
include <boardgame_toolkit.scad>
TriangleTesselationRepeatAtLocation(x=0, y=0, size=20)
LizardTriangle(size=20, thickness=1);
Example 2:
include <boardgame_toolkit.scad>
region(TriangleTesselationRepeatAtLocation(x=0, y=0, size=20,
pts=LizardTriangle(size=20, thickness=1)));
Description:
Creates any triangle tesselation spaced correctly.
Arguments:
| By Position | What it does |
|---|---|
rows |
number of rows to generate |
cols |
number of columns to generate |
size |
the size of the tesselation |
Example 1:
include <boardgame_toolkit.scad>
TriangleTesselationRepeat(rows=4, cols=4, size=20)
HalfRegularHexagon(20);
Description:
Internal helper for the hexagonal tesselation generation to setup an edge.
Description:
Make a tessealation around a hex. It will distort the sides using the input sets for each side. Each goes from -0.5 - 0.5 in the x direction using the set of points to create the line.
Arguments:
| By Position | What it does |
|---|---|
points |
set of three lines to use as points on the hex. |
radius |
the radius of the hex. |
Example 1:
include <boardgame_toolkit.scad>
HexagonalTesselation(
points=[
[[-0.5, 0], [0, 0.2], [0.5, 0]],
[[-0.5, 0], [0, -0.2], [0.5, 0]],
[[-0.5, 0], [0.3, 0.2], [0.5, 0]],
]
);
Example 2:
include <boardgame_toolkit.scad>
region(HexagonalTesselation(
points=[
[[-0.5, 0], [0, 0.2], [0.5, 0]],
[[-0.5, 0], [0, -0.2], [0.5, 0]],
[[-0.5, 0], [0.3, 0.2], [0.5, 0]],
]
));
Description:
Make a tessealation around a square. It will distort the sides using the input sets this only needs two sides. Each goes from -0.5 - 0.5 in the x direction using the set of points to create the line.
Arguments:
| By Position | What it does |
|---|---|
points |
set of two lines to use as points on the square. |
size |
the size of the square (width, length). |
thickness |
the thickness of the outline, if non-0 adds an outline. |
outer_offset |
how much to offset the edge by so it overlaps in a pattern, added to the outside. |
Example 1:
include <boardgame_toolkit.scad>
SquareTesselation(
points=[
[[-0.5, 0], [0, 0.2], [0.5, 0]],
[[-0.5, 0], [0, -0.2], [0.5, 0]],
],
size=[20,20]
);
Example 2:
include <boardgame_toolkit.scad>
linear_extrude(height = 2)
RegularPolygonGrid(
width=20, rows=5, cols=5, spacing=0,
shape_edges=4, aspect_ratio=1.0,
space_width=20, space_length=20
)
SquareTesselation(
points=[
[[-0.5, 0], [0.2, 0.3], [0.5, 0]],
[[-0.5, 0], [0.1, 0.2], [0.5, 0]],
],
size=[20, 20], thickness=1, outer_offset=0.1
);
Example 3:
include <boardgame_toolkit.scad>
region(SquareTesselation(
points=[
[[-0.5, 0], [0, 0.2], [0.5, 0]],
[[-0.5, 0], [0, -0.2], [0.5, 0]],
],
size=[20,20]
));
Description:
Do the tesselation from a side line.
Arguments:
| By Position | What it does |
|---|---|
path |
the path to point the side on |
side |
the pattern to do with the side |
Description:
Creates a drop tesselation.
Arguments:
| By Position | What it does |
|---|---|
size |
the size of the drop ([x,y]) |
arc_offset |
how wide the arc should be. |
thickness |
the thickness of the wall (if non 0) |
outer_offset |
the amount to add to the outside of the shape for layout |
arc_points |
how many points on the arc |
Example 1:
include <boardgame_toolkit.scad>
TesselationDrop(size = [20,20]);
Description:
A solid leaf for use with tesselations.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the leaf |
Example 1:
include <boardgame_toolkit.scad>
TesselationLeaf(40);
Description:
A leaf outline for use with tesselations.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the leaf |
thickness |
thickness of the sides |
with_veins |
show veins in the leaf |
vein_thickness |
how thick to make the veins in the leaf |
Example 1:
include <boardgame_toolkit.scad>
TesselationLeafOutline(40);
Example 2:
include <boardgame_toolkit.scad>
TesselationLeafOutline(40, with_veins=true);
Description:
The internal piece to make a boundary for the leaf.
Arguments:
| By Position | What it does |
|---|---|
section_height |
height of the section |
section |
the section |
Description:
Make the veins for the leaf.
Arguments:
| By Position | What it does |
|---|---|
calc_thickness |
the thickness of the leaf |
section_height |
height of the section |
section |
the section |
calc_vein_thickness |
how thick to make the veins in the leaf |
Description:
A leaf outline for use with tesselations, this groups into three to make layout a lot easier.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the leaf |
thickness |
thickness of the sides |
with_veins |
show veins in the leaf |
vein_thickness |
how thick the veins in the lid are |
Example 1:
include <boardgame_toolkit.scad>
TesselationLeafOutlineThree(40);
Example 2:
include <boardgame_toolkit.scad>
TesselationLeafOutlineThree(40, with_veins=true);
Example 3:
include <boardgame_toolkit.scad>
TesselationLeafOutlineThree(40, thickness=2, with_veins=true);
Description:
A tesselation to use with the layout to make nice triangle layout hex pattern.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the hex |
thickness |
thickness of the sides |
outer_offset |
how much to offset the outside edge |
kite |
do a kite tiling |
Example 1:
include <boardgame_toolkit.scad>
DeltoidTrihexagonalTiling(20);
Example 2:
include <boardgame_toolkit.scad>
DeltoidTrihexagonalTiling(20, kite=true);
Example 3:
include <boardgame_toolkit.scad>
region(DeltoidTrihexagonalTiling(20));
Description:
A interl part of the deltoid tesslation.
Arguments:
| By Position | What it does |
|---|---|
pts |
the points to mess with |
thickness |
thickness of the sides |
kite |
do a kite tiling |
Description:
A interl part of the deltoid tesslation.
Arguments:
| By Position | What it does |
|---|---|
pts |
the points to mess with |
thickness |
thickness of the sides |
kite |
do a kite tiling |
Description:
A half regular hexagon to use with the layout to make nice layout. This is actually based on a triangle tesselation with rotations
Arguments:
| By Position | What it does |
|---|---|
size |
size of the hex |
thickness |
thickness of the sides |
outer_offset |
how much to offset the outside edge |
Example 1:
include <boardgame_toolkit.scad>
HalfRegularHexagon(20);
Example 2:
include <boardgame_toolkit.scad>
region(HalfRegularHexagon(20));
Description:
A rhombitrihexagon layout, which makes a nifty tesselation. This is actually based on a triangle tesselation with rotations
Arguments:
| By Position | What it does |
|---|---|
size |
size of the hex |
thickness |
thickness of the sides |
outer_offset |
how much to offset the outside edge |
Example 1:
include <boardgame_toolkit.scad>
RhombiTriHexagonal(20);
Example 2:
include <boardgame_toolkit.scad>
region(RhombiTriHexagonal(20));
Description:
Pegasus tesselation to use on the lids.
Arguments:
| By Position | What it does |
|---|---|
size |
size of the hex |
thickness |
thickness of the sides |
outer_offset |
how much to offset the outside edge |
Example 1:
include <boardgame_toolkit.scad>
TesselationPegasus(size=[20, 20]);
Example 2:
include <boardgame_toolkit.scad>
TesselationPegasus(size=[30, 20], thickness=0.5);
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: