-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtext.js
More file actions
36 lines (32 loc) · 686 Bytes
/
Copy pathtext.js
File metadata and controls
36 lines (32 loc) · 686 Bytes
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
// Author: @infused-kim
//
// Description:
// Allows oyu to place text on the PCB.
module.exports = {
params: {
designator: 'TXT',
side: 'F',
reverse: false,
text: 'Awesomeness',
},
body: p => {
const front = `
(gr_text "${p.text}" ${p.at} (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
`
const back = `
(gr_text "${p.text}" ${p.at} (layer B.SilkS)
(effects (font (size 1 1) (thickness 0.15)) (justify mirror))
)
`
let final = '';
if(p.side == "F" || p.reverse) {
final += front;
}
if(p.side == "B" || p.reverse) {
final += back;
}
return final;
}
}