-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.kcl
50 lines (39 loc) · 1.3 KB
/
main.kcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Walkie Talkie
// A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings.
// Set units
@settings(defaultLengthUnit = in)
// Import parts and constants
import 'body.kcl'
import 'antenna.kcl'
import 'case.kcl'
import 'talk-button.kcl' as talkButton
import 'knob.kcl'
import button from "button.kcl"
import width, height, thickness, screenWidth, screenHeight, screenYPosition, tolerance from "globals.kcl"
// Import the body
body
// Import the case
case
// Import the antenna
antenna
// Import the buttons
button([
-(screenWidth / 2 + tolerance),
screenYPosition
], 0, offsetPlane("XZ", offset = thickness))
button([
-(screenWidth / 2 + tolerance),
screenYPosition - (screenHeight / 2)
], 0, offsetPlane("XZ", offset = thickness))
button([
screenWidth / 2 + tolerance,
screenYPosition - screenHeight
], 180, offsetPlane("XZ", offset = thickness))
button([
screenWidth / 2 + tolerance,
screenYPosition - (screenHeight / 2)
], 180, offsetPlane("XZ", offset = thickness))
// Import the talk button
talkButton
// Import the frequency knob
knob