Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirroring drop waveguide for asymmetric waveguides in section based ring #1498

Merged
merged 3 commits into from Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions gdsfactory/components/ring_section_based.py
Expand Up @@ -267,17 +267,18 @@
s_add.ymax = ring_guide_add.ymin - gap[0] + s.ysize / 2 - input_xs_width / 2

if add_drop:
s.mirror((0, 1))
# s.mirror((0, 1))
s_drop = c << s
s_drop.mirror_y()

Check warning on line 272 in gdsfactory/components/ring_section_based.py

View check run for this annotation

Codecov / codecov/patch

gdsfactory/components/ring_section_based.py#L272

Added line #L272 was not covered by tests
s_drop.x = r.x
s_drop.ymin = ring_guide_drop.ymax + gap[1] - s.ysize / 2 + input_xs_width / 2

# Add ports
c.add_port("o1", port=s_add.ports["o1"])
c.add_port("o2", port=s_add.ports["o2"])
c.add_port("o1", port=s_add.ports["o1"], orientation=180)
c.add_port("o2", port=s_add.ports["o2"], orientation=0)

Check warning on line 278 in gdsfactory/components/ring_section_based.py

View check run for this annotation

Codecov / codecov/patch

gdsfactory/components/ring_section_based.py#L277-L278

Added lines #L277 - L278 were not covered by tests
if add_drop:
c.add_port("o3", port=s_drop.ports["o1"])
c.add_port("o4", port=s_drop.ports["o2"])
c.add_port("o3", port=s_drop.ports["o1"], orientation=180)
c.add_port("o4", port=s_drop.ports["o2"], orientation=0)

Check warning on line 281 in gdsfactory/components/ring_section_based.py

View check run for this annotation

Codecov / codecov/patch

gdsfactory/components/ring_section_based.py#L280-L281

Added lines #L280 - L281 were not covered by tests

return c

Expand Down
2 changes: 1 addition & 1 deletion gdsfactory/cross_section.py
Expand Up @@ -644,7 +644,7 @@ def l_with_trenches(
c = p.extrude(xs)
c.plot()
"""
width_slab = max(width_slab, width + width_trench)
# width_slab = max(width_slab, width + width_trench)

mult = 1 if mirror else -1
trench_offset = mult * (width / 2 + width_trench / 2)
Expand Down