tidy3d.Sphere#

class Sphere[source]#

Bases: Centered, Circular

Spherical geometry.

Parameters:
  • radius (Attribute: radius) –

    Type

    NonNegativeFloat

    Default

    Units

    um

    Description

    Radius of geometry.

  • center (Attribute: center) –

    Type

    Tuple[float, float, float]

    Default

    = (0.0, 0.0, 0.0)

    Units

    um

    Description

    Center of object in x, y, and z.

Example

>>> b = Sphere(center=(1,2,3), radius=2)

Attributes

bounds

Returns bounding box min and max coordinates.

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_plane([x, y, z])

Returns shapely geometry at plane specified by one non None value of x,y,z.

intersections_tilted_plane(normal, origin, to_2D)

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

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]

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]

intersections_plane(x=None, y=None, z=None)[source]#

Returns shapely geometry at plane specified by one non None value of x,y,z.

Parameters:
  • x (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane.

  • y (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane.

  • z (float = None) – Position of plane in x direction, only one of x,y,z can be specified to define plane.

Returns:

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

Return type:

List[shapely.geometry.base.BaseGeometry]

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]

__hash__()#

Hash method.