2025-03-06 18:01:24 -05:00
|
|
|
// J3 Robot Arm
|
|
|
|
|
|
|
|
// Set Units
|
|
|
|
@settings(defaultLengthUnit = in)
|
|
|
|
|
|
|
|
import plane002, axisJ2, axisJ3C, axisJ4, axisJ2ArmLength, axisJ3CArmLength, axisJ3CArmWidth, axisJ3CArmThickness from "globals.kcl"
|
|
|
|
|
|
|
|
// Create Body of J3 Robot Arm
|
|
|
|
sketch017 = startSketchOn(plane002)
|
|
|
|
|> startProfileAt([
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) - (axisJ3CArmWidth / 2 * sin(toRadians(axisJ3C))),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmWidth / 2 * cos(toRadians(axisJ3C))
|
|
|
|
], %)
|
|
|
|
|> arc({
|
|
|
|
angleStart = 90 + axisJ3C,
|
|
|
|
angleEnd = 270 + axisJ3C,
|
|
|
|
radius = axisJ3CArmWidth / 2
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C,
|
|
|
|
length = axisJ3CArmLength
|
|
|
|
}, %)
|
|
|
|
|> arc({
|
|
|
|
angleStart = 270 + axisJ3C,
|
|
|
|
angleEnd = 90 + axisJ3C,
|
|
|
|
radius = axisJ3CArmWidth / 2
|
|
|
|
}, %)
|
|
|
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)], tag = $seg01)
|
|
|
|
|> close()
|
|
|
|
extrude017 = extrude(sketch017, length = axisJ3CArmThickness)
|
|
|
|
|
|
|
|
sketch018 = startSketchOn(extrude017, 'END')
|
|
|
|
|> circle(
|
|
|
|
center = [
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2))
|
|
|
|
],
|
|
|
|
radius = 3.7 / 2,
|
2025-03-26 08:53:34 -07:00
|
|
|
tag = $referenceEdge6,
|
|
|
|
)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
|
|
|
extrude018 = extrude(sketch018, length = 0.15)
|
2025-03-26 08:53:34 -07:00
|
|
|
|> fillet(radius = 0.1, tags = [getOppositeEdge(referenceEdge6)])
|
2025-03-06 18:01:24 -05:00
|
|
|
|
|
|
|
// Draw Bolt Pattern on J3 Robot Arm
|
|
|
|
sketch019 = startSketchOn(extrude018, 'END')
|
|
|
|
|> circle(
|
|
|
|
center = [
|
|
|
|
1.75 + (axisJ2ArmLength - 1) * cos(toRadians(axisJ2)),
|
|
|
|
8 + (axisJ2ArmLength - 1.5) * sin(toRadians(axisJ2))
|
|
|
|
],
|
2025-03-26 08:53:34 -07:00
|
|
|
radius = 0.2,
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
|> patternCircular2d(
|
|
|
|
center = [
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2))
|
|
|
|
],
|
|
|
|
instances = 8,
|
|
|
|
arcDegrees = 360,
|
2025-03-26 08:53:34 -07:00
|
|
|
rotateDuplicates = true,
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
extrude019 = extrude(sketch019, length = 0.15)
|
|
|
|
|
|
|
|
// On the J3 Robot Arm Body, Create Mounting Clevis for Grabber Claw
|
|
|
|
sketch020 = startSketchOn(extrude017, 'START')
|
|
|
|
|> circle(
|
|
|
|
center = [
|
|
|
|
-1.75 - (axisJ2ArmLength * cos(toRadians(axisJ2))) - (axisJ3CArmLength * cos(toRadians(axisJ3C))),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
|
|
|
|
],
|
2025-03-26 08:53:34 -07:00
|
|
|
radius = axisJ3CArmWidth / 2,
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
extrude020 = extrude(sketch020, length = -0.5)
|
|
|
|
|
|
|
|
sketch021 = startSketchOn(extrude017, 'END')
|
|
|
|
|> circle(
|
|
|
|
center = [
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
|
|
|
|
],
|
2025-03-26 08:53:34 -07:00
|
|
|
radius = axisJ3CArmWidth / 2.01,
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
extrude021 = extrude(sketch021, length = -0.5)
|
|
|
|
|
|
|
|
// Define Grabber Claw Constants
|
|
|
|
grabberLength = 7
|
|
|
|
|
|
|
|
sketch022 = startSketchOn(extrude021, 'START')
|
|
|
|
|> circle(center = [0, 0], radius = 0.10)
|
|
|
|
|
|
|
|
extrude022 = extrude(sketch022, length = -0.01)
|
|
|
|
|
|
|
|
// Build Upper Claw Finger
|
|
|
|
sketch023 = startSketchOn(extrude022, 'START')
|
|
|
|
|> startProfileAt([
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
|
|
|
|
], %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C + axisJ4 / 2,
|
|
|
|
length = grabberLength / 4
|
|
|
|
}, %)
|
|
|
|
|> arc({
|
|
|
|
angleStart = 150 + axisJ3C + axisJ4 / 2,
|
|
|
|
angleEnd = 30 + axisJ3C + axisJ4 / 2,
|
|
|
|
radius = grabberLength / 3
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C + axisJ4 / 2,
|
|
|
|
length = grabberLength / 6
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C + axisJ4 / 2 + 132,
|
|
|
|
length = grabberLength / 3.5
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C + axisJ4 / 2 + 160,
|
|
|
|
length = grabberLength / 3.5
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C + axisJ4 / 2 + 200,
|
|
|
|
length = grabberLength / 3
|
|
|
|
}, %)
|
|
|
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|
|
|
|> close()
|
|
|
|
|
|
|
|
extrude023 = extrude(sketch023, length = -1.5)
|
|
|
|
|
|
|
|
// Build Lower Claw Finger
|
|
|
|
sketch024 = startSketchOn(extrude022, 'START')
|
|
|
|
|> startProfileAt([
|
|
|
|
1.75 + axisJ2ArmLength * cos(toRadians(axisJ2)) + axisJ3CArmLength * cos(toRadians(axisJ3C)),
|
|
|
|
8 + axisJ2ArmLength * sin(toRadians(axisJ2)) + axisJ3CArmLength * sin(toRadians(axisJ3C))
|
|
|
|
], %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C - (axisJ4 / 2),
|
|
|
|
length = grabberLength / 4
|
|
|
|
}, %)
|
|
|
|
|> arc({
|
|
|
|
angleStart = 210 + axisJ3C - (axisJ4 / 2),
|
|
|
|
angleEnd = 330 + axisJ3C - (axisJ4 / 2),
|
|
|
|
radius = grabberLength / 3
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C - (axisJ4 / 2),
|
|
|
|
length = grabberLength / 6
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C - (axisJ4 / 2) - 132,
|
|
|
|
length = grabberLength / 3.5
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C - (axisJ4 / 2) - 160,
|
|
|
|
length = grabberLength / 3.5
|
|
|
|
}, %)
|
|
|
|
|> angledLine({
|
|
|
|
angle = axisJ3C - (axisJ4 / 2) - 200,
|
|
|
|
length = grabberLength / 3
|
|
|
|
}, %)
|
|
|
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
|
|
|
|> close()
|
|
|
|
|
|
|
|
extrude(sketch024, length = -1.5)
|
|
|
|
|> appearance(color = "#6572b3", metalness = 90, roughness = 90)
|