kcl-samples → brake-caliper →
brake-caliper
KCL
// 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)