-
Notifications
You must be signed in to change notification settings - Fork 2
/
connector.scad
60 lines (47 loc) · 2 KB
/
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
// diameter of the tube (mm)
tubeDiameter = 2.197*25.4*0.95;
undersideLength = 40;
undersideWidth = 40;
flangeExtension = 70;
slotTriangleWidth = 40;
screwThreadDiameter = 5;
screwHeadDiameter = 13;
screwOffset = 5;
screwHeadInset = 5;
height = 10;
flangeHeight = 5;
singleLayer = 0.2;
difference() {
union() {
translate([-undersideWidth/2, -tubeDiameter/2 - height,0])
cube([undersideWidth,tubeDiameter/2 + height, undersideLength]);
hull() {
rotate([-90,0,0])
for (i = [-1,1],j=[-1,1])
translate([i*(flangeExtension/2 - screwHeadDiameter/2), j*(flangeExtension/2-screwHeadDiameter/2)-undersideLength/2,-tubeDiameter/2-height])
cylinder(r=screwHeadDiameter/2,h=flangeHeight,$fn=90);
}
}
rotate([-90,0,0])
for (i = [-1,1],j=[-1,1])
translate([i*(flangeExtension/2 - screwHeadDiameter/2), j*(flangeExtension/2-screwHeadDiameter/2)-undersideLength/2,-tubeDiameter/2-height])
cylinder(r=screwThreadDiameter/2,h=flangeHeight+.1,$fn=90);
color("green", alpha=0.25) cylinder(r=tubeDiameter/2, h=undersideLength, $fn=90);
intersection() {
translate([-slotTriangleWidth/2,-tubeDiameter/2-height,undersideLength/2])
color("red")
linear_extrude(height = screwHeadDiameter, center=true)
polygon( points=[[0,0],[slotTriangleWidth,0],[slotTriangleWidth/2,tubeDiameter/2+height]] );
translate([0,0,undersideLength/2]) {
difference() {
cylinder(r=tubeDiameter/2+screwOffset, h=screwThreadDiameter, $fn=90, center=true);
cylinder(r=tubeDiameter/2, h=screwThreadDiameter, $fn=90, center=true);
}
difference() {
cylinder(r=1000, h=screwHeadDiameter, $fn=90, center=true);
// tiny layer to allow easier printing
cylinder(r=tubeDiameter/2+screwOffset+singleLayer, h=screwHeadDiameter, $fn=90, center=true);
}
}
}
}