-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgroup-collar-insert-gen1.scad
160 lines (144 loc) · 5.49 KB
/
group-collar-insert-gen1.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*
* Group Collar Insert Gen 1
*
* An experimental model of an espresso machine group collar insert inspired by
* the Breville (r) line of espresso machines.
*
* Copyright (c) 2018, Darren Hart <[email protected]>
* All rights reserved.
*
* License: BSD-2-Clause
*/
//model_ver = "v0.5";
// General geometry parameters
frag_a = 1; // affects number of sides on larger rotations
frag_s = 1; // affects number of sides on alignment pins
bbox_w = 100; // bounding box width (very generous) used for block and plane ops
// Model dimensions
cone_h = 17; // total height of cone
cone_b = 3.3; // bottom of the cone not counting the ramps
cone_od_max = 86.4; // top of cone outer diameter
cone_od_min = 84.0; // bottom of cone outer diameter
// FIXME: 2.5 at cone_h and 1.9 at cone_b
cone_wall = 2.6; // wall thickness of principle cone
cone_id_max = cone_od_max - (2 * cone_wall);
cone_id_min = cone_od_min - (2 * cone_wall);
ramp_w = 6.3;
ramp_id = cone_od_min - (2 * ramp_w);
ramp_grade = 4; // ramp grade in degrees (steepness)
ramp_arc = 109; // ramp arc in degrees (length)
ramp_wall = 3.0;
ramp_wall_a = 5;
ramp_wall_arc = ramp_arc - ramp_wall_a + 1;
ramp_wall_id_max = cone_od_max - (2 * ramp_wall);
ramp_wall_id_min = cone_od_min - (2 * ramp_wall);
pin_d = 2.7; // alignment pin diameter
pin_h = 2;
pin1_a = 35;
pin2_a = 80;
stop_h = 10.6;
stop_arc = 11;
stop_relief_a = 111;
stop_relief_arc = 7.5;
stop_relief_h = 10.6;
// Construction modules
module block(h1, h2 = 0) {
translate([-bbox_w / 2, -bbox_w / 2, -h2]) cube(size = [bbox_w, bbox_w, h1 + h2]);
}
// Model component modules
module pin(z = 0) {
// -x rotation counteracts ramp angle rotation (pins are vertical)
rotate([-ramp_grade, 0, z]) translate([38.5, 0, -1.5])
cylinder(h = pin_h, d = pin_d, $fa = frag_a, $fs = frag_s);
}
module stop_relief(z = 0) {
rotate([0, 0, z + stop_relief_a])
rotate_extrude(angle = stop_relief_arc, $fa = frag_a)
translate([(cone_od_min / 2) - ramp_w + 2, 0, 0])
square(size = [ramp_w + 3, stop_relief_h]);
}
module ramp(z = 0) {
rotate([0, 0, z]) {
// this is innacurate and ugly, we need a follow-path library
// maybe: https://www.thingiverse.com/thing:186660
// ref from: https://github.com/openscad/openscad/issues/114
difference() {
rotate([ramp_grade, 0, 0]) {
// ramp
rotate_extrude(angle = ramp_arc, $fa = frag_a)
translate([ramp_id / 2, 0, 0]) square(size = [ramp_w + 1, 4.5]);
// stop
rotate([0, 0, ramp_arc]) difference() {
rotate_extrude(angle = stop_arc, $fa = frag_a)
translate([ramp_id / 2, 0, 0])
square(size = [ramp_w + 1, stop_h]);
// add the version
//translate([ramp_id / 2 + .25, 2, 1]) rotate([0, -90, 0]) {
// linear_extrude(1) text(model_ver, size = 3);
//}
// bevel the top interior corner of the stop
translate([0, 0, stop_h - 1.5])
cylinder(3, d2 = ramp_id + 4, d1 = ramp_id - 2, $fa = frag_a);
}
// alignment pins
pin(pin1_a);
pin(pin2_a);
}
// bevel the start of the ramp
translate([42.3, 0, 0]) rotate([0, 0, 67.5]) translate([-10, 0, 0])
cube(10);
translate([42, 0, 0]) rotate([0, 60, 67.5]) translate([-12.9, 2.9, 0])
cube(10);
}
// Thicker walls above ramps
difference() {
union() {
intersection() {
// outer cone
cylinder(h = cone_h, d2 = cone_od_max, d1 = cone_od_min, $fa = frag_a);
rotate([0, 0, ramp_wall_a])
rotate_extrude(angle = ramp_wall_arc) square(50);
}
// fade into the outer wall
rotate([0, 0, ramp_wall_a]) translate([38.88, -15, 0]) rotate([0, 4, -.4])
cube(15);
}
// remove the inner cone
cylinder(cone_h, d2 = ramp_wall_id_max, d1 = ramp_wall_id_min, $fa = frag_a);
// trim the top
translate([-50, -50, 13])
cube(100);
// bevel the top of the ramp wall
translate([0, 0, 13 - 1])
cylinder(1.4, d2 = cone_id_max, d1 = cone_id_max - 2, $fa = frag_a);
// trim the bottom
block(cone_b, 1);
}
}
}
intersection() {
union() {
// Main block minus inner cone
difference() {
block(cone_h);
cylinder(cone_h, d2 = cone_id_max, d1 = cone_id_min, $fa = frag_a);
// eliminate the shared plane shearing effect in preview (no affect on final model)
translate([0, 0, cone_h - .5])
cylinder(1, d = cone_id_max - .1, $fa = frag_a);
// Cut off the bottom before adding the ramps
// FIXME: This should go from 3.2 at 120deg to 3.4 at 180deg
block(cone_b, 1);
}
// Ramps
ramp(0);
ramp(180);
}
difference() {
// Outer funnel
cylinder(h = cone_h, d2 = cone_od_max, d1 = cone_od_min, $fa = frag_a);
// Stop reliefs (alignment)
stop_relief(0);
stop_relief(180);
}
}
echo(version = version());