-
Notifications
You must be signed in to change notification settings - Fork 0
/
brake-caliper.kcl
73 lines (69 loc) · 2.24 KB
/
brake-caliper.kcl
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
// Brake Caliper
// Brake calipers are used to squeeze the brake pads against the rotor, causing larger and larger amounts of friction depending on how hard the brakes are pressed.
// Define constants
rotorDiameter = 12
rotorInnerDiameterThickness = 12.6
rotorTotalThickness = 25.4
caliperTolerance = 5
caliperPadLength = 40
caliperThickness = 10
caliperOuterEdgeRadius = 10
caliperInnerEdgeRadius = 3
// Create the plane for the brake caliper. This is so it can match up with the rotor model.
brakeCaliperPlane = {
plane: {
origin: { x: 0, y: 0, z: 0 },
xAxis: { x: 1, y: 0, z: 0 },
yAxis: { x: 0, y: 1, z: 0 },
zAxis: { x: 0, y: 0, z: 1 }
}
}
// Sketch the brake caliper cross section
brakeCaliperSketch = startSketchOn(brakeCaliperPlane)
|> startProfileAt([rotorDiameter/2 * 25.4+caliperTolerance, 0], %)
|> line([0, rotorTotalThickness + caliperTolerance - caliperInnerEdgeRadius], %)
|> tangentialArc({
offset: 90,
radius: caliperInnerEdgeRadius,
}, %)
|> line([-caliperPadLength + 2 * caliperInnerEdgeRadius, 0], %)
|> tangentialArc({
offset: -90,
radius: caliperInnerEdgeRadius,
}, %)
|> line([0, caliperThickness - caliperInnerEdgeRadius * 2], %)
|> tangentialArc({
offset: -90,
radius: caliperInnerEdgeRadius,
}, %)
|> line([caliperPadLength + caliperThickness - caliperOuterEdgeRadius - caliperInnerEdgeRadius, 0], %)
|> tangentialArc({
offset: -90,
radius: caliperOuterEdgeRadius,
}, %)
|> line([0, -2*caliperTolerance-2*caliperThickness-rotorTotalThickness + 2 * caliperOuterEdgeRadius], %)
|> tangentialArc({
offset: -90,
radius: caliperOuterEdgeRadius,
}, %)
|> line([-caliperPadLength - caliperThickness + caliperOuterEdgeRadius + caliperInnerEdgeRadius, 0], %)
|> tangentialArc({
offset: -90,
radius: caliperInnerEdgeRadius,
}, %)
|> line([0, caliperThickness - 2 * caliperInnerEdgeRadius], %)
|> tangentialArc({
offset: -90,
radius: caliperInnerEdgeRadius,
}, %)
|> line([caliperPadLength - 2 * caliperInnerEdgeRadius, 0], %)
|> tangentialArc({
offset: 90,
radius: caliperInnerEdgeRadius,
}, %)
|> close(%)
// Revolve the brake caliiper sketch
brakeCaliper = revolve({
axis: "Y",
angle: -70,
}, brakeCaliperSketch)