-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathocf-gel-modules.scad
53 lines (49 loc) · 1.19 KB
/
ocf-gel-modules.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
// Assembly
module asm() {
difference() {
union() {
ring();
lip();
}
color("red") mag_rings();
}
}
// Main body of part
module ring() {
linear_extrude(depth) {
difference() {
circle(r=(outer_dia / 2));
circle(r=(inner_dia / 2));
}
}
}
// Wider lip at the top for easier removal
module lip() {
linear_extrude(lip_h) {
difference() {
circle(r=(outer_dia + lip_w) / 2);
circle(r=(inner_dia / 2));
}
}
}
// Wrapper for magnet inserts
module mag_rings() {
//top magnet ring (closest to build plate)
mag_inserts(mag_bury, mag_dia + 0.25); // Allow extra slop for the buildplate layer
// bottom magnet ring (furthest from build plate)
if (depth > 10) {
mag_inserts(depth - mag_hole_depth, mag_dia);
}
}
// Subtractive circular array of magnet inserts
module mag_inserts(zpos, d) {
for (i = [0:1:mag_count]) {
rotate([0,0,mag_degrees * i]) {
translate([ring_center,0,zpos]) {
linear_extrude(mag_depth) {
circle(r=(d / 2), $fn=20);
}
}
}
}
}