-
Notifications
You must be signed in to change notification settings - Fork 0
/
PenHolder.scad
120 lines (92 loc) · 2.2 KB
/
PenHolder.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
$fa = 1;
$fs = 0.4;
baseDiameter = 50;
shaftDiameter = 11.36;
protrusionDiameter = shaftDiameter + 2.5;
protrusionHeight = 20;
baseHeight = 20;
difference(){
Structural();
translate([0,0,8])
ShaftGap();
}
module Structural() {
Base();
translate([0,0,11])
ShaftSupport();
translate([0,0,13])
Protrusion();
}
module Base(){
difference(){
baseBlob();
baseFloorCutout();
}
module baseFloorCutout(){
translate([0,0,-(baseHeight/2)])
cylinder(d=baseDiameter, h=baseHeight/2);
}
module baseBlob(){
translate([0,0,baseHeight/5])
resize([baseDiameter, baseDiameter, baseHeight])
sphere(d=baseDiameter);
}
}
module Protrusion() {
cylinder(d=protrusionDiameter, h=protrusionHeight);
}
module ShaftGap() {
cylinder(d=shaftDiameter, h=protrusionHeight + 2);
linear_extrude(height=protrusionHeight * 2, scale=3)
circle(d=protrusionDiameter / 2);
}
module ShaftSupport() {
sphere(d=protrusionDiameter * 1.5);
}
// outerDiameter = 40;
// innerDiameter = 11.36;
// mainHeight = 30;
// Holder();
// module Holder() {
// difference(){
// Base();
// translate([0,0,3])
// OuterReduction();
// translate([0,0, 7])
// GuideRidge();
// translate([0,0,2])
// InnerVoid();
// }
// }
// module InnerVoid() {
// linear_extrude(mainHeight)
// circle(d=innerDiameter);
// }
// module OuterReduction(){
// difference() {
// Outside();
// Inside();
// }
// module Inside() {
// union(){
// linear_extrude(mainHeight)
// circle(d=innerDiameter + 2);
// translate([0,0,-15])
// Base();
// }
// }
// module Outside() {
// linear_extrude(mainHeight)
// circle(d=outerDiameter);
// }
// }
// module GuideRidge() {
// // translate([0,0,mainHeight - 5])
// // mirror([0,0,1])
// linear_extrude(height=mainHeight / 2, scale=3)
// circle(d=innerDiameter / 2);
// }
// module Base() {
// linear_extrude(height=mainHeight, scale=0)
// circle(d=outerDiameter);
// }