tidy3d.Cylinder#

class tidy3d.Cylinder#

Cylindrical geometry with optional sidewall angle along axis direction. When sidewall_angle is nonzero, the shape is a conical frustum or a cone.

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.

  • radius (NonNegativeFloat) – [units = um]. Radius of geometry.

  • center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • length (NonNegativeFloat) – [units = um]. Defines thickness of cylinder along axis dimension.

Example

>>> c = Cylinder(center=(1,2,3), radius=2, length=5, axis=2)

Show JSON schema
{
   "title": "Cylinder",
   "description": "Cylindrical geometry with optional sidewall angle along axis\ndirection. When ``sidewall_angle`` is nonzero, the shape is a\nconical frustum or a cone.\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.\nradius : NonNegativeFloat\n    [units = um].  Radius of geometry.\ncenter : Tuple[float, float, float] = (0.0, 0.0, 0.0)\n    [units = um].  Center of object in x, y, and z.\nlength : NonNegativeFloat\n    [units = um].  Defines thickness of cylinder along axis dimension.\n\nExample\n-------\n>>> c = Cylinder(center=(1,2,3), radius=2, length=5, axis=2)",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "Cylinder",
         "enum": [
            "Cylinder"
         ],
         "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"
      },
      "radius": {
         "title": "Radius",
         "description": "Radius of geometry.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "center": {
         "title": "Center",
         "description": "Center of object in x, y, and z.",
         "default": [
            0.0,
            0.0,
            0.0
         ],
         "units": "um",
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "type": "number"
            },
            {
               "type": "number"
            },
            {
               "type": "number"
            }
         ]
      },
      "length": {
         "title": "Length",
         "description": "Defines thickness of cylinder along axis dimension.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      }
   },
   "required": [
      "radius",
      "length"
   ],
   "additionalProperties": false
}

attribute length: pydantic.types.NonNegativeFloat [Required]#

Defines thickness of cylinder along axis dimension.

Constraints
  • minimum = 0

inside(x, y, z) bool#

Returns True if point (x,y,z) inside volume of geometry.

Parameters
  • x (float) – Position of point in x direction.

  • y (float) – Position of point in y direction.

  • z (float) – Position of point in z direction.

Returns

Whether point (x,y,z) is inside geometry.

Return type

bool

property bounds: Tuple[Tuple[float, float, float], Tuple[float, float, float]]#

Returns bounding box min and max coordinates.

Returns

Min and max bounds packaged as (minx, miny, minz), (maxx, maxy, maxz).

Return type

Tuple[float, float, float], Tuple[float, float, float]

property center_axis#

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

property length_axis: float#

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

property radius_max: float#

max(radius of top, radius of bottom)

property radius_min: float#

min(radius of top, radius of bottom). It can be negative for a large sidewall angle.