tidy3d.CornerFinderSpec#

class CornerFinderSpec[source]#

Bases: Tidy3dBaseModel

Specification for corner detection on a 2D plane.

Parameters:
  • medium (Literal['metal', 'dielectric', 'all'] = metal) – Find corners of structures made of Medium, which can take value metal for PEC and lossy metal, dielectric for non-metallic materials, and all for all materials.

  • angle_threshold (float = 0.7853981633974483) – A vertex is qualified as a corner if the angle spanned by its two edges is larger than the supplementary angle of this threshold value.

  • distance_threshold (Optional[PositiveFloat] = None) – If not None and the distance of the vertex to its neighboring vertices is below the threshold value based on Douglas-Peucker algorithm, the vertex is disqualified as a corner.

  • concave_resolution (Optional[PositiveInt] = None) – Specifies number of steps to use for determining dl_min based on concave featues.If set to None, then the corresponding dl_min reduction is not applied.

  • convex_resolution (Optional[PositiveInt] = None) – Specifies number of steps to use for determining dl_min based on convex featues.If set to None, then the corresponding dl_min reduction is not applied.

  • mixed_resolution (Optional[PositiveInt] = None) – Specifies number of steps to use for determining dl_min based on mixed featues.If set to None, then the corresponding dl_min reduction is not applied.

Attributes

Methods

corners(normal_axis, coord, structure_list)

On a 2D plane specified by axis = normal_axis and coordinate coord, find out corners of merged geometries made of medium.

medium#
angle_threshold#
distance_threshold#
concave_resolution#
convex_resolution#
mixed_resolution#
corners(normal_axis, coord, structure_list, center=[0, 0, 0], size=[inf, inf, inf], interior_disjoint_geometries=False, keep_metal_only=False)[source]#

On a 2D plane specified by axis = normal_axis and coordinate coord, find out corners of merged geometries made of medium.

Parameters:
  • normal_axis (Axis) – Axis normal to the 2D plane.

  • coord (float) – Position of plane along the normal axis.

  • structure_list (list[Structure]) – list of structures present in simulation.

  • interior_disjoint_geometries (bool = False) – If True, geometries made of different materials on the plane must not be overlapping.

  • center (tuple[float, float, float]=[0, 0, 0]) – Center of the 2D plane (coordinate along axis is ignored).

  • size (tuple[float, float, float]=[inf, inf, inf]) – Size of the 2D plane (size along axis is ignored).

  • keep_metal_only (bool = False) – If True, drop all other structures that are not made of metal.

Returns:

Corner coordinates.

Return type:

ArrayFloat2D