fdtdx.extruded_polygon_from_gds#
- fdtdx.extruded_polygon_from_gds(lib, cell_name, layer, datatype=0, polygon_index=0, **kwargs)[source]#
Create an ExtrudedPolygon from a polygon in an already-loaded gdstk Library.
- Parameters:
lib (
Library) – An already-loaded gdstk Library.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:
- 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.