-
Notifications
You must be signed in to change notification settings - Fork 0
/
led_stand.scad
116 lines (100 loc) · 3.17 KB
/
led_stand.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
// SPDX-License-Identifier: MIT
use <lib/threads.scad>
include <lib/JointSCAD.scad>
$fa = 1;
$fs = 0.4;
// base
l_length = 256;
l_width = 6;
l_height = 128;
// keyboard tray
kb_length = 55;
kb_width = 30;
kb_height = 3;
// Mortise Joint, base
m_dimensions = [20, 6, l_height / 2];
m_proportions = [0.8, 0.2, 0.8];
// Tenon Joint, base
t_dimensions = [20, 6, l_height / 2 - 5];
t_proportions = [0.7, 0.2, 0.8];
base_right_side();
translate([l_height / 2 - 22.5, -l_width + 3, -10])
design_right();
translate([l_length / 2 - 0.001, 0, 0])
base_left_side();
translate([(l_height / 2 + 22.5) , -l_width + 3 , -10])
design_left();
module design_right() {
rotate([270,180,180])
scale([.2, .2, .02])
surface(file = "images/adafruit_logo_right.png", center=true, invert=false);
}
module design_left() {
rotate([270,180,180])
scale([.2, .2, .02])
surface(file = "images/adafruit_logo_left.png", center=true, invert=false);
}
module mounting_holes() {
cylinder(r=2.5, h=l_width, center=true);
}
module base_right_side() {
difference() {
cube([l_length / 2, l_width, l_height + 3], center=true);
rotate([0,90,90])
translate([-(l_height / 2 - l_width - 0.5), (l_length / 4 - 9), 0])
mounting_holes();
rotate([0,90,90])
translate([(l_height / 2 - l_width - 4.5), (l_length / 4 - 9), 0])
mounting_holes();
// Mortise location
translate([l_length / 2 / 2 - 20, -3, -l_height / 2 / 2])
cube([20,6,l_height / 2]);
}
translate([l_length / 2 / 2 - 20, -3, -l_height / 2 / 2])
mortise(m_dimensions, m_proportions);
translate([0,0,-l_height / 2 - 12 - 0.001])
keyboard_tray_right();
}
module base_left_side() {
difference() {
cube([l_length / 2, l_width, l_height + 3], center=true);
rotate([0,90,90])
translate([-(l_height / 2 - l_width - 0.5), -(l_length / 4 - 9), 0])
mounting_holes();
rotate([0,90,90])
translate([(l_height / 2 - l_width - 4.5), -(l_length / 4 - 9), 0])
mounting_holes();
}
translate([-l_length / 2 / 2 - 20 - 0.001, -3, -l_height / 2 / 2 + 2])
tenon(t_dimensions, t_proportions);
translate([0,0,-l_height / 2 - 12 - 0.001])
keyboard_tray_left();
}
module keyboard_tray_right() {
cube([l_length /2, l_width, 21], center=true);
translate([36.5, 35 - 0.001, -9])
cube([kb_length, (kb_width * 2) + 5, kb_height], center=true);
translate([kb_length /2 - 12.5, kb_width / 2 + 40 , -4.5 - 0.001])
difference() {
cylinder(r=3.5, h=6, center=true);
ScrewHole(outer_diam=4, height=5);
}
translate([kb_length / 2 + 18, kb_width / 2 + 48, -6 - 0.001])
cylinder(r=2, h=3, center=true);
translate([kb_length / 2 + 18, kb_width / 2 + 32, -6 - 0.001])
cylinder(r=2, h=3, center=true);
}
module keyboard_tray_left() {
cube([l_length /2, l_width, 21], center=true);
translate([-37, 35 - 0.001, -9])
cube([kb_length, (kb_width * 2) + 5, kb_height], center=true);
translate([-kb_length /2 + 12.5, kb_width / 2 + 40 , -4.5 - 0.001])
difference() {
cylinder(r=3.5, h=6, center=true);
ScrewHole(outer_diam=4, height=5);
}
translate([-kb_length / 2 - 18, kb_width / 2 + 48, -6 - 0.001])
cylinder(r=2, h=3, center=true);
translate([-kb_length / 2 - 18, kb_width / 2 + 32, -6 - 0.001])
cylinder(r=2, h=3, center=true);
}