Footprint parameter flattening done
This commit is contained in:
parent
3a0f326a31
commit
58bb16ed28
31 changed files with 316 additions and 350 deletions
|
@ -9,15 +9,13 @@
|
|||
// if true, will add choc sized keycap box around the footprint
|
||||
|
||||
module.exports = {
|
||||
nets: {
|
||||
from: undefined,
|
||||
to: undefined
|
||||
},
|
||||
params: {
|
||||
class: 'S',
|
||||
designator: 'S',
|
||||
side: 'F',
|
||||
reverse: false,
|
||||
keycaps: false
|
||||
keycaps: false,
|
||||
from: undefined,
|
||||
to: undefined
|
||||
},
|
||||
body: p => {
|
||||
const standard = `
|
||||
|
@ -71,14 +69,14 @@ module.exports = {
|
|||
function pins(def_neg, def_pos) {
|
||||
return `
|
||||
${''/* pins */}
|
||||
(pad 1 thru_hole circle (at ${def_neg}4.58 5.1) (size 1.6 1.6) (drill 1.1) (layers *.Cu *.Mask) ${p.net.from.str} (clearance 0.2))
|
||||
(pad 2 thru_hole circle (at ${def_pos}2 5.4) (size 1.6 1.6) (drill 1.1) (layers *.Cu *.Mask) ${p.net.to.str} (clearance 0.2))
|
||||
(pad 1 thru_hole circle (at ${def_neg}4.58 5.1) (size 1.6 1.6) (drill 1.1) (layers *.Cu *.Mask) ${p.from.str} (clearance 0.2))
|
||||
(pad 2 thru_hole circle (at ${def_pos}2 5.4) (size 1.6 1.6) (drill 1.1) (layers *.Cu *.Mask) ${p.to.str} (clearance 0.2))
|
||||
`
|
||||
}
|
||||
if(p.param.reverse){
|
||||
if(p.reverse){
|
||||
return `
|
||||
${standard}
|
||||
${p.param.keycaps ? keycap : ''}
|
||||
${p.keycaps ? keycap : ''}
|
||||
${pins('-', '')}
|
||||
${pins('', '-')})
|
||||
|
||||
|
@ -86,7 +84,7 @@ module.exports = {
|
|||
} else {
|
||||
return `
|
||||
${standard}
|
||||
${p.param.keycaps ? keycap : ''}
|
||||
${p.keycaps ? keycap : ''}
|
||||
${pins('-', '')})
|
||||
`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue