{"id":13736196,"url":"https://github.com/heitzmann/gdstk","last_synced_at":"2025-05-14T15:02:53.798Z","repository":{"id":37244605,"uuid":"287123767","full_name":"heitzmann/gdstk","owner":"heitzmann","description":"Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.","archived":false,"fork":false,"pushed_at":"2025-03-17T19:12:31.000Z","size":8428,"stargazers_count":382,"open_issues_count":41,"forks_count":93,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-04-12T01:49:29.121Z","etag":null,"topics":["cad","cpp","eda","gdsii","microfabrication","oasis","polygons","python","svg"],"latest_commit_sha":null,"homepage":"https://heitzmann.github.io/gdstk/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heitzmann.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"heitzmann"}},"created_at":"2020-08-12T22:01:04.000Z","updated_at":"2025-04-08T09:50:50.000Z","dependencies_parsed_at":"2023-10-13T05:38:43.488Z","dependency_job_id":"27352357-d0c6-435a-a935-b95bdced4d8c","html_url":"https://github.com/heitzmann/gdstk","commit_stats":{"total_commits":652,"total_committers":18,"mean_commits":36.22222222222222,"dds":0.245398773006135,"last_synced_commit":"8a0a1d77835850bd367dadd895fdb22cf43b54e5"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heitzmann%2Fgdstk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heitzmann%2Fgdstk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heitzmann%2Fgdstk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heitzmann%2Fgdstk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heitzmann","download_url":"https://codeload.github.com/heitzmann/gdstk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505873,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","cpp","eda","gdsii","microfabrication","oasis","polygons","python","svg"],"created_at":"2024-08-03T03:01:17.292Z","updated_at":"2025-04-12T01:49:52.320Z","avatar_url":"https://github.com/heitzmann.png","language":"C++","readme":"# GDSTK\n\n[![Boost Software License - Version 1.0](https://img.shields.io/github/license/heitzmann/gdstk.svg)](https://www.boost.org/LICENSE_1_0.txt)\n[![Tests Runner](https://github.com/heitzmann/gdstk/actions/workflows/run-tests.yml/badge.svg)](https://github.com/heitzmann/gdstk/actions/workflows/run-tests.yml)\n[![Publish Docs](https://github.com/heitzmann/gdstk/actions/workflows/publish-docs.yml/badge.svg)](https://github.com/heitzmann/gdstk/actions/workflows/publish-docs.yml)\n[![Package Builder](https://github.com/heitzmann/gdstk/actions/workflows/publish-packages.yml/badge.svg)](https://github.com/heitzmann/gdstk/actions/workflows/publish-packages.yml)\n[![Downloads](https://img.shields.io/github/downloads/heitzmann/gdstk/total.svg)](https://github.com/heitzmann/gdstk/releases)\n\nGdstk (GDSII Tool Kit) is a C++ library for creation and manipulation of GDSII and OASIS files.\nIt is also available as a Python module meant to be a successor to [Gdspy](https://github.com/heitzmann/gdspy).\n\nKey features for the creation of complex CAD layouts are included:\n\n* Boolean operations on polygons (AND, OR, NOT, XOR) based on clipping algorithm\n* Polygon offset (inward and outward rescaling of polygons)\n* Efficient point-in-polygon solutions for large array sets\n\nTypical applications of Gdstk are in the fields of electronic chip design, planar lightwave circuit design, and mechanical engineering.\n\n\n## Documentation\n\nThe complete documentation is available [here](http://heitzmann.github.io/gdstk).\n\nThe source files can be found in the _docs_ directory.\n\n\n## Installation\n\n### C++ library only\n\nThe C++ library is meant to be used by including it in your own source code.\n\nIf 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):\n\n```sh\ncmake -S . -B build\ncmake --build build --target install\n```\n\nThe library depends on [zlib](https://zlib.net/) and [qhull](http://www.qhull.org/)\n\n### Python wrapper\n\nThe Python module can be installed via pip, Conda or compiled directly from source.\nIt depends on:\n\n* [zlib](https://zlib.net/)\n* [qhull](http://www.qhull.org/)\n* [CMake](https://cmake.org/)\n* [Python](https://www.python.org/)\n* [Numpy](https://numpy.org/)\n* [Sphinx](https://www.sphinx-doc.org/), [Read the Docs Theme](https://sphinx-rtd-theme.readthedocs.io/), and [Sphinx Inline Tabs](https://sphinx-inline-tabs.readthedocs.io/) (to build the [documentation](http://heitzmann.github.io/gdstk))\n\n#### From PyPI\n\nSimply run the following to install the package for the current user:\n\n```sh\npip install --user gdstk\n```\n\nOr download and install the available wheels manually.\n\n#### From source\n\nInstallation from source requires the `build` module (plus CMake and Ninja, for faster compilation):\n\n```sh\npip install --user build\n```\n\nWith that, simply build the wheel package using:\n\n```sh\npython -m build -w\n```\n\nThis will create a _dist_ directory containing the compiled _.whl_ package that can be installed with ``pip``.\n\n## Support\n\nHelp support Gdstk development by [donating via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=JD2EUE2WPPBQQ) or [sponsoring me on GitHub](https://github.com/sponsors/heitzmann).\n\n\n## Benchmarks\n\nThe _benchmarks_ directory contains a few tests to compare the performance gain of the Python interface versus Gdspy.\nThey are only for reference; the real improvement is heavily dependent on the type of layout and features used.\nIf maximal performance is important, the library should be used directly from C++, without the Python interface.\n\nTiming results were obtained with Python 3.11 on an Intel Core i7-9750H @ 2.60 GHz\nThey represent the best average time to run each function out of 16 sets of 8 runs each.\n\n| Benchmark        |   Gdspy 1.6.13   |   Gdstk 0.9.41   |   Gain   |\n| :--------------- | :--------------: | :--------------: | :------: |\n| 10k_rectangles   |     80.2 ms      |     4.87 ms      |   16.5   |\n| 1k_circles       |      312 ms      |      239 ms      |   1.3    |\n| boolean-offset   |      187 μs      |     44.7 μs      |   4.19   |\n| bounding_box     |     36.7 ms      |      170 μs      |   216    |\n| curves           |     1.52 ms      |     30.9 μs      |   49.3   |\n| flatten          |      465 μs      |     8.17 μs      |   56.9   |\n| flexpath         |     2.88 ms      |     16.1 μs      |   178    |\n| flexpath-param   |      2.8 ms      |      585 μs      |   4.78   |\n| fracture         |      929 μs      |      616 μs      |   1.51   |\n| inside           |      161 μs      |      33 μs       |   4.88   |\n| read_gds         |     2.68 ms      |      94 μs       |   28.5   |\n| read_rawcells    |      363 μs      |     52.4 μs      |   6.94   |\n| robustpath       |      171 μs      |     8.68 μs      |   19.7   |\n\nMemory usage per object for 100000 objects:\n\n| Object               |   Gdspy 1.6.13   |   Gdstk 0.9.41   | Reduction |\n| :------------------- | :--------------: | :--------------: | :-------: |\n| Rectangle            |      601 B       |      232 B       |    61%    |\n| Circle (r = 10)      |     1.68 kB      |     1.27 kB      |    24%    |\n| FlexPath segment     |     1.48 kB      |      439 B       |    71%    |\n| FlexPath arc         |     2.26 kB      |     1.49 kB      |    34%    |\n| RobustPath segment   |     2.89 kB      |      920 B       |    69%    |\n| RobustPath arc       |     2.66 kB      |      920 B       |    66%    |\n| Label                |      407 B       |      215 B       |    47%    |\n| Reference            |      160 B       |      179 B       |    -12%   |\n| Reference (array)    |      189 B       |      181 B       |     4%    |\n| Cell                 |      430 B       |      229 B       |    47%    |\n","funding_links":["https://github.com/sponsors/heitzmann","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=JD2EUE2WPPBQQ"],"categories":["layout","Layout Compilers","C++","Full Custom Design"],"sub_categories":["Verification"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheitzmann%2Fgdstk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheitzmann%2Fgdstk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheitzmann%2Fgdstk/lists"}