Skip to content

Commit

Permalink
Merge pull request #600 from gdsfactory/fix-mirror
Browse files Browse the repository at this point in the history
Fix mirror default parameters
  • Loading branch information
sebastian-goeldi authored Feb 8, 2025
2 parents 4a213db + 5de4094 commit 2d09f09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/kfactory/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def irotate(self, angle: int, center: tuple[int, int] | None = None) -> Self:
return self

def imirror(
self, p1: tuple[int, int] = (1000, 0), p2: tuple[int, int] = (0, 0)
self, p1: tuple[int, int] = (0, 1000), p2: tuple[int, int] = (0, 0)
) -> Self:
"""Mirror self at a line."""
p1_ = kdb.Point(p1[0], p1[1]).to_dtype(self.kcl.dbu)
Expand Down Expand Up @@ -710,7 +710,7 @@ def drotate(self, angle: float, center: tuple[float, float] | None = None) -> Se
return self

def dmirror(
self, p1: tuple[float, float] = (1, 0), p2: tuple[float, float] = (0, 0)
self, p1: tuple[float, float] = (0, 1), p2: tuple[float, float] = (0, 0)
) -> Self:
"""Mirror self at a line."""
p1_ = kdb.DPoint(p1[0], p1[1])
Expand Down Expand Up @@ -773,7 +773,7 @@ def mirror_y(self, y: int = 0) -> Self:
return self.imirror_y(y)

def mirror(
self, p1: tuple[int, int] = (1000, 0), p2: tuple[int, int] = (0, 0)
self, p1: tuple[int, int] = (0, 1000), p2: tuple[int, int] = (0, 0)
) -> Self:
return self.imirror(p1, p2)

Expand All @@ -795,6 +795,6 @@ def mirror_y(self, y: float = 0) -> Self:
return self.dmirror_y(y)

def mirror(
self, p1: tuple[float, float] = (1, 0), p2: tuple[float, float] = (0, 0)
self, p1: tuple[float, float] = (0, 1), p2: tuple[float, float] = (0, 0)
) -> Self:
return self.dmirror(p1, p2)

0 comments on commit 2d09f09

Please sign in to comment.