2025-03-06 18:01:24 -05:00
|
|
|
// Walkie talkie talk button
|
|
|
|
|
2025-03-20 09:22:17 -07:00
|
|
|
// set units
|
2025-03-06 18:01:24 -05:00
|
|
|
@settings(defaultLengthUnit = in)
|
|
|
|
|
2025-03-20 09:22:17 -07:00
|
|
|
// import constants
|
2025-03-06 18:01:24 -05:00
|
|
|
import width, thickness, talkButtonSideLength, talkButtonHeight from "globals.kcl"
|
|
|
|
|
2025-03-20 09:22:17 -07:00
|
|
|
export fn talkButton() {
|
|
|
|
// create the talk button sketch
|
2025-03-26 08:53:34 -07:00
|
|
|
talkButtonSketch = startSketchOn(YZ)
|
2025-03-20 09:22:17 -07:00
|
|
|
|> startProfileAt([
|
|
|
|
-talkButtonSideLength / 2,
|
|
|
|
talkButtonSideLength / 2
|
|
|
|
], %)
|
|
|
|
|> xLine(length = talkButtonSideLength, tag = $tag1)
|
|
|
|
|> yLine(length = -talkButtonSideLength, tag = $tag2)
|
|
|
|
|> xLine(length = -talkButtonSideLength, tag = $tag3)
|
|
|
|
|> close(tag = $tag4)
|
2025-03-06 18:01:24 -05:00
|
|
|
|
2025-03-20 09:22:17 -07:00
|
|
|
// create the talk button and apply fillets
|
|
|
|
talkButton = extrude(talkButtonSketch, length = talkButtonHeight)
|
|
|
|
|> fillet(
|
2025-03-26 08:53:34 -07:00
|
|
|
radius = 0.050,
|
|
|
|
tags = [
|
|
|
|
getNextAdjacentEdge(tag1),
|
|
|
|
getNextAdjacentEdge(tag2),
|
|
|
|
getNextAdjacentEdge(tag3),
|
|
|
|
getNextAdjacentEdge(tag4)
|
|
|
|
],
|
|
|
|
)
|
2025-03-20 09:22:17 -07:00
|
|
|
|> appearance(color = '#D0FF01', metalness = 90, roughness = 90)
|
|
|
|
|
|
|
|
return talkButton
|
|
|
|
}
|