-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecathlon_bike_bag_custom_clamp.scad
135 lines (123 loc) · 5.08 KB
/
decathlon_bike_bag_custom_clamp.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// All measurements are in millimeters
/**** Special variables ****/
$fn = 100;
/**** Parameters ****/
// Space between the base plate and the clamp arm
clamp_gap = 16;
// Thickness of clamp base bloc
clamp_bloc = 8;
// Thickness of arm of clamp
clamp_arm_thickness = 5;
// Length of clamp arm
clamp_length = 46;
// Thickness of main base plate
base_plate_thickness = 3;
// Decathlon bag rail specific value
jaw_arm_length = 3;
// Decathlon bag rail specific value
jaw_arm_thickness = 3;
// Decathlon bag rail specific value
jaw_tooth_length = 2.5;
// Decathlon bag rail specific value
jaw_between_arms = 22;
// Space between end of clamp arm and beginning of protrusion
space_between_clamp_and_bump = 30;
// Radius of screw hole
hole_radius = 2.25;
// Space between the two screw arms
canyon_gap = 17;
// Open-end wrench size for the bolt
bolt_wrench = 7.5;
// Depth of hole for the bolt
bolt_thickness = 2.5;
// Margin around bolt hole
bolt_margin = 1;
// External radius of bolt
//bolt_radius = 4.5;
/**** Values depending on parameters ****/
// External radius of bolt
bolt_radius = bolt_wrench / (2 * cos(30));
// Height of bolt protrusion
bump_height = bolt_wrench + 2*bolt_margin - base_plate_thickness;
// Length of bolt protrusion
bump_length = 2*bolt_margin + bolt_radius;
total_width = jaw_arm_thickness + jaw_between_arms + jaw_arm_thickness;
total_length = clamp_bloc + clamp_length + space_between_clamp_and_bump + bump_length + bump_height + base_plate_thickness;
total_base_thickness = jaw_arm_thickness+jaw_arm_length+base_plate_thickness;
total_bump_height = total_base_thickness+bump_height;
total_height = total_base_thickness + clamp_gap + clamp_arm_thickness;
hole_distance = (base_plate_thickness+bump_height) / 2;
/**** Constraints ****/
if(hole_radius > base_plate_thickness+bump_height)
{
hole_radius = base_plate_thickness+bump_height;
}
/**** Actual model ****/
rotate([0,-90,-90]) // Rotation for vertical model
difference(){
linear_extrude(height=total_width)
difference(){
// Main shape
polygon([
[0, 0],
[total_length, 0],
[total_length, jaw_arm_thickness + jaw_arm_length],
[total_length-base_plate_thickness-bump_height, total_bump_height],
[total_length-base_plate_thickness-bump_height-bump_length, total_bump_height],
[clamp_bloc+clamp_length+space_between_clamp_and_bump-bump_height, total_base_thickness],
[clamp_bloc+clamp_gap/2, total_base_thickness],
[clamp_bloc+clamp_gap/2, total_base_thickness+clamp_gap],
[clamp_bloc+clamp_length, total_base_thickness+clamp_gap],
[clamp_bloc+clamp_length, total_base_thickness+clamp_gap+clamp_arm_thickness],
[0, total_base_thickness+clamp_gap+clamp_arm_thickness],
]);
// Circle at bottom of clamp
translate([clamp_bloc + clamp_gap/2, jaw_arm_thickness + jaw_arm_length + base_plate_thickness + clamp_gap/2, 0])
circle(clamp_gap/2);
}
// Jaw
rotate([0,90,0])
linear_extrude(height=total_length+0.1)
mirror([1,0,0])
polygon([
[jaw_arm_thickness+jaw_tooth_length, -0.1],
[jaw_arm_thickness+jaw_tooth_length, jaw_arm_thickness],
[jaw_arm_thickness, jaw_arm_thickness],
[jaw_arm_thickness, jaw_arm_thickness+jaw_arm_length],
[jaw_arm_thickness+jaw_between_arms, jaw_arm_thickness+jaw_arm_length],
[jaw_arm_thickness+jaw_between_arms, jaw_arm_thickness],
[jaw_arm_thickness+jaw_between_arms-jaw_tooth_length, jaw_arm_thickness],
[jaw_arm_thickness+jaw_between_arms-jaw_tooth_length,-0.1],
]);
// Canyon
mirror([0,1,0])
translate([clamp_bloc+clamp_length+canyon_gap/2, 0, (total_width-canyon_gap)/2])
rotate([90,0,0])
linear_extrude(height=total_bump_height+0.1)
union()
{
square([0.1+space_between_clamp_and_bump+bump_length+bump_height+base_plate_thickness-canyon_gap/2, canyon_gap]);
translate([0, canyon_gap/2,0])
circle(canyon_gap/2);
}
// Screw space
translate([0,0,total_width])
mirror([0,0,1])
translate([clamp_bloc+clamp_length+space_between_clamp_and_bump+bump_length/2,total_bump_height-hole_distance,0])
union(){
// Bolt space
linear_extrude(height=bolt_thickness)
circle(r=bolt_radius, $fn=6);
// Screw hole
cylinder(total_width, hole_radius, hole_radius);
}
// Rounded clamp
translate([clamp_length+clamp_bloc-total_width/2, total_height,0])
rotate([90,0,0])
linear_extrude(height=clamp_arm_thickness)
difference()
{
square([0.1+total_width/2, total_width]);
translate([0,total_width/2,0]) circle(total_width/2);
}
}