-
Notifications
You must be signed in to change notification settings - Fork 8
/
prusa-covid-shield-remix.scad
executable file
·176 lines (153 loc) · 6.45 KB
/
prusa-covid-shield-remix.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// -*- mode: scad; c-basic-offset: 2; indent-tabs-mode:nil -*-
// Incoroprating some feedback from local healthcare providers
// * weight-reducing of front-part if possible.
// * Move the shield buttons up so that there is material behind the openings
// of the shield-punches
$fn=32;
e=0.01;
// Running version number. Should align with v1.x release.
// Intermediate git release WIP add a '
version_number="9";
support_column_foot_thickness=1.2; // support-column: this much extra wide foot
support_wall=0.9; // Should work without 'detect thin walls' in slicer.
support_column_radius=5.0;
pin_diameter=5; // mm
print_layer_height=0.3; // Layer thickness we're printing
// Experimental stacking.
default_stack_height = 3;
stack_separation=print_layer_height;
function get_band_thick() = 15; // Always small these days
module maker_nexus_baseline_headband(version_text, is_pla=true) {
is_thin = true;
file = str("baseline/RC2-nexusized-", (is_pla ? "thin-pla":"thin"), ".stl");
offset = -get_band_thick() / 2;
text_depth=0.2;
difference() {
translate([0, 20, offset]) import(file, convexity=10);
// Prusa Attribution
translate([-87.2 + text_depth, -14, -5]) rotate([90, 0, -90])
translate([0, 1, 0]) linear_extrude(height=2) text("Prusa", size=9, halign="center", font="style:Bold");
// Maker Nexus Attribution
translate([87.26 - text_depth, -30, 0]) {
translate([0, 4, 1]) rotate([90, 0, 90]) linear_extrude(height=1)
text("Maker", size=5, halign="left", font="style:Bold");
translate([0, 4, -5]) rotate([90, 0, 90]) linear_extrude(height=1)
text("Nexus", size=5, halign="left", font="style:Bold");
}
// Keep track of MakerNexus Version number
translate([84.75 + text_depth, -48, -4]) rotate([90, 0, -90]) linear_extrude(height=1)
text(str(version_text, version_number),
size=8, halign="right", font="style:Bold");
}
}
// Support for the pins.
module support_column(angle=0, dist=0, wall_thick=support_wall,
is_first=true, is_last=true, is_pla=false) {
r=support_column_radius;
// distances were originally calibrated for r=5mm
dist=dist-(5-support_column_radius);
band_thick = get_band_thick();
level_thick=2*print_layer_height;
support_platform = (get_band_thick() - pin_diameter)/2 - print_layer_height;
h=is_last ? support_platform : band_thick + stack_separation;
color("yellow") rotate([0, 0, angle]) translate([0, dist, -band_thick/2])
rotate([0, 0, 180]) {
intersection() {
translate([-r, -r-2.5, 0]) cube([2*r, 2*r, h]);
union() {
difference() {
union() {
cylinder(r=r, h=h); // Column
translate([-r, 0, 0]) cube([2*r, 0.5*r, h]); // .. flattened
}
translate([0, 0, -e]) union() { // Remove inside
translate([0, 0, 0]) cylinder(r=r-wall_thick, h=h+2*e);
translate([-(r-wall_thick), 0, 0]) cube([2*(r-wall_thick), r, h+2*e]);
}
}
// The 'shelf' part.
translate([0, -0.5, support_platform-level_thick]) {
translate([-r, 0, 0]) cube([2*r, 3, level_thick]);
cylinder(r=r-wall_thick, h=level_thick);
}
// shelf supports
support_edge_length = (r/2);
translate([0, 0, support_platform-level_thick]) rotate([-90, 0, 0]) {
translate([-(r-wall_thick), 0, 0]) {
linear_extrude(height=r) polygon([[0, 0], [support_edge_length, 0], [0, support_edge_length]]);
}
translate([r-wall_thick, 0, 0]) {
linear_extrude(height=r) polygon([[0, 0], [-support_edge_length, 0], [0, support_edge_length]]);
}
rotate([90, 0, 0]) translate([0, 0, -support_edge_length]){
rotate_extrude(angle=180) translate([-(r-wall_thick), 0, 0]) polygon([[0, 0], [support_edge_length, support_edge_length], [0, support_edge_length]]);
}
}
translate([-((r/2)+.5), 1, support_platform-(level_thick*2)]) cube([r+.5, 3, level_thick]);
}
}
// Some stability foot if we're first. Don't make it entirely solid, as
// that seems to be too well connected to the build-bed.
if (is_first) intersection() {
translate([-15/2, -7.5, 0]) cube([15, 10, 1]);
union() {
difference() {
cylinder(r=r, h=.3);
translate([0, 0, -e]) cylinder(r=r-support_column_foot_thickness-wall_thick, h=0.3+2*e);
}
translate([-r, 1, 0]) cube([2*r, 1.5, 0.3]);
}
}
}
}
// The angle and distance the pins. We only need some rough position,
// as we just use this as a cut-out where we do the material-move operation.
// There we just move the bottom part up and replace the bottom part with
// what we found above (angles, positions determined empirically)
pin_angle_distances = [ [18.5, 94.8], [-18.5, 94.8], [69, 100.5], [-69, 100.5]];
module print_shield(version_text, do_punches=false, pin_support=false,
is_pla=false, is_first=true, is_last=true) {
maker_nexus_baseline_headband(version_text, is_pla);
// Add support for the pins.
if (pin_support) {
for (x = pin_angle_distances) support_column(x[0], x[1],
is_pla=is_pla,
is_last=is_last,
is_first=is_first);
}
}
// Print a stack of face-shields.
module print_stack(count=default_stack_height, is_pla=false) {
stack_distance = get_band_thick() + stack_separation;
base_version = is_pla ? "s" : "S";
for (i = [0:1:count-e]) {
translate([0, 0, i*stack_distance]) {
is_first = (i == 0);
is_last = (i == (count - 1));
print_shield(base_version, pin_support=true,
is_first=is_first, is_last=is_last,
is_pla=is_pla);
}
}
}
/* Some functions which we use to generate named
* STLs directly in the Makefile
*/
module thin_shield_no_support() {
print_shield("T", pin_support=false, is_pla=false);
}
module thin_shield_with_support() {
print_shield("T", pin_support=true, is_pla=false);
}
module thin_pla_shield_no_support() {
print_shield("t", pin_support=false, is_pla=true);
}
module thin_pla_shield_with_support() {
print_shield("t", pin_support=true, is_pla=true);
}
module thin_stack_with_support() {
print_stack(default_stack_height, is_pla=false);
}
// Local testing call. Can be left in, it will be ignored in the Makefile.
thin_pla_shield_with_support();
//print_stack(3, is_thin=true);