-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ramrod End.scad
60 lines (49 loc) · 1.09 KB
/
Ramrod End.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
use <misc/threads.scad>; // https://dkprojects.net/openscad-threads/
thr_minor_d = 17;
thr_major_d = 20;
thr_l = 23;
thr_p = 5;
thr_w = 4;
radius = 80;
barrel_d = 50;
thickness = 2.5;
thr_h = thr_major_d - thr_minor_d;
conc_offset = -sqrt(pow(radius, 2) - pow(barrel_d / 2, 2));
conc_depth = radius + conc_offset;
$fn = 100;
module body_shape()
union() {
translate([0, 0, conc_depth + thickness + thr_l / 2])
cylinder(
h=thr_l / 2,
r=thr_major_d / 2 + thickness
);
translate([0, 0, thickness])
cylinder(
h=conc_depth + thr_l / 2,
r1=barrel_d / 2,
r2=thr_major_d / 2 + thickness
);
cylinder(
h=thickness,
r=barrel_d / 2
);
}
module ramrod_end()
difference() {
body_shape();
translate([0, 0, conc_depth + thickness])
metric_thread(
diameter=thr_major_d,
pitch=thr_p,
length=thr_l,
internal=true,
n_starts=1,
square=false,
groove=false,
rectangle=thr_h / thr_w
);
translate([0, 0, conc_offset])
sphere(r=radius);
}
ramrod_end();