2025-03-01 16:38:25 -08:00
|
|
|
// Walkie talkie knob
|
|
|
|
|
|
|
|
|
|
|
|
// Set units
|
|
|
|
@settings(defaultLengthUnit = in)
|
|
|
|
|
|
|
|
|
|
|
|
// Import constants
|
|
|
|
import width, thickness, height, knobDiameter, knobHeight, knobRadius from "globals.kcl"
|
|
|
|
|
|
|
|
// Define the plane for the knob
|
|
|
|
knobPlane = {
|
|
|
|
plane = {
|
|
|
|
origin = {
|
|
|
|
x = width / 2 - 0.70,
|
|
|
|
y = -thickness / 2,
|
|
|
|
z = height / 2
|
|
|
|
},
|
|
|
|
xAxis = { x = 1, y = 0, z = 0 },
|
|
|
|
yAxis = { x = 0, y = 0, z = 1 },
|
|
|
|
zAxis = { x = 0, y = 1, z = 0 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create the knob sketch and revolve
|
|
|
|
startSketchOn(knobPlane)
|
|
|
|
|> startProfileAt([0.0001, 0], %)
|
2025-03-07 22:07:16 -06:00
|
|
|
|> xLine(length = knobDiameter / 2)
|
|
|
|
|> yLine(length = knobHeight - 0.05)
|
2025-03-01 16:38:25 -08:00
|
|
|
|> arc({
|
|
|
|
angleStart = 0,
|
|
|
|
angleEnd = 90,
|
|
|
|
radius = .05
|
|
|
|
}, %)
|
2025-03-07 22:07:16 -06:00
|
|
|
|> xLine(endAbsolute = 0.0001)
|
2025-03-01 16:38:25 -08:00
|
|
|
|> close()
|
|
|
|
|> revolve({ axis = "Y" }, %)
|
|
|
|
|> appearance(color = '#D0FF01', metalness = 90, roughness = 50)
|