-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaptop Stand Attachment.scad
88 lines (73 loc) · 2.15 KB
/
Laptop Stand Attachment.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
block_angle_height = 10;
block_angle_measure = 50;
block_angle_chamfer = 45;
block_inset_length_0 = 29.9;
block_inset_length_1 = 35.5;
block_inset_depth = 10.4;
block_inset_width = 12;
block_burr_radius = 1.5;
block_burr_depth = 0.8;
block_sink_depth = 0.4;
block_sink_margin_sides = 4;
block_sink_margin_top = 2;
module block_burr() {
resize([0, block_burr_depth * 2, 0])
sphere(block_burr_radius, $fn=30);
}
module block_sink() {
cube([100, block_sink_depth, block_inset_depth - block_sink_margin_top]);
}
module block_inset() {
union() {
difference() {
translate([0, block_inset_width, 0]) rotate([90, 0, 0])
linear_extrude(block_inset_width) polygon([
[0, 0],
[block_inset_length_0, 0],
[block_inset_length_1, block_inset_depth],
[0, block_inset_depth]
]);
translate([block_inset_length_0 - block_sink_margin_sides - block_burr_radius, 0, 0]) {
translate([0, block_inset_width - block_sink_depth, 0])
block_sink();
block_sink();
}
}
translate([block_inset_length_0 - block_burr_radius, 0, block_inset_depth / 2]) {
translate([0, block_sink_depth, 0])
block_burr();
translate([0, block_inset_width - block_sink_depth, 0])
block_burr();
}
}
}
module block_angle() {
difference() {
rotate([90, 0, 90])
linear_extrude(block_inset_length_1) polygon([
[0, 0],
[block_inset_width, 0],
[block_angle_height / tan(block_angle_measure), block_angle_height]
]);
rotate([0, block_angle_chamfer, 0]) translate([-100, 0, 0])
cube([100, block_inset_width, 100]);
translate([block_inset_length_1, 0, 0]) rotate([0, -block_angle_chamfer, 0])
cube([100, block_inset_width, 100]);
}
}
module block(orientation) {
if (orientation == "right")
translate([0, block_inset_width, 0]) rotate([0, 0, 180]) mirror([1, 0, 0])
block("left");
else
union() {
block_inset();
translate([0, 0, block_inset_depth])
block_angle();
}
}
rotate([0, -90, 0])
block("left");
translate([0, block_inset_width + 10, 0])
rotate([0, -90, 0])
block("right");