niftylab / laygo2

LAYout with Gridded Objects v2
https://laygo2.github.io
BSD 3-Clause "New" or "Revised" License
49 stars 10 forks source link

Klayout support #10

Open jdhan opened 2 years ago

jdhan commented 2 years ago

I created a thread to discuss the integration of Klayout export function in LAYGO2. My suggestion is as follows: 1) implement klayout.py which exports a string of 'python code' that can be used in KLayout to generate layout structures. (similar to magic.py or skill.py) (you can use jinja to render templates to produce design/tech-specific code from generic template)

2) Then you can directly run the original generator code (e.g., inv.py) in any python consoles and run the generated string in KLayout python console, or run the original generator code and the generated string subsequently in the KLayout console.

I think this approach provides flexibility to users. Any comments will be appreciated.

joamatab commented 1 year ago

Hi, you can check the klayout integration that we have in gdsfactory

https://gdsfactory.github.io/gdsfactory/notebooks/_2_klayout.html

jdhan commented 1 year ago

@joamatab Thanks for pointing out this. I think having a gdsfactory-yaml export option would be an ideal approach for this.