summaryrefslogtreecommitdiff
path: root/gerbonara/cad/kicad/sexp_mapper.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-18 12:26:03 +0200
committerjaseg <git@jaseg.de>2023-04-19 00:51:27 +0200
commit2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6 (patch)
treedd588a4beff48425d5723f767a25e51d28e4500f /gerbonara/cad/kicad/sexp_mapper.py
parent263033c9bdecf8c82027f6475c863d818f499914 (diff)
downloadgerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.tar.gz
gerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.tar.bz2
gerbonara-2c6c9a5cbc6d389a17c0cc15173c6e626fd5d5c6.zip
Basic KiCad footprint rendering works
Diffstat (limited to 'gerbonara/cad/kicad/sexp_mapper.py')
-rw-r--r--gerbonara/cad/kicad/sexp_mapper.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gerbonara/cad/kicad/sexp_mapper.py b/gerbonara/cad/kicad/sexp_mapper.py
index cb7c99f..1d0f942 100644
--- a/gerbonara/cad/kicad/sexp_mapper.py
+++ b/gerbonara/cad/kicad/sexp_mapper.py
@@ -209,9 +209,9 @@ class _SexpTemplate:
return [kls.name_atom]
@staticmethod
- def __map__(kls, value, parent=None):
+ def __map__(kls, value, *args, parent=None, **kwargs):
positional = iter(kls.positional)
- inst = kls()
+ inst = kls(*args, **kwargs)
for v in value[1:]: # skip key
if isinstance(v, Atom) and v in kls.keys:
@@ -248,8 +248,8 @@ class _SexpTemplate:
yield out
@staticmethod
- def parse(kls, data):
- return kls.__map__(parse_sexp(data))
+ def parse(kls, data, *args, **kwargs):
+ return kls.__map__(parse_sexp(data), *args, **kwargs)
@staticmethod
def sexp(self):