gdstk icon indicating copy to clipboard operation
gdstk copied to clipboard

Embed LAYERNAME string into a record

Open nmz787-intel opened this issue 3 years ago • 6 comments

I have seldom obtained 'fancy' OASIS files from vendor tools, which KLayout and vendor GUIs can load and display the layernames without an associated layerproperties (layer, datatype)->string mapping file. It doesn't seem like this is possible from my usage of the API, but I wonder if I'm missing something, or if you have considered the effort (and ROI) to enable this?

Thanks! -nmz

nmz787-intel avatar Apr 25 '23 00:04 nmz787-intel

Hi, I'm also trying to do the same thing right now and checking the code. I'm very new to OASIS but I became to understand we need to use LAYERNAME_DATA == 11 or LAYERNAME_TEXT == 12. Maybe there is no interface to add them into an OASIS file from gdstk currently. I also found the records are ignored in reading OASIS files. It would be greatly appreciated if gdstk has the feature because we don't have to attach the layer names with another tool. https://github.com/heitzmann/gdstk/blob/facd76e8412d0ce78fe6ab56ecd630732d14e781/src/library.cpp#L1652-L1663

tkueda avatar Apr 25 '23 13:04 tkueda

This can be added in a future release. The main issue here would be how to store and interface with this data, since it doesn't map directly to any existing data structures.

heitzmann avatar Apr 29 '23 12:04 heitzmann

I'm reviewing this DRAFT spec of OASIS format: https://web.archive.org/web/20160304104134/http://www.wrcad.com/oasis/oasis-3626-042303-draft.pdf

and SECTION 19 shows: image

which makes me think that we could read in all the LAYERNAME record (or is it records) data into a lookup-table, then apply the strings to each corresponding polygon. During OASIS write operation, I think you'd first review all the polygons to again build the lookup-table, then write the LAYERNAME record (or is it records?).

nmz787-intel avatar Dec 05 '23 00:12 nmz787-intel