tidy3d.Cylinder#

class Cylinder[source]#

Bases: Centered, Circular, Planar

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'] = middle) – 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 at the reference_plane.

  • 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)

Attributes

bounds

Returns bounding box min and max coordinates.

center_axis

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

length_axis

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

radius_bottom

radius of bottom

radius_max

max(radius of top, radius of bottom)

radius_min

min(radius of top, radius of bottom).

radius_top

radius of bottom

Methods

inside(x, y, z)

For input arrays x, y, z of arbitrary but identical shape, return an array with the same shape which is True for every point in zip(x, y, z) that is inside the volume of the Geometry, and False otherwise.

intersections_tilted_plane(normal, origin, to_2D)

Return a list of shapely geometries at the plane specified by normal and origin.

radius#
length#
property center_axis#

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

property length_axis#

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

intersections_tilted_plane(normal, origin, to_2D)[source]#

Return a list of shapely geometries at the plane specified by normal and origin.

Parameters:
  • normal (Coordinate) – Vector defining the normal direction to the plane.

  • origin (Coordinate) – Vector defining the plane origin.

  • to_2D (MatrixReal4x4) – Transformation matrix to apply to resulting shapes.

Returns:

List of 2D shapes that intersect plane. For more details refer to Shapely’s Documentation.

Return type:

List[shapely.geometry.base.BaseGeometry]

inside(x, y, z)[source]#

For input arrays x, y, z of arbitrary but identical shape, return an array with the same shape which is True for every point in zip(x, y, z) that is inside the volume of the Geometry, and False otherwise.

Parameters:
  • x (np.ndarray[float]) – Array of point positions in x direction.

  • y (np.ndarray[float]) – Array of point positions in y direction.

  • z (np.ndarray[float]) – Array of point positions in z direction.

Returns:

True for every point that is inside the geometry.

Return type:

np.ndarray[bool]

property bounds#

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 radius_bottom#

radius of bottom

property radius_top#

radius of bottom

property radius_max#

max(radius of top, radius of bottom)

property radius_min#

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

__hash__()#

Hash method.