Python module for creation and manipulation of GDSII files.
pip install gdstkGDSTK
Gdstk (GDSII Tool Kit) is a C++ library for creation and manipulation of GDSII and OASIS files. It is also available as a Python module meant to be a successor to Gdspy.
Key features for the creation of complex CAD layouts are included:
- Boolean operations on polygons (AND, OR, NOT, XOR) based on clipping algorithm
- Polygon offset (inward and outward rescaling of polygons)
- Efficient point-in-polygon solutions for large array sets
Typical applications of Gdstk are in the fields of electronic chip design, planar lightwave circuit design, and mechanical engineering.
Documentation
The complete documentation is available here.
The source files can be found in the docs directory.
On Windows, filenames passed to the C++ file I/O functions must be encoded as UTF-8.
The Python interface handles encoding of strings and pathlib.Path objects automatically.
On other platforms, filenames use the native filesystem encoding.
Installation
C++ library only
The C++ library is meant to be used by including it in your own source code.
If you prefer to install a static library, the included CMakeLists.txt should be a good starting option (use -DCMAKE_INSTALL_PREFIX=path to control the installation path):
cmake -S . -B build
cmake --build build --target install