Exporter_GDS#

class zeroheliumkit.src.importing.Exporter_GDS(name: str, zhk_layers: dict, layer_cfg: dict)[source]#

Bases: object

A class for exporting geometries to GDSII format using gdstk.

Parameters:
  • name (str) – The base name of the GDSII file (without extension).

  • zhk_layers (dict) – A dictionary containing the geometries for each layer. Expected: zhk_layers[lname].geoms yields shapely polygons.

  • layer_cfg (dict) – A dictionary containing the layer configuration. Expected keys like {“layer”: int, “datatype”: int}.

Methods

preapre_gds()

Prepare the GDSII library by creating a top-level cell and adding polygons.

save()

Saves the GDSII file.

Attributes

name

zhk_layers

gdsii

layer_cfg

preapre_gds() None[source]#

Prepare the GDSII library by creating a top-level cell and adding polygons.

Notes vs gdspy: - gdstk does not have exclude_from_current; cells are not automatically “current”. - gdstk polygons use layer and datatype (same concepts).

save()[source]#

Saves the GDSII file.