Skip to content

Commit

Permalink
fixed default polygon index
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed Nov 5, 2021
1 parent 07bd20e commit c5f85f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tidy3d/components/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def from_gdspy( # pylint:disable=too-many-arguments
slab_bounds: Tuple[float, float],
gds_layer: int,
gds_dtype: int,
polygon_index: pydantic.NonNegativeInt = 1,
polygon_index: pydantic.NonNegativeInt = 0,
gds_scale: pydantic.PositiveFloat = 1.0,
):
"""Import :class:`PolySlab` from a ``gdspy.Cell``.
Expand Down Expand Up @@ -867,8 +867,8 @@ def from_gdspy( # pylint:disable=too-many-arguments
vertices = list_of_vertices[polygon_index]
except Exception as e:
raise Tidy3dKeyError(
f"no polygon vertices found at index {polygon_index}. "
f"{len(list_of_vertices)} polygons returned at "
f"No polygons found at polygon_index={polygon_index}. "
f"{len(list_of_vertices)} polygons found at "
f"gds_layer={gds_layer} and gds_dtype={gds_dtype}."
) from e

Expand Down

0 comments on commit c5f85f9

Please sign in to comment.