-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathholder.scad
70 lines (59 loc) · 1.47 KB
/
holder.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
// Copyright (c) 2016 Kenneth Johansson <ken@kenjo.org>
// License: BSD
// cable diameter
cable = 8;
// number of cable pairs for holder
rows = 1;
// wall thikness */
thik = 1.5;
// size of opening for cable
angel = 50; // [90]
/*******************************************************************************/
/* [Hidden] */
$fn=50;
outer = cable + 2*thik;
clips(rows);
/* rows of dual clips */
module clips(num) {
linear_extrude(height=3) {
for(idx=[0 : 1 : num-1 ]) {
translate([0, outer * idx])
dual();
}
}
}
/* dual clip, centred */
module dual() {
copy_mirror()
translate([outer/2, outer/2])
clip(cable, outer, angel);
}
/* single clip, centered */
module clip(cable, outer, angel) {
difference() {
union() {
/* fill in the middle */
translate([-outer/2,0])
square(outer/2);
translate([-outer/2,-outer/2])
square(outer/2);
/* outer circle */
circle(d=outer);
}
/* remove cable circle */
circle(d=cable);
polygon(points=[[0,0],[ outer/2, tan(angel)*outer/2],[outer/2,-tan(angel)*outer/2]]);
}
/* Add rouded edge */
hyp = ((outer-cable)/2 + cable)/2;
translate([ cos(angel)*hyp , sin(angel)*hyp])
circle(d=(outer-cable)/2);
translate([ cos(angel)*hyp , -sin(angel)*hyp])
circle(d=(outer-cable)/2);
}
/******************************************************************************/
/* generic helpers */
module copy_mirror(vec=[1,0,0]) {
children();
mirror(vec) children();
}