Embed LAYERNAME string into a record
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
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
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.
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:
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?).