Extend footprint test coverage
This commit is contained in:
parent
3aef729465
commit
1de68843ce
8 changed files with 1023 additions and 4 deletions
|
@ -28,7 +28,10 @@ module.exports = {
|
|||
if (align == 'right') x += p.param.width / 2 + plus
|
||||
if (align == 'up') y += p.param.height / 2 + plus
|
||||
if (align == 'down') y -= p.param.height / 2 + plus
|
||||
const text = `(fp_text user ${p.param.text} (at ${x} ${y} ${p.rot}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))`
|
||||
let text = ''
|
||||
if (p.param.text.length) {
|
||||
text = `(fp_text user ${p.param.text} (at ${x} ${y} ${p.rot}) (layer ${side}.SilkS) (effects (font (size 0.8 0.8) (thickness 0.15)) ${mirror}))`
|
||||
}
|
||||
return `(pad 1 smd rect (at 0 0 ${p.rot}) (size ${p.param.width} ${p.param.height}) (layers ${side}.Cu ${side}.Paste ${side}.Mask) ${p.net.net.str})\n${text}`
|
||||
}
|
||||
|
||||
|
|
|
@ -170,9 +170,9 @@ const footprint = exports._footprint = (points, net_indexer, component_indexer,
|
|||
if (a.type(value)() == 'string' && value.startsWith('=') && point) {
|
||||
const indirect = value.substring(1)
|
||||
value = point.meta[indirect]
|
||||
if (value === undefined) {
|
||||
throw new Error(`Indirection "${name}.params.${param}" --> "${point.meta.name}.${indirect}" to undefined value!`)
|
||||
}
|
||||
// if (value === undefined) {
|
||||
// throw new Error(`Indirection "${name}.params.${param_name}" --> "${point.meta.name}.${indirect}" to undefined value!`)
|
||||
// }
|
||||
}
|
||||
parsed_params.param[param_name] = value
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue