Skip to content

Commit

Permalink
(feat) footprints: Add MX 3d model
Browse files Browse the repository at this point in the history
  • Loading branch information
MvEerd committed Jan 9, 2022
1 parent f6b82ce commit b91dba0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/footprints/mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ module.exports = {
class: 'S',
hotswap: false,
reverse: false,
keycaps: false
keycaps: false,
// By placing a model in the path specified below KiCad will show it in the 3D viewer
model: './3d/SW_Cherry_MX_PCB.stp'
},
body: p => {
const standard = `
Expand Down Expand Up @@ -75,19 +77,19 @@ module.exports = {
`
}
}
if(p.param.reverse){

return `
${standard}
${p.param.keycaps ? keycap : ''}
${pins('-', '', 'B')}
${pins('', '-', 'F')})
`
} else {
return `
${standard}
${p.param.keycaps ? keycap : ''}
${pins('-', '', 'B')})
${p.param.reverse ? pins('', '-', 'F') : ''}
(model ${p.param.model}
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
`
}
}
}

0 comments on commit b91dba0

Please sign in to comment.