diff --git a/gdshelpers/parts/waveguide.py b/gdshelpers/parts/waveguide.py index 5fe7d81..a710b0a 100644 --- a/gdshelpers/parts/waveguide.py +++ b/gdshelpers/parts/waveguide.py @@ -546,6 +546,18 @@ def add_straight_segment_until_level_of_port(self, port, **line_kw): self.add_straight_segment_to_intersection(port.origin, port.angle - np.pi / 2, **line_kw) return self + def add_left_bend(self, radius, angle=np.pi/2): + """ + Add a left turn (90° or as defined by angle) with the given bend radius + """ + return self.add_bend(angle, radius) + + def add_right_bend(self, radius, angle=np.pi/2): + """ + Add a right turn (90° or as defined by angle) with the given bend radius + """ + return self.add_bend(-angle, radius) + def _example(): from gdshelpers.geometry.chip import Cell