-
Notifications
You must be signed in to change notification settings - Fork 1
/
HelperModules.scad
48 lines (45 loc) · 1.42 KB
/
HelperModules.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
include <RocketParts.scad>
// Don't mess with this unless you really know what you're doing.
module noseConePolygon()
{
// Rotate to the proper orientation for a rotate_extrude
rotate(a = [180, 180, 90])
{
// X is the width of the svg, y is the height of the svg
translate(v = [-noseConeTotalLength / 2, noseConeWidth / 4, 0])
{
// Scale the nose cone since RockSim is dumb and doesn't export normal mm units
scale([25.4 / 90, -25.4 / 90, 1])
{
polygon(noseConePoints);
}
}
}
}
// Don't mess with this unless you really know what you're doing.
module finPolygon()
{
// X is the width of the svg, y is the height of the svg
translate(v = [finLength / 2, finSemiSpan / 2, 0])
{
// Scale the fin since RockSim is dumb and doesn't export normal mm units
scale([25.4 / 90, -25.4 / 90, 1])
{
polygon(finPoints);
}
}
}
// This module oriented an transaltes a fin for mounting on a body tube
module finOrientedForFinCan(finThickness = 1)
{
// Move it up so the rootChord is on the body tube.
// Move have the finThickness to get it positioned properly
translate(v = [-offsetMargin, finThickness / 2, finRootChordLength])
{
// Rotate to the vertical position
rotate(a = [90, 90, 0])
{
fin(finThickness = finThickness);
}
}
}