tidy3d.Cylinder#

class tidy3d.Cylinder#

Cylindrical geometry.

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

  • 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.\n\nParameters\n----------\naxis : Literal[0, 1, 2] = 2\n    Specifies dimension of the planar axis (0,1,2) -> (x,y,z).\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"
      },
      "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
}

Fields
  • length (pydantic.types.NonNegativeFloat)

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.