[Port] mirror() should not mirror port position, only orientation
This commit is contained in:
parent
519e6ad618
commit
2b835ec3a4
@ -1169,12 +1169,13 @@ class Pattern(PortList, AnnotatableImpl, Mirrorable):
|
|||||||
ports[new_name] = port
|
ports[new_name] = port
|
||||||
|
|
||||||
for name, port in ports.items():
|
for name, port in ports.items():
|
||||||
p = port.deepcopy()
|
pp = port.deepcopy()
|
||||||
if mirrored:
|
if mirrored:
|
||||||
p.mirror()
|
pp.mirror()
|
||||||
p.rotate_around(pivot, rotation)
|
pp.offset[1] *= -1
|
||||||
p.translate(offset)
|
pp.rotate_around(pivot, rotation)
|
||||||
self.ports[name] = p
|
pp.translate(offset)
|
||||||
|
self.ports[name] = pp
|
||||||
|
|
||||||
if append:
|
if append:
|
||||||
if isinstance(other, Abstract):
|
if isinstance(other, Abstract):
|
||||||
|
|||||||
@ -100,7 +100,6 @@ class Port(PositionableImpl, Rotatable, PivotableImpl, Copyable, Mirrorable):
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def mirror(self, axis: int = 0) -> Self:
|
def mirror(self, axis: int = 0) -> Self:
|
||||||
self.offset[1 - axis] *= -1
|
|
||||||
if self.rotation is not None:
|
if self.rotation is not None:
|
||||||
self.rotation *= -1
|
self.rotation *= -1
|
||||||
self.rotation += axis * pi
|
self.rotation += axis * pi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user