phidl icon indicating copy to clipboard operation
phidl copied to clipboard

allow ports with None orientation

Open joamatab opened this issue 2 years ago • 3 comments

Hi Adam,

this PR allows you to define ports with None orientation,

which i find useful for routing low speed electrical routes

let me know what you think Joaquin

joamatab avatar Apr 28 '22 13:04 joamatab

Hey @joamatab , I finally got around to looking at this. Can you explain the concept behind allowing the orientation to be None? Is it just for cases where you might want a finite width but no explicit orientation (like for an electrical pin?)

amccaugh avatar May 26 '22 17:05 amccaugh

yes, it's for electrical DC ports

joamatab avatar May 26 '22 21:05 joamatab

This fails for the following code:

from phidl import Device


D = Device()
D.add_port(name = 1, orientation = None)
D2 = Device()
d1 = D2 << D
d1.rotate(37)

amccaugh avatar Jun 13 '22 00:06 amccaugh