-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflat_box.scad
160 lines (130 loc) · 5.13 KB
/
flat_box.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
160
/*
Light Box for Astrophotography Flats
Case and OTA adapter for an Ellumiglow round panel:
https://www.ellumiglow.com/electroluminescence/astrophotography
Render STL using OpenSCAD:
https://openscad.org/
*/
use <parts.scad>
$fa = 1;
$fs = 0.4;
// All measurements are in millimeters
// OTA adapter - configuration for William Optics GT81
// RC71: 104mm
// GT81: 105mm
// AT130: 173mm
adapter_diameter = 121; // Outside diameter of telescope, add 1mm for clearance
adapter_height = 30;
adapter_sides = 12;
adapter_text = "GT81 WIFD";
font_size = 5;
// Light Panel - configuration for Ellumiglow 6" AST060
// 5" panel: 141mm
// 6" panel: 164mm
// 8" panel: 209mm
// 10" panel: 263mm
panel_diameter = 164;
panel_height = 5; // Include space for acrylic cover
cable_width_short = 12;
cable_width_long = 22;
cable_length = 26;
cable_height = 5;
// Wall thickness
thickness = 2;
// Panel Cover
panel_cover_diameter = panel_diameter + thickness * 2;
panel_cover_height = panel_height + thickness;
// Parts should be printed independently
// Use '!' to render a specific part, only 1 part at a time can be prepended with '!'
// Print this first and slide over the front of the OTA to check for fit
*ring(2, 2, adapter_diameter);
// Infill: 10%
color("FireBrick", 1.0) ota_adapter(adapter_height, adapter_diameter, adapter_sides, panel_cover_height + thickness,
text = adapter_text, font_size = font_size);
// For sizes larger than the print bed, set quarter to 0 - 3 to print each 1/4 of the panel base and cover
quarter = "";
// Infill: 20%
color("Gray", 1.0) panel_cover(panel_cover_height, panel_cover_diameter, adapter_diameter, thickness, thickness,
cable_width_short, cable_width_long, cable_length, cable_height, quarter);
// The base can be press fit against the panel cover
// Infill: 20%
color("White", 1.0)
panel_base(panel_cover_diameter, thickness, cable_width_short, cable_width_long, cable_length, thickness, quarter);
module ota_adapter(height, diameter, sides, offset, text = "", font_size = 8)
{
translate([ 0, 0, offset ])
{
difference()
{
outer_radius = (diameter / 2) * 1.2;
ngon3d(sides, height, outer_radius);
union()
{
// Inner cutout - fits over tube
translate([ 0, 0, -height / 2 ]) cylinder(h = height * 2, r = diameter / 2);
// Inset text
width = outer_radius - (diameter / 2);
translate([ 0, outer_radius + font_size - width - 1, height - 2 ]) rotate([ 180, 180 ])
label(text, font_size, 5);
}
}
// guide stubs for panel cover guide holes
posts(x = diameter, z = -2, h = 4);
}
}
module panel_cover(height, diameter, inner_diameter, thickness, offset, cable_width_short, cable_width_long,
cable_length, cable_height, quarter = "")
{
intersection()
{
union()
{
translate([ 0, 0, offset ]) difference()
{
cylinder(h = height, d = diameter);
union()
{
// central cutout
translate([ 0, 0, -thickness ]) cylinder(h = height, d = diameter - thickness * 2);
// guide hole cutouts
posts(x = inner_diameter, z = -thickness + height / 2, h = height + 1, d = 2.2);
// top cutout
cylinder(h = height + thickness, d = inner_diameter - thickness);
// cable cutout
translate([ 0, (diameter - thickness) / 2, thickness / 2 + 1.5 ])
cube([ cable_width_long, thickness * 2, cable_height ], center = true);
}
}
// top cable cover
translate([ 0, diameter / 2 - thickness - 0.5, thickness ]) difference()
{
iso_trapazoid(cable_width_short + thickness * 2, cable_width_long + thickness * 2,
cable_height + thickness, cable_length);
translate([ 0, -1, -thickness ]) iso_trapazoid(cable_width_short, cable_width_long,
cable_height + thickness, cable_length + thickness);
}
}
if (quarter != "")
quarter_slice(diameter, height, quarter);
}
}
module panel_base(diameter, height, cable_width_short, cable_width_long, cable_length, thickness = 2, quarter = "")
{
intersection()
{
union()
{
translate([ 0, 0, height ]) difference()
{
ring(height, height / 2, diameter - height * 2);
translate([ 0, diameter / 2, height ]) cube(cable_width_long, center = true);
}
cylinder(h = height, d = diameter);
// bottom cable cover
translate([ 0, diameter / 2 - (thickness + 0.5), 0 ])
iso_trapazoid(cable_width_short + thickness * 2, cable_width_long + thickness * 2, 2, cable_length);
}
if (quarter != "")
quarter_slice(diameter, height, quarter);
}
}