32 lines
941 B
Plaintext
32 lines
941 B
Plaintext
// Walkie talkie talk button
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = in, kclVersion = 1.0)
|
|
|
|
// Import parameters
|
|
import width, thickness, talkButtonSideLength, talkButtonHeight from "parameters.kcl"
|
|
|
|
// Create the talk button sketch
|
|
talkButtonSketch = startSketchOn(YZ)
|
|
|> startProfile(at = [
|
|
-talkButtonSideLength / 2,
|
|
talkButtonSideLength / 2
|
|
])
|
|
|> xLine(length = talkButtonSideLength, tag = $tag1)
|
|
|> yLine(length = -talkButtonSideLength, tag = $tag2)
|
|
|> xLine(length = -talkButtonSideLength, tag = $tag3)
|
|
|> close(tag = $tag4)
|
|
|
|
// create the talk button and apply fillets
|
|
extrude(talkButtonSketch, length = talkButtonHeight)
|
|
|> fillet(
|
|
radius = 0.050,
|
|
tags = [
|
|
getNextAdjacentEdge(tag1),
|
|
getNextAdjacentEdge(tag2),
|
|
getNextAdjacentEdge(tag3),
|
|
getNextAdjacentEdge(tag4)
|
|
],
|
|
)
|
|
|> appearance(color = '#D0FF01', metalness = 90, roughness = 90)
|