heitzmann / gdstk

Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.
https://heitzmann.github.io/gdstk/
Boost Software License 1.0
324 stars 78 forks source link

Type check schema between gdstk and gdspy #230

Open daquinteroflex opened 6 months ago

daquinteroflex commented 6 months ago

Was just thinking if it'd be helpful to create a unified schema that can be used to type check between gdstk and gdspy. Probably a bit too much work, but would create a unified shared data structure core that can be used when integrating elements into these packages.

It would only be a schema typing package and would not involve the full import of either package, but guarantees a level of compatibility between.

Like:

import gdsCoreSchemaCell
cell = gds.gdsCoreSchemaCell
isinstance(gdscore, gdstk.Cell) == isinstance(cell, gdspy.Cell) 

Not really mission critical and just an architectural idea that maybe is a lot of work and not really worth doing, but just something I noticed when looking into type support between both backends.