-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlambda_ring.scad
64 lines (58 loc) · 1.5 KB
/
lambda_ring.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
use <pie_slice.scad>;
thickness = 0.8; // mm
diameter = 21.0; // mm
height = 8; // mm
gap_angle = 10; // degrees
inner_edge = thickness; // mm
text = "(\u03BB)";
$fn=60;
module outer_shell() {
difference() {
cylinder(d=diameter + 4 * thickness, h=height);
translate([0,0,-0.1]) {
cylinder(d=diameter + 2 * thickness, h=height + 0.2);
}
translate([0, 0, 2]) {
rotate([90, 0, 0]) {
linear_extrude(diameter) {
text(
text = text,
size = (height - 2),
halign="center",
font = "FreeMono:style=Bold"
);
}
}
}
}
}
// inner shell is enlarged by the gap_angle,
// but keeps the given diameter when compressed
module inner_shell() {
ratio = gap_angle / 360 + 1;
translate([0,0,-inner_edge]) {
difference() {
cylinder(d = diameter * ratio + 3 * thickness, h=height + 2 * inner_edge);
translate([0,0,-0.1]) {
cylinder(d = diameter * ratio, h=height + 2 * inner_edge + 0.2);
}
translate([0,0,inner_edge - 0.1]) {
difference() {
cylinder(d = diameter * ratio + 4 * thickness, h=height + 0.2);
translate([0,0,-0.1]) {
cylinder(d = diameter * ratio + 2 * thickness, h=height + 0.4);
}
}
}
// slot
linear_extrude(height + 2 * inner_edge + 0.1) {
slice(0, gap_angle, diameter);
}
}
}
}
// render one shell at a time for multimaterial
outer_shell();
color("blue") {
inner_shell();
}