-
Notifications
You must be signed in to change notification settings - Fork 1
/
sensor_case_ranger.scad
92 lines (87 loc) · 1.7 KB
/
sensor_case_ranger.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
include <lib/rj45_case.scad>
include <conf/config.scad>
x=53;
x1=15;
y1=22;
y2=53;
z1=18;
z2=33;
//default action PRINT or RENDER
/* ACTION=PRINT; */
/* ACTION=ASSY; */
module part(cutout=NONE) {
if (cutout==TOP) {
translate([-5, 0, 0]) {
rj45();
}
} else if (cutout==BOTTOM) {
} else {
difference() {
translate([10-w, 0, 0]) {
grove_rj45(cone=true);
}
translate([-8+w, -5, -w]) {
cube(size=[5, 10, 10]);
}
}
}
translate([x-10, 0, 16]) {
rotate([0, 0, 90]) {
rotate([90, 0, 0]) {
if (cutout==BOTTOM) {
//part to cut as holes in the case
grove_ranger2(1);
} else if (cutout==TOP) {
} else {
//part to add to the case
difference() {
intersection() {
ranger_holder(h=8,cone=false);
translate([0, 0, 5]) {
cube(size=[x, z2, x1], center=true);
}
}
*translate([-7.5, 25/2, 0]) {
cube(size=[20, 20, 17], center=true);
}
}
// ranger installation position
translate([0, 0, -8]) {
%grove_ranger2();
}
}
}
}
}
}
module print() {
/* render() */
{
translate([0, 0, x+w]) {
rotate([0, 90, 0]) {
box_bottom();
}
}
translate([x*1, 0, 0]) {
rotate([0, 0, 180]) {
rotate([0, -90, 0]) {
box_top();
}
}
}
translate([w*3, -y2*1.5, 5+w]) {
box_holder();
}
}
}
module assembly() {
box_bottom();
translate([-w, 0, -w]) {
if (ACTION==RENDER) {
%box_top();
} else {
box_top();
}
}
box_holder();
}