Skip to content

Remove libGDSII dependency; demonstrate gdstk in the tutorials#3244

Open
oskooi wants to merge 2 commits into
NanoComp:masterfrom
oskooi:libgdsii_remove
Open

Remove libGDSII dependency; demonstrate gdstk in the tutorials#3244
oskooi wants to merge 2 commits into
NanoComp:masterfrom
oskooi:libgdsii_remove

Conversation

@oskooi

@oskooi oskooi commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #3206.

Context

libGDSII is an optional Meep dependency used to import GDSII layout files (polygons → Meep prisms / volumes). It is no longer maintained. This change removes libGDSII entirely from the Meep codebase — the build hooks, the C++ implementation, the SWIG/Python wrappers, the GDS tests, and the build documentation that referenced it. The Meep-native GDS functions that depended on libGDSII (get_GDSII_prisms, GDSII_vol, GDSII_layers, with_libGDSII, set_geometry_from_GDSII, get_GDSII_prism, get_GDSII_volume, get_GDSII_layers) are therefore removed as well.

Rather than wiring a replacement library into Meep's build, the gdstk Python package is demonstrated directly in the Python tutorials: users read GDS polygons with gdstk and build mp.Prism / mp.Volume objects themselves. gdstk is not added to Meep's build, requirements, or CI — it is a user-side tool shown in the docs.

Additionally, the GDS-import paths in the Python tests are deleted (analytic-prism coverage remains), and CI only has its libGDSII steps removed (gdstk is not added to CI).

Scope decisions

  • gdstk is not integrated into Meep's C++/build/CI — tutorials only.
  • Python test GDS paths are removed, not rewritten with gdstk.
  • get_center_and_size (generaly utility, used by test_simulation.py) is kept.
  • coupler.gds example asset is kept (the rewritten tutorial reads it via gdstk); python/tests/data/bend-flux.gds and python/tests/data/spiral.gds are removed.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@oskooi oskooi force-pushed the libgdsii_remove branch from 2863b98 to fa728bb Compare July 3, 2026 05:19
@stevengj

stevengj commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

I don't want to break working code. So:

  1. Keep GDSII in the code. (However, it can print a deprecation notice when it is called)
  2. Update the tutorials and docs to use gdstk
  3. Keep GDSII in the installation manual but note that it is a deprecated feature that will be removed at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing libGDSII support

3 participants