gdsfactory / kfactory

gdsfactory with a klayout backend
https://gdsfactory.github.io/kfactory/
MIT License
33 stars 13 forks source link

how can we rename only optical ports? #445

Closed joamatab closed 3 months ago

joamatab commented 3 months ago

c.auto_rename_ports(port_type='optical')

sebastian-goeldi commented 3 months ago

c.auto_rename_ports(partial(kf.port.rename_clockwise, port_type="optical"))

also you can do that globally by putting

kcl.rename_function = partial(kf.port.rename_clockwise, port_type="optical")