-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcubo_side_top.scad
66 lines (52 loc) · 1.61 KB
/
cubo_side_top.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
include <NopSCADlib/core.scad>
include <cubo_common.scad>
use <cubo_joints.scad>
use <cubo_label.scad>
use <cubo_side_generic.scad>
shift = (side_length / 2) - side_thickness;
module
cubo_side_with_connectors(text = "ready", with_insert = true)
{
union()
{
cubo_side_with_label(text = text);
rotate([ 0, 0, 0 ]) translate([ shift, shift, side_thickness ])
double_connector(with_insert = with_insert);
rotate([ 0, 0, 90 ]) translate([ shift, shift, side_thickness ])
double_connector(with_insert = with_insert);
rotate([ 0, 0, 180 ]) translate([ shift, shift, side_thickness ])
double_connector(with_insert = with_insert);
rotate([ 0, 0, 270 ]) translate([ shift, shift, side_thickness ])
double_connector(with_insert = with_insert);
}
}
module
cubo_top(with_insert = true)
{
cubo_side_with_connectors(text = "hat", with_insert = with_insert);
}
// cubo_top();
module
cubo_top_empty(with_insert = true)
{
difference()
{
cubo_top(with_insert = with_insert);
translate([ 0, 0, side_thickness / 2 ]) cube(
[
side_length - frame_length,
side_length - frame_length,
side_thickness +
delta
],
center = true);
}
}
cubo_connector = "insert"; // insert, nut
cubo_fill = ""; // filled, empty
with_insert = cubo_connector == "insert" ? true : false;
if (cubo_fill == "empty") {
cubo_top_empty(with_insert = with_insert);
} else if (cubo_fill == "filled") {
cubo_top(with_insert = with_insert);
}