-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathknot-tile-alphabet.scad
73 lines (61 loc) · 1.49 KB
/
knot-tile-alphabet.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* openscad celtic knot library
* Copyright 2014 Mark Hindess
*
* This work is licensed under a Creative Commons
* Attribution-ShareAlike 4.0 International License.
*
* Sample of the "alphabet" for knot tiles
*
* <rq>
* AtYF
* EGhW
* [sd]
*
*/
use <celtic-knots.scad>
use <Write.scad>
sw = 5;
translate([-sw*8, +sw*8, 0]) {
block_group("Corners", ",.{}", "<>[]");
}
translate([+sw*3, +sw*8, 0]) {
block_group("Curves", "qwas", "QWAS");
}
translate([-sw*8, 0, 0]) {
block_group("Cut Curves", "erdf", "ERDF");
}
translate([+sw*3, 0, 0]) {
block_group("Cut Slopes", "tygh", "TYGH");
}
translate([0, -sw*8, 0]) {
translate([0, +sw*3.8, 0]) write("Edges", center = true);
char_block("-_|!");
}
module block_group(title, a, b) {
translate([+sw*2.5, +sw*3.8, 0]) write(title, center = true);
char_block(a);
translate([+sw*5, 0, 0]) char_block(b);
}
module char_block(c) {
translate([-sw, +sw*1.5, 0]) {
sample_tile(c[0]);
translate([0, sw*1.3, 0]) write(c[0], center = true);
}
translate([+sw, +sw*1.5, 0]) {
sample_tile(c[1]);
translate([0, sw*1.3, 0]) write(c[1], center = true);
}
translate([-sw, -sw*1.5, 0]) {
write(c[2], center = true);
translate([0, sw*1.3, 0]) sample_tile(c[2]);
}
translate([+sw, -sw*1.5, 0]) {
write(c[3], center = true);
translate([0, sw*1.3, 0]) sample_tile(c[3]);
}
}
module sample_tile(c) {
knot_tile(c, tile_width = sw);
color("lightgrey") knot_tile_boundary(sw);
}