git.haldean.org h1a / 2b1d727
new rocket-ship base design haldean 2 years ago
1 changed file(s) with 32 addition(s) and 54 deletion(s). Raw diff Collapse all Expand all
00 include <dims.scad>
11
2 use_round = false;
3 base_rad = use_round ? 230 : 200;
4 base_th = use_round ? 40 : 10;
5 base_shelf = 15;
6 base_cr = use_round ? 140 : 170;
7 base_wall = 15;
2 sleeve_h = 150;
83 channel_h = cap_depth;
4 base_wall = 10;
5 standoff_height = 50;
6 otod_pad = 1.8;
7 fin_h = 50;
8 fin_w = 80;
99
10 module profile_round() {
10 module ring(height) {
1111 difference() {
12 union() {
13 polygon([
14 [otod/2,0],
15 [base_rad, 0],
16 [base_rad, base_th],
17 [otod/2+base_shelf+base_cr, base_th],
18 [otod/2+base_shelf+base_cr, base_th+base_cr],
19 [otod/2, base_th+base_cr],
20 ]);
21 translate([otod/2, base_th+base_cr, 0])
22 circle(base_shelf);
23 }
24 translate([otod/2+base_shelf+base_cr, base_th+base_cr, 0])
25 circle(base_cr);
26 square([otod/2, base_th+base_cr+base_shelf+eps]);
12 cylinder(h=height, r=otod / 2 + base_wall);
13 translate([0, 0, -eps])
14 cylinder(h=height + 2 * eps, r=(otod + otod_pad) / 2);
2715 }
2816 }
2917
30 module profile_sharp() {
31 polygon([
32 [otod/2,0],
33 [base_rad, 0],
34 [base_rad, base_th],
35 [otod/2, base_th+base_cr],
36 ]);
37 }
38
39 module profile() {
40 if (use_round) {
41 profile_round();
42 } else {
43 profile_sharp();
18 module base() {
19 union() {
20 difference() {
21 ring(sleeve_h);
22 translate([-channel_w/2, 0, -eps])
23 cube([channel_w, otod/2+base_wall+eps, channel_h]);
24 }
25 for (i = [0 : 3]) {
26 rotate([0, 0, 45 + 90 * i]) {
27 translate([-(otod + otod_pad) / 2, -base_wall/2, 0]) union() {
28 cube([base_wall, base_wall, standoff_height]);
29 }
30 translate([-otod/2 - base_wall, -base_wall/2, 0])
31 rotate([-90, 180, 0]) linear_extrude(base_wall)
32 polygon([[0, 0], [fin_w, 0], [0, fin_h]]);
33 }
34 }
4435 }
4536 }
37 %color("gray", 0.2)
38 translate([-330/2, -240/2, 0])
39 cube([330, 240, 300]);
4640
47 module base(for_printing) {
48 rotate([for_printing ? 90 : 0, 0, 0])
49 difference() {
50 rotate_extrude() difference() {
51 profile();
52 offset(-base_wall) profile();
53 polygon([
54 [otod/2+base_wall, -eps],
55 [base_rad-base_wall, -eps],
56 [base_rad-base_wall, base_wall + eps],
57 [otod/2+base_wall, base_wall + eps]]);
58 }
59 translate([-channel_w/2, 0, -eps])
60 cube([channel_w, otod/2+base_wall+eps, channel_h]);
61 }
62 }
63
64 base(false);
41 base();
42 // ring(20);