tidy3d.components.structure.AbstractStructure#
- class AbstractStructure[source]#
- Bases: - Tidy3dBaseModel- A basic structure object. - 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().
- geometry (Union[Box, Transformed, ClipOperation, GeometryGroup, Sphere, Cylinder, PolySlab, ComplexPolySlabBase, TriangleMesh]) – Defines geometric properties of the structure. 
- name (Optional[str] = None) – Optional name for the structure. 
- background_permittivity (Optional[ConstrainedFloatValue] = None) – DEPRECATED: Use - Structure.background_medium. Relative permittivity used for the background of this structure when performing shape optimization with autograd.
- background_medium (Union[MultiPhysicsMedium, Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, FullyAnisotropicMedium, CustomMedium, CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomAnisotropicMedium, PerturbationMedium, PerturbationPoleResidue, LossyMetalMedium, Medium2D, AnisotropicMediumFromMedium2D, FluidSpec, SolidSpec, SolidMedium, FluidMedium, ChargeConductorMedium, ChargeInsulatorMedium, SemiconductorMedium] = None) – Medium used for the background of this structure when performing shape optimization with autograd. This is required when the structure is embedded in another structure as autograd will use the permittivity of the - Simulationby default to compute the shape derivatives.
 
 - Attributes - Methods - plot([x, y, z, ax])- Plot structure's geometric cross section at single (x,y,z) coordinate. - Inherited Common Usage - geometry#
 - name#
 - background_permittivity#
 - background_medium#
 - property viz_spec#
 - plot(x=None, y=None, z=None, ax=None, **patch_kwargs)[source]#
- Plot structure’s geometric cross section at single (x,y,z) coordinate. - Parameters:
- x (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane. 
- y (float = None) – Position of plane in y direction, only one of x,y,z can be specified to define plane. 
- z (float = None) – Position of plane in z direction, only one of x,y,z can be specified to define plane. 
- ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created. 
- **patch_kwargs – Optional keyword arguments passed to the matplotlib patch plotting of structure. For details on accepted values, refer to Matplotlib’s documentation. 
 
- Returns:
- The supplied or created matplotlib axes. 
- Return type:
- matplotlib.axes._subplots.Axes 
 
 - __hash__()#
- Hash method.