tidy3d.CornerFinderSpec#
- class CornerFinderSpec[source]#
Bases:
Tidy3dBaseModelSpecification 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 anattrobj.attrs['foo'] = bar. Also note that Tidy3D` will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().medium (Literal['metal', 'dielectric', 'all'] = metal) – Find corners of structures made of
medium, which can take valuemetalfor PEC and lossy metal,dielectricfor non-metallic materials, andallfor 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.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.
Inherited Common Usage
- medium#
- angle_threshold#
- distance_threshold#
- concave_resolution#
- convex_resolution#
- mixed_resolution#
- 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.