2025-03-06 18:01:24 -05:00
|
|
|
// Food Service Spatula
|
|
|
|
// Use these spatulas for mixing, flipping, and scraping.
|
|
|
|
|
|
|
|
// Set units
|
2025-05-06 08:44:03 +12:00
|
|
|
@settings(defaultLengthUnit = mm, kclVersion = 1.0)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Define parameters
|
2025-03-06 18:01:24 -05:00
|
|
|
flipperThickness = 3.5
|
|
|
|
flipperLength = 70.0
|
|
|
|
handleWidth = 15.0
|
|
|
|
gripLength = 150.0
|
|
|
|
flipperFilletRadius = 5.0
|
|
|
|
flipperSlotWidth = 10.0
|
|
|
|
gripWidth = 10.0
|
|
|
|
gripHeight = 20.0
|
|
|
|
gripFilletRadius = 3.0
|
|
|
|
gripSlotWidth = 8.0
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Function for drawing slots on a sketch given the start and end points as well as a width
|
2025-03-06 18:01:24 -05:00
|
|
|
fn slot(sketch1, start, end, width) {
|
|
|
|
angle = if start[0] == end[0] {
|
|
|
|
if end[1] > start[1] {
|
|
|
|
90
|
|
|
|
} else {
|
|
|
|
270
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if end[0] < start[0] {
|
2025-04-30 11:07:05 -04:00
|
|
|
units::toDegrees(atan((end[1] - start[1]) / (end[0] - start[0]))) + 180
|
2025-03-06 18:01:24 -05:00
|
|
|
} else {
|
2025-05-02 16:08:12 -05:00
|
|
|
units::toDegrees(atan((end[1] - start[1]) / (end[0] - start[0])))
|
2025-03-06 18:01:24 -05:00
|
|
|
}
|
|
|
|
}
|
2025-04-26 19:33:41 -04:00
|
|
|
dist = sqrt(pow(end[1] - start[1], exp = 2) + pow(end[0] - start[0], exp = 2))
|
2025-04-30 11:07:05 -04:00
|
|
|
xstart = width / 2 * cos(angle - 90) + start[0]
|
|
|
|
ystart = width / 2 * sin(angle - 90) + start[1]
|
2025-04-25 16:01:35 -05:00
|
|
|
slotSketch = startProfile(sketch1, at = [xstart, ystart])
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
|> angledLine(angle = angle, length = dist)
|
2025-04-11 14:17:20 -04:00
|
|
|
|> tangentialArc(radius = width / 2, angle = 180)
|
KCL: Angled line should use keyword args (#5803)
We continue migrating KCL stdlib functions to use keyword arguments. Next up is the `angledLine` family of functions (except `angledLineThatIntersects, which will be a quick follow-up).
Before vs. after:
`angledLine({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, length = 3, tag = $edge)`
`angledLineOfXLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthX = 3, tag = $edge)`
`angledLineOfYLength({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, lengthY = 3, tag = $edge)`
`angledLineToX({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteX = 3, tag = $edge)`
`angledLineToY({angle = 90, length = 3}, %, $edge)`
=> `angledLine(angle = 90, endAbsoluteY = 3, tag = $edge)`
2025-04-09 14:55:15 -05:00
|
|
|
|> angledLine(angle = angle, length = -dist)
|
2025-04-11 14:17:20 -04:00
|
|
|
|> tangentialArc(endAbsolute = [profileStartX(%), profileStartY(%)])
|
2025-03-06 18:01:24 -05:00
|
|
|
|> close()
|
|
|
|
return slotSketch
|
|
|
|
}
|
|
|
|
|
2025-04-30 17:13:11 +12:00
|
|
|
// Create a sketch on the XY plane for the flipper
|
2025-04-09 15:21:05 -04:00
|
|
|
flipperSketch = startSketchOn(XY)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the flipper
|
2025-04-25 16:01:35 -05:00
|
|
|
flipperProfile = startProfile(flipperSketch, at = [-flipperLength, -32.0])
|
2025-03-06 18:01:24 -05:00
|
|
|
|> line(end = [flipperLength, 2.0])
|
2025-03-07 22:07:16 -06:00
|
|
|
|> yLine(length = 60.0, tag = $backEdge)
|
2025-03-06 18:01:24 -05:00
|
|
|
|> line(end = [-flipperLength, 2.0])
|
2025-04-18 17:40:44 -05:00
|
|
|
|> arc(angleStart = 163.087610, angleEnd = 196.912390, radius = 110.0)
|
2025-03-06 18:01:24 -05:00
|
|
|
|> close()
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the middle
|
2025-05-01 11:36:51 -05:00
|
|
|
slotProfile000 = slot(
|
|
|
|
sketch1 = flipperSketch,
|
|
|
|
start = [-25, 0],
|
|
|
|
end = [-55, 0],
|
|
|
|
width = flipperSlotWidth,
|
|
|
|
)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the top slot
|
2025-05-01 11:36:51 -05:00
|
|
|
slotProfile001 = slot(
|
|
|
|
sketch1 = flipperSketch,
|
|
|
|
start = [-25, 18],
|
|
|
|
end = [-55, 19],
|
|
|
|
width = flipperSlotWidth,
|
|
|
|
)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the bottom slot
|
2025-05-01 11:36:51 -05:00
|
|
|
slotProfile002 = slot(
|
|
|
|
sketch1 = flipperSketch,
|
|
|
|
start = [-25, -18],
|
|
|
|
end = [-55, -19],
|
|
|
|
width = flipperSlotWidth,
|
|
|
|
)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile with slots for the spatula
|
2025-03-06 18:01:24 -05:00
|
|
|
spatulaProfile = flipperProfile
|
2025-04-26 15:31:51 -05:00
|
|
|
|> subtract2d(tool = slotProfile000)
|
|
|
|
|> subtract2d(tool = slotProfile001)
|
|
|
|
|> subtract2d(tool = slotProfile002)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Extrude the profile to create the spatula flipper
|
2025-03-06 18:01:24 -05:00
|
|
|
flipper = extrude(spatulaProfile, length = flipperThickness)
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Fillet the edges of the flipper
|
2025-03-06 18:01:24 -05:00
|
|
|
fillet(
|
|
|
|
flipper,
|
|
|
|
radius = flipperFilletRadius,
|
|
|
|
tags = [
|
|
|
|
getNextAdjacentEdge(backEdge),
|
|
|
|
getPreviousAdjacentEdge(backEdge)
|
2025-03-26 08:53:34 -07:00
|
|
|
],
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
|
2025-04-30 17:13:11 +12:00
|
|
|
// Create a sketch on the XZ plane offset by half the thickness
|
2025-04-09 15:21:05 -04:00
|
|
|
handleSketch = startSketchOn(offsetPlane(XZ, offset = -handleWidth / 2))
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the spatula handle
|
2025-04-25 16:01:35 -05:00
|
|
|
handleProfile = startProfile(handleSketch, at = [0.0, flipperThickness])
|
2025-03-06 18:01:24 -05:00
|
|
|
|> line(end = [31.819805, 31.819805], tag = $handleBottomEdge)
|
|
|
|
|> line(end = [140.953893, 51.303021])
|
|
|
|
|> line(end = [-1.710101, 4.698463])
|
|
|
|
|> line(end = [-141.995517, -51.682142], tag = $handleTopEdge)
|
|
|
|
|> line(end = [-36.139148, -36.139148])
|
2025-03-07 22:07:16 -06:00
|
|
|
|> xLine(length = 7.071068)
|
2025-03-06 18:01:24 -05:00
|
|
|
|> close()
|
|
|
|
|
2025-04-09 15:21:05 -04:00
|
|
|
// Create an extrusion
|
2025-03-06 18:01:24 -05:00
|
|
|
handle = extrude(handleProfile, length = handleWidth)
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Fillet the bend of the spatula handle
|
2025-03-06 18:01:24 -05:00
|
|
|
fillet(
|
|
|
|
handle,
|
|
|
|
radius = 4,
|
|
|
|
tags = [
|
|
|
|
getNextAdjacentEdge(handleBottomEdge),
|
|
|
|
getNextAdjacentEdge(handleTopEdge)
|
2025-03-26 08:53:34 -07:00
|
|
|
],
|
2025-03-06 18:01:24 -05:00
|
|
|
)
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Define a plane which is at the end of the handle
|
2025-03-06 18:01:24 -05:00
|
|
|
handlePlane = {
|
2025-04-14 05:58:19 -04:00
|
|
|
origin = [208.593833, 0.0, 75.921946],
|
|
|
|
xAxis = [0.342020, -0.0, -0.939693],
|
|
|
|
yAxis = [0.0, 1.0, 0.0],
|
|
|
|
zAxis = [0.939693, -0.0, 0.342020]
|
2025-03-06 18:01:24 -05:00
|
|
|
}
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a sketch on the handle plane
|
2025-04-09 15:21:05 -04:00
|
|
|
gripSketch = startSketchOn(handlePlane)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile of the grip
|
2025-04-25 16:01:35 -05:00
|
|
|
gripProfile = startProfile(gripSketch, at = [-26.806746, -10.0])
|
2025-03-07 22:07:16 -06:00
|
|
|
|> xLine(length = gripWidth - (2 * gripFilletRadius))
|
2025-04-18 17:40:44 -05:00
|
|
|
|> arc(angleStart = -90.0, angleEnd = 0.0, radius = gripFilletRadius)
|
2025-03-07 22:07:16 -06:00
|
|
|
|> yLine(length = gripHeight - (2 * gripFilletRadius))
|
2025-04-18 17:40:44 -05:00
|
|
|
|> arc(angleStart = 0.0, angleEnd = 90.0, radius = gripFilletRadius)
|
2025-03-07 22:07:16 -06:00
|
|
|
|> xLine(length = -(gripWidth - (2 * gripFilletRadius)))
|
2025-04-18 17:40:44 -05:00
|
|
|
|> arc(angleStart = 90.0, angleEnd = 180.0, radius = gripFilletRadius)
|
2025-03-07 22:07:16 -06:00
|
|
|
|> yLine(length = -(gripHeight - (2 * gripFilletRadius)), tag = $gripEdgeTop)
|
2025-04-18 17:40:44 -05:00
|
|
|
|> arc(angleStart = 180.0, angleEnd = 270.0, radius = gripFilletRadius)
|
2025-03-06 18:01:24 -05:00
|
|
|
|> close()
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Extrude the grip profile to create the grip
|
2025-03-06 18:01:24 -05:00
|
|
|
grip = extrude(gripProfile, length = -gripLength)
|
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a sketch on the grip for the hole
|
2025-04-14 05:58:19 -04:00
|
|
|
holeSketch = startSketchOn(grip, face = gripEdgeTop)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Create a profile for the grip hole
|
2025-05-01 11:36:51 -05:00
|
|
|
gripHoleProfile = slot(
|
|
|
|
sketch1 = holeSketch,
|
|
|
|
start = [0, 200],
|
|
|
|
end = [0, 210],
|
|
|
|
width = gripSlotWidth,
|
|
|
|
)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-04-04 11:03:13 -07:00
|
|
|
// Cut a hole in the grip
|
2025-03-26 08:53:34 -07:00
|
|
|
extrude(gripHoleProfile, length = -gripWidth - 20)
|