Generalize asym usage

This commit is contained in:
Bán Dénes 2022-12-03 12:38:07 +01:00
parent 40406fbc03
commit cf9007aa50
9 changed files with 36 additions and 19 deletions

View file

@ -281,9 +281,9 @@ exports.parse = (config, points, outlines, units) => {
for (const [f_name, f] of Object.entries(footprints_config)) {
const name = `pcbs.${pcb_name}.footprints.${f_name}`
a.sane(f, name, 'object')()
const mirror = a.sane(f.mirror || false, `${name}.mirror`, 'boolean')()
const where = filter(f.where, `${name}.where`, points, units, mirror)
delete f.mirror
const asym = a.asym(f.asym || 'source', `${name}.asym`)
const where = filter(f.where, `${name}.where`, points, units, asym)
delete f.asym
delete f.where
for (const w of where) {
footprints.push(footprint_factory(f, name, w))