-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstand-connector.scad
82 lines (67 loc) · 2.06 KB
/
stand-connector.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
use <connector.scad>;
head=true;
head_d=35.5; // 38 measured outside
head_thickness=2;
head_height=23;
arms=true;
total_d_len=116.5;
n_arms = 4;
arm_width = 10;
arm_height = 4;
arm_length=total_d_len/2-head_d/2+arm_width/2;
bottom=true;
$fn = 128;
inner_head_factor = 0.6;
inner_head_height = head_height*inner_head_factor;
inner_head_thickness = head_thickness;
slider_width=2;
magnet_height=2;
magnet_fitting=false;
magnet_opening_width=7;
magnet_angle_offset=10;
mid_arm=false;
mid_arm_length=20;
mid_arm_width=12;
difference() {
union() {
if (arms)
for (i=[0:n_arms]) {
offset=head_d/2;
rotate([0,0,(360/n_arms)*i])
translate([head_d/2-offset,-arm_width/2])
connector(length=arm_length+offset, width=arm_width, height=arm_height, bottom_head=false);
}
if (head) {
translate([0,0,head_height / 2])
cylinder(h=head_height, r=(head_d+head_thickness)/2, center=true);
}
}
z_pos = bottom ? head_height/2+head_thickness : head_height / 2;
height = bottom ? head_height : head_height * 2;
if (head)
translate([0,0,z_pos])
cylinder(h=height, r=head_d/2, center=true);
}
if (mid_arm) {
rotate([-45, -90])
translate([arm_height-0.01,-arm_width/2,-mid_arm_width/2])
connector(length=mid_arm_length, width=arm_width, height=mid_arm_width, bottom_head=false, sink=false);
}
// inner circle
z_pos = bottom ? inner_head_height/2+head_thickness/2 : inner_head_height/2;
if (head)
translate([0,0,z_pos])
difference() {
difference() {
cylinder(h=inner_head_height, r=(head_d)/2, center=true);
cylinder(h=inner_head_height*2, r=(head_d-inner_head_thickness)/2, center=true);
}
for (i=[0:1]) {
rotate([0, 0, 90*i])
cube([head_d,slider_width,head_height], center=true);
if (magnet_fitting)
translate([0,0,-inner_head_height/2+magnet_height/2])
rotate([0,0, 90*i-magnet_angle_offset])
cube([head_d+10, magnet_opening_width, magnet_height], center=true);
}
}