gdsfactory / gdsfactory-photonics-training

training for gdsfactory
https://gdsfactory.github.io/gdsfactory-photonics-training/
MIT License
14 stars 8 forks source link

Issue on page /notebooks /10_layout_full.ipynb #13

Closed simenmm closed 4 months ago

simenmm commented 9 months ago

One of the port lists is reversed in the Sbend bundle example. reversed(c2.get_ports_list(orientation=180)) needs to be wrapped with list() since it returns an iterator, which gets a bit ugly. c2.get_ports_list(orientation=180)[::-1] may be the prettiest option.

image
joamatab commented 9 months ago

oh, yes, you need to sort the ports :)

joamatab commented 9 months ago

or you can do

gf.routing.get_bundle_sbend(enforce_ports_ordering=False)

the problem is that get_ports_list is returning ports sorted clockwise

joamatab commented 4 months ago

closing as fixed,

thank you for catching this Simen!