tidy3d.Cylinder#
- class Cylinder[source]#
Bases:
Centered,Circular,PlanarCylindrical geometry with optional sidewall angle along axis direction. When
sidewall_angleis 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 (Union[float, autograd.tracer.Box] = 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 theaxisdirection; and-np.pi/2<sidewall_angle<0specifies an expanding cross section along theaxisdirection.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 thebottom,middle, ortopof the geometry with respect to the axis. E.g. ifaxis=1,bottomrefers to the negative side of the y-axis, andtoprefers to the positive side of the y-axis.radius (Union[NonNegativeFloat, autograd.tracer.Box]) – [units = um]. Radius of geometry at the
reference_plane.center (Optional[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]]] = None) – [units = um]. Center of object in x, y, and z.
length (Union[NonNegativeFloat, autograd.tracer.Box]) – [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
centeraxissidewall_anglereference_planeMethods
inside(x, y, z)For input arrays
x,y,zof arbitrary but identical shape, return an array with the same shape which isTruefor every point in zip(x, y, z) that is inside the volume of theGeometry, andFalseotherwise.to_polyslab([num_pts_circumference])Convert instance of
Cylinderinto a discretized version usingPolySlab.- radius#
- length#
- to_polyslab(num_pts_circumference=51, **kwargs)[source]#
Convert instance of
Cylinderinto a discretized version usingPolySlab.- Parameters:
num_pts_circumference (int = 51) – Number of points in the circumference of the discretized polyslab.
**kwargs – Extra keyword arguments passed to
PolySlab(), such asdilation.
- Returns:
Extruded polygon representing a discretized version of the cylinder.
- Return type:
- 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 isTruefor every point in zip(x, y, z) that is inside the volume of theGeometry, andFalseotherwise.
- property bounds#
Returns bounding box min and max coordinates.
- 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.