tidy3d.components.geometry.Planar#

class tidy3d.components.geometry.Planar#

Geometry with one axis that is slab-like with thickness height.

Parameters
  • axis (Literal[0, 1, 2] = 2) – Specifies dimension of the planar axis (0,1,2) -> (x,y,z).

  • sidewall_angle (ConstrainedFloatValue = 0.0) – [units = rad]. Angle of the sidewall. sidewall_angle=0 (default) specifies a vertical wall; 0<sidewall_angle<np.pi/2 specifies a shrinking cross section along the axis direction; and -np.pi/2<sidewall_angle<0 specifies an expanding cross section along the axis direction.

  • reference_plane (Literal['bottom', 'middle', 'top'] = bottom) – The position of the plane where the supplied cross section are defined. The plane is perpendicular to the axis. The plane is located at the bottom, middle, or top of the geometry with respect to the axis. E.g. if axis=1, bottom refers to the negative side of the y-axis, and top refers to the positive side of the y-axis.

Show JSON schema
{
   "title": "Planar",
   "description": "Geometry with one ``axis`` that is slab-like with thickness ``height``.\n\nParameters\n----------\naxis : Literal[0, 1, 2] = 2\n    Specifies dimension of the planar axis (0,1,2) -> (x,y,z).\nsidewall_angle : ConstrainedFloatValue = 0.0\n    [units = rad].  Angle of the sidewall. ``sidewall_angle=0`` (default) specifies a vertical wall; ``0<sidewall_angle<np.pi/2`` specifies a shrinking cross section along the ``axis`` direction; and ``-np.pi/2<sidewall_angle<0`` specifies an expanding cross section along the ``axis`` direction.\nreference_plane : Literal['bottom', 'middle', 'top'] = bottom\n    The position of the plane where the supplied cross section are defined. The plane is perpendicular to the ``axis``. The plane is located at the ``bottom``, ``middle``, or ``top`` of the geometry with respect to the axis. E.g. if ``axis=1``, ``bottom`` refers to the negative side of the y-axis, and ``top`` refers to the positive side of the y-axis.",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "Planar",
         "enum": [
            "Planar"
         ],
         "type": "string"
      },
      "axis": {
         "title": "Axis",
         "description": "Specifies dimension of the planar axis (0,1,2) -> (x,y,z).",
         "default": 2,
         "enum": [
            0,
            1,
            2
         ],
         "type": "integer"
      },
      "sidewall_angle": {
         "title": "Sidewall angle",
         "description": "Angle of the sidewall. ``sidewall_angle=0`` (default) specifies a vertical wall; ``0<sidewall_angle<np.pi/2`` specifies a shrinking cross section along the ``axis`` direction; and ``-np.pi/2<sidewall_angle<0`` specifies an expanding cross section along the ``axis`` direction.",
         "default": 0.0,
         "exclusiveMinimum": -1.5707963267948966,
         "exclusiveMaximum": 1.5707963267948966,
         "units": "rad",
         "type": "number"
      },
      "reference_plane": {
         "title": "Reference plane for cross section",
         "description": "The position of the plane where the supplied cross section are defined. The plane is perpendicular to the ``axis``. The plane is located at the ``bottom``, ``middle``, or ``top`` of the geometry with respect to the axis. E.g. if ``axis=1``, ``bottom`` refers to the negative side of the y-axis, and ``top`` refers to the positive side of the y-axis.",
         "default": "bottom",
         "enum": [
            "bottom",
            "middle",
            "top"
         ],
         "type": "string"
      }
   },
   "additionalProperties": false
}

attribute axis: Literal[0, 1, 2] = 2#

Specifies dimension of the planar axis (0,1,2) -> (x,y,z).

attribute reference_plane: Literal['bottom', 'middle', 'top'] = 'bottom'#

The position of the plane where the supplied cross section are defined. The plane is perpendicular to the axis. The plane is located at the bottom, middle, or top of the geometry with respect to the axis. E.g. if axis=1, bottom refers to the negative side of the y-axis, and top refers to the positive side of the y-axis.

attribute sidewall_angle: float = 0.0#

Angle of the sidewall. sidewall_angle=0 (default) specifies a vertical wall; 0<sidewall_angle<np.pi/2 specifies a shrinking cross section along the axis direction; and -np.pi/2<sidewall_angle<0 specifies an expanding cross section along the axis direction.

Constraints
  • exclusiveMinimum = -1.5707963267948966

  • exclusiveMaximum = 1.5707963267948966

intersections(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None)#

Returns shapely geometry at plane specified by one non None value of x,y,z.

Parameters
  • x (float) – Position of plane in x direction, only one of x,y,z can be specified to define plane.

  • y (float) – Position of plane in y direction, only one of x,y,z can be specified to define plane.

  • z (float) – Position of plane in z direction, only one of x,y,z can be specified to define plane.

Returns

  • List[shapely.geometry.base.BaseGeometry] – List of 2D shapes that intersect plane. For more details refer to

  • `Shapely’s Documentaton <https (//shapely.readthedocs.io/en/stable/project.html>`_.)

static offset_distance_to_base(reference_plane: Literal['bottom', 'middle', 'top'], length_axis: float, tan_angle: float) float#

A convenient function that returns the distance needed to offset the cross section from reference plane to the base.

Parameters
  • reference_plane (PlanePosition) – The position of the plane where the vertices of the polygon are supplied.

  • length_axis (float) – The overall length of PolySlab along extrusion direction.

  • tan_angle (float) – tan(sidewall angle)

Returns

Offset distance.

Return type

float

abstract property center_axis: float#

Gets the position of the center of the geometry in the out of plane dimension.

abstract property length_axis: float#

Gets the length of the geometry along the out of plane dimension.