tidy3d.CornerFinderSpec#
- class CornerFinderSpec[source]#
- Bases: - Tidy3dBaseModel- Specification for corner detection on a 2D plane. - Parameters:
- attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- medium (Literal['metal', 'dielectric', 'all'] = metal) – Find corners of structures made of - medium, which can take value- metalfor PEC and lossy metal,- dielectricfor non-metallic materials, and- allfor all materials.
- angle_threshold (ConstrainedFloatValue = 0.3141592653589793) – 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 - Noneand 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.
 
 - 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. - Inherited Common Usage - medium#
 - angle_threshold#
 - distance_threshold#
 - corners(normal_axis, coord, structure_list)[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. 
 
- Returns:
- Corner coordinates. 
- Return type:
- ArrayFloat2D 
 
 - __hash__()#
- Hash method.