From e4dcbe177f8a152f380983f46d9239c9460bfc6a Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 21 Jul 2023 20:27:14 +0200 Subject: symbol pin rendering works --- gerbonara/cad/kicad/schematic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gerbonara/cad/kicad/schematic.py') diff --git a/gerbonara/cad/kicad/schematic.py b/gerbonara/cad/kicad/schematic.py index 0fbc47a..6ef306e 100644 --- a/gerbonara/cad/kicad/schematic.py +++ b/gerbonara/cad/kicad/schematic.py @@ -400,11 +400,11 @@ class SymbolInstance: if self.reference in ('U18',): print(self.reference, self.unit, self.at, self.mirror, units) - xform = f'translate({self.at.x:.3f} {self.at.y:.3f})' + at_xform = xform = f'translate({self.at.x:.3f} {self.at.y:.3f})' if self.mirror.y: xform += f'scale(-1 -1)' elif self.mirror.x: - xform += f'scale(-1 1)' + xform += f'scale(1 1)' else: xform += f'scale(1 -1)' if rot: @@ -414,7 +414,7 @@ class SymbolInstance: yield Tag('g', children=children, transform=xform, fill=colorscheme.fill, stroke=colorscheme.lines) children = [foo for unit in units for pin in unit.pins for foo in pin.to_svg(colorscheme, self.mirror, rot)] - yield Tag('g', children=children, transform=xform, fill=colorscheme.fill, stroke=colorscheme.lines) + yield Tag('g', children=children, transform=at_xform, fill=colorscheme.fill, stroke=colorscheme.lines) #for prop in self.properties: # yield from prop.to_svg() -- cgit