-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShared-modules.scad
147 lines (123 loc) · 2.95 KB
/
Shared-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
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
/**
* A place to put SCAD modules that are shared by multiple components.
*
* This came about after a couple had already been repeated, and I haven't refactored everything, so there's probably still a little duplication of modules.
**/
// Create an "S" shaped curve for model strength on what would otherwise be a corner
module essCurve( d, h )
{
xDimension = d;
yDimension = d;
zDimension = h;
difference()
{
{
translate( [(-1 * (xDimension / 2)), (-1 * (yDimension / 2)), 0] )
{
cube( [xDimension, yDimension, zDimension] );
}
}
{
translate( [ 0, 0, -1 ] )
{
translate( [0, (-1 * yDimension), 0] )
{
cube( [xDimension, yDimension * 2, (zDimension + 2)] );
}
translate( [(-1 * xDimension), 0, 0] )
{
cube( [xDimension, yDimension, (zDimension + 2)] );
}
linear_extrude( height=(zDimension + 2), twist=0, scale=[1, 1], center=false)
{
$fn=64; //set sides to 64
circle(r=(xDimension / 2));
}
}
}
}
}
module m5Head( height = 20 )
{
cylinder( d = 9, h = height );
}
module m5Nut( height = 4.8 )
{
cylinder( h = height, d = 9.5, $fn=6 );
}
module m5ThroughHole( height = 10 )
{
cylinder( d = 5.6, h = height );
}
module m5ThroughHole_duplicate( height = 10 )
{
cylinder( d = 5.6, h = height );
}
module m4Head( height = 3.9 )
{
cylinder( h = height, d = 7.4 );
}
module m4Head_duplicate( height = 3.9 )
{
cylinder( h = height, d = 7.4 );
}
module m4Nut( height = 3.0 )
{
cylinder( h = height, d = 8.2, $fn=6 );
}
module m4Nut_sink( height = 3.3, diameter = 8.2 )
{
cylinder( h = height, d = diameter, $fn=6 );
}
module m4ThroughHole( height = 20 )
{
cylinder( d = 4.6, h=height, center=false );
}
module m4ThroughHole_duplicate( height = 20 )
{
cylinder( d = 4.6, h=height, center=false );
}
module frameProfile( axis = "x", length = 20 )
{
// profileSize = 20;
if( axis == "x" )
{
cube( [length, profileSize, profileSize] );
}
else if( axis == "y" )
{
cube( [profileSize, length, profileSize] );
}
else if( axis == "z" )
{
cube( [profileSize, profileSize, length] );
}
}
module cutoutFrameProfile( axis = "x", length = 20 )
{
profileExtraCutoutAmount = 0.2;
if( axis == "x" )
{
cube( [length, profileSize + profileExtraCutoutAmount, profileSize + profileExtraCutoutAmount] );
}
else if( axis == "y" )
{
cube( [profileSize + profileExtraCutoutAmount, length, profileSize + profileExtraCutoutAmount] );
}
else if( axis == "z" )
{
cube( [profileSize + profileExtraCutoutAmount, profileSize + 0.2, length] );
}
}
module m3ThroughHole( height = 20 )
{
cylinder( d = 3.6, h=height, center=false );
}
module m3Nut( height = 2.4 )
{
cylinder( h = height, d = 6.5, $fn=6 );
}
module buriedM3Nut( diameter = 6.8, height = 2.6 )
{
cylinder( h = height, d = diameter, $fn=6 );
}