tidy3d.Cylinder#
- class Cylinder[source]#
- Bases: - Centered,- Circular,- Planar- Cylindrical geometry with optional sidewall angle along axis direction. When - sidewall_angleis nonzero, the shape is a conical frustum or a cone.- 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().
- 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/2specifies a shrinking cross section along the- axisdirection; and- -np.pi/2<sidewall_angle<0specifies an expanding cross section along the- axisdirection.
- 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- topof the geometry with respect to the axis. E.g. if- axis=1,- bottomrefers to the negative side of the y-axis, and- toprefers to the positive side of the y-axis.
- radius (NonNegativeFloat) β [units = um]. Radius of geometry at the - reference_plane.
- center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (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) - See also - Notebooks - Attributes - Returns bounding box min and max coordinates. - Gets the position of the center of the geometry in the out of plane dimension. - Gets the length of the geometry along the out of plane dimension. - radius of bottom - max(radius of top, radius of bottom) - min(radius of top, radius of bottom). - radius of bottom - Methods - inside(x,Β y,Β z)- For input arrays - x,- y,- zof arbitrary but identical shape, return an array with the same shape which is- Truefor every point in zip(x, y, z) that is inside the volume of the- Geometry, and- Falseotherwise.- Inherited Common Usage - 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. 
 - inside(x, y, z)[source]#
- For input arrays - x,- y,- zof arbitrary but identical shape, return an array with the same shape which is- Truefor every point in zip(x, y, z) that is inside the volume of the- Geometry, and- Falseotherwise.- 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:
- Truefor 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.