mirror of
https://github.com/TECHNOFAB11/ergogen.git
synced 2025-12-13 16:40:05 +01:00
Make outline/pcb anchor adjustments more generic
This commit is contained in:
parent
158dc33212
commit
2cfdf10327
2 changed files with 6 additions and 4 deletions
|
|
@ -283,12 +283,13 @@ exports.parse = (config, points, outlines, units) => {
|
|||
a.sane(f, name, 'object')()
|
||||
const asym = a.asym(f.asym || 'source', `${name}.asym`)
|
||||
const where = filter(f.where, `${name}.where`, points, units, asym)
|
||||
const adjust = anchor(f.adjust || {}, `${name}.adjust`, points)(units)
|
||||
const original_adjust = f.adjust // need to save, so the delete's don't get rid of it below
|
||||
const adjust = start => anchor(original_adjust || {}, `${name}.adjust`, points, start)(units)
|
||||
delete f.asym
|
||||
delete f.where
|
||||
delete f.adjust
|
||||
for (const w of where) {
|
||||
const aw = w.clone().shift(adjust.p).rotate(adjust.r, false)
|
||||
const aw = adjust(w.clone())
|
||||
footprints.push(footprint_factory(f, name, aw))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue