fdtdx.extruded_polygon_from_gds_path

fdtdx.extruded_polygon_from_gds_path#

fdtdx.extruded_polygon_from_gds_path(gds_file, cell_name, layer, datatype=0, polygon_index=0, **kwargs)[source]#

Create an ExtrudedPolygon from a polygon in a GDS file.

Parameters:
  • gds_file (str | Path) – Path to the .gds file.

  • cell_name (str) – Name of the GDS cell containing the polygon.

  • layer (int) – GDS layer number to read.

  • datatype (int) – GDS datatype (default 0).

  • polygon_index (int) – Which polygon to use when multiple exist on the layer (default 0).

  • **kwargs – Forwarded to ExtrudedPolygon (axis, material_name, materials, …).

Return type:

ExtrudedPolygon

Returns:

ExtrudedPolygon with vertices centered around the origin in metres.

Raises:
  • ValueError – If the cell or layer/datatype combination is not found.

  • IndexError – If polygon_index is out of range.