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

add names to trench (for taper) #1501

Merged
merged 1 commit into from Mar 30, 2023
Merged
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
8 changes: 5 additions & 3 deletions gdsfactory/cross_section.py
Expand Up @@ -576,10 +576,12 @@ def rib_with_trenches(
width_slab = max(width_slab, width + 2 * width_trench)

trench_offset = width / 2 + width_trench / 2
sections = [Section(width=width_slab, layer=layer)]
sections = [Section(width=width_slab, layer=layer, name="slab")]
sections += [
Section(width=width_trench, offset=offset, layer=layer_trench)
for offset in [+trench_offset, -trench_offset]
Section(
width=width_trench, offset=offset, layer=layer_trench, name=f"trench_{i}"
)
for i, offset in enumerate([+trench_offset, -trench_offset])
]

return CrossSection(
Expand Down