diff options
author | jaseg <git@jaseg.de> | 2022-01-08 23:30:38 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-01-08 23:30:38 +0100 |
commit | 44006784f0b72a3fe7e29c818e45a533a02641a7 (patch) | |
tree | 4815506f4d39bff1307b4bd617e5bf99bec25bdd /gerbonara/gerber/aperture_macros/parse.py | |
parent | f09ef6f1172ca362c025048b45538c087cab0dc3 (diff) | |
download | gerbonara-44006784f0b72a3fe7e29c818e45a533a02641a7.tar.gz gerbonara-44006784f0b72a3fe7e29c818e45a533a02641a7.tar.bz2 gerbonara-44006784f0b72a3fe7e29c818e45a533a02641a7.zip |
Basic SVG export seems to be working
Diffstat (limited to 'gerbonara/gerber/aperture_macros/parse.py')
-rw-r--r-- | gerbonara/gerber/aperture_macros/parse.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gerbonara/gerber/aperture_macros/parse.py b/gerbonara/gerber/aperture_macros/parse.py index 00227c6..375bb5b 100644 --- a/gerbonara/gerber/aperture_macros/parse.py +++ b/gerbonara/gerber/aperture_macros/parse.py @@ -118,14 +118,15 @@ class ApertureMacro: primitive_defs = [ prim.to_gerber(unit) for prim in self.primitives ] return '*\n'.join(comments + variable_defs + primitive_defs) - def to_graphic_primitives(self, offset, rotation:'radians', parameters : [float], unit=None): + def to_graphic_primitives(self, offset, rotation, parameters : [float], unit=None): variables = dict(self.variables) for number, value in enumerate(parameters): if i in variables: raise SyntaxError(f'Re-definition of aperture macro variable {i} through parameter {value}') variables[i] = value - return [ primitive.to_graphic_primitives(offset, rotation, variables, unit) for primitive in self.primitives ] + for primitive in self.primitives: + yield from primitive.to_graphic_primitives(offset, rotation, variables, unit) def rotated(self, angle): dup = copy.deepcopy(self) |