-
Notifications
You must be signed in to change notification settings - Fork 0
/
belt-clamp-corner.scad
93 lines (69 loc) · 2.19 KB
/
belt-clamp-corner.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
93
//----------------------------------------------------------------------------
epsilon = 0.1;
$fn = 36;
width = 40;
diameter = 50;
belt_width = 25;
roundover_offset = 6;
roundover_radius = 20;
bolt_diameter = 5;
pin_diameter = 5;
pin_length = width / 8;
//----------------------------------------------------------------------------
half_corner_with_pins();
//----------------------------------------------------------------------------
module half_corner_with_pins() {
difference() {
half_corner();
translate([diameter / 6, -diameter / 6, 0])
translate([0, 0, width / 2 - pin_length])
cylinder(d = pin_diameter, h = pin_length + epsilon);
}
translate([-diameter / 6, diameter / 6, 0])
translate([0, 0, width / 2])
cylinder(d = pin_diameter * .95, h = pin_length);
}
//----------------------------------------------------------------------------
module half_corner() {
difference() {
corner();
translate([-diameter / 2 - epsilon, -diameter / 2 - epsilon, width / 2])
cube([diameter + 2 * epsilon, diameter + 2 * epsilon, width / 2 + epsilon]);
}
}
//----------------------------------------------------------------------------
module corner() {
difference() {
body();
corner_cutoff();
bolt_cutoff();
}
}
//----------------------------------------------------------------------------
module body() {
base_height = (width - belt_width) / 2;
cylinder(d = diameter, h = base_height);
translate([0, 0, width - base_height])
cylinder(d = diameter, h = base_height);
translate([0, 0, base_height])
intersection() {
translate([roundover_offset, roundover_offset, 0])
cylinder(r = roundover_radius, h = belt_width);
cylinder(d = diameter, h = belt_width);
}
}
module corner_cutoff() {
translate([0, 0, -epsilon])
cube([diameter, diameter, width + 2 * epsilon]);
}
module bolt_cutoff() {
x = sqrt(2) * roundover_offset;
y = roundover_radius - x;
q = diameter / 2 - y;
bolt_offset = (y + q / 2) / sqrt(2);
translate([-bolt_offset, -bolt_offset, 0])
translate([0, 0, -epsilon])
cylinder(d = bolt_diameter, h = width + 2 * epsilon);
}
//----------------------------------------------------------------------------
// vim:ft=openscad