* update all kcl-samples * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * Update kcl-samples simulation test output --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
33 lines
901 B
Plaintext
33 lines
901 B
Plaintext
// Walkie Talkie Button
|
|
// Button for the walkie talkie
|
|
|
|
// Set units
|
|
@settings(defaultLengthUnit = in)
|
|
|
|
// Import parameters
|
|
import buttonWidth, buttonHeight, buttonThickness from "parameters.kcl"
|
|
|
|
// Create a function for the button. We need to create a function to use multiple buttons.
|
|
|
|
|
|
export fn button() {
|
|
// Sketch the button profile and extrude
|
|
buttonSketch = startSketchOn(XZ)
|
|
|> startProfileAt([0, 0], %)
|
|
|> angledLine({ angle = 180, length = buttonWidth }, %, $tag1)
|
|
|> angledLine({ angle = 270, length = buttonHeight }, %, $tag2)
|
|
|> angledLine({ angle = 0, length = buttonWidth }, %)
|
|
|> close()
|
|
button = extrude(buttonSketch, length = buttonThickness)
|
|
|> chamfer(
|
|
length = .050,
|
|
tags = [
|
|
getNextAdjacentEdge(tag1),
|
|
getNextAdjacentEdge(tag2)
|
|
],
|
|
)
|
|
|> appearance(color = "#ff0000")
|
|
|
|
return button
|
|
}
|