{
  "title": "Geometry",
  "public_path": "flex_rf.tidy3d.Geometry",
  "lookup_path": "tidy3d.Geometry",
  "slug": "flex_rf/tidy3d/Geometry",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/geometry/",
  "object_kind": "class",
  "introduction": "Abstract base class, defines where something exists in space.",
  "notes": "",
  "examples": "",
  "references": "",
  "signature": "class Geometry(Tidy3dBaseModel, ABC)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/geometry/base.py",
    "url": "",
    "lineno": 144,
    "endlineno": 1695
  },
  "bases": [
    "Tidy3dBaseModel",
    "ABC"
  ],
  "parameter_rows": [
    {
      "name": "attrs",
      "annotation": "dict",
      "default": "factory: dict",
      "description": "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, `attrs` are mutable. For example, the following is allowed for setting an `attr` `obj.attrs['foo'] = bar`. Also note that Tidy3D will raise a `TypeError` if `attrs` contain objects that can not be serialized. One can check if `attrs` are serializable by calling `obj.model_dump_json()`.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "add_ax_labels_and_title",
      "kind": "function",
      "signature": "add_ax_labels_and_title(ax: Ax, x: float | None = None, y: float | None = None, z: float | None = None, plot_length_units: LengthUnit = None)",
      "description": "Sets the axis labels, tick labels, and title based on `axis` and an optional `plot_length_units` argument."
    },
    {
      "name": "add_ax_lims",
      "kind": "function",
      "signature": "add_ax_lims(axis: Axis, ax: Ax, buffer: float = PLOT_BUFFER)",
      "description": "Sets the x,y limits based on `self.bounds`."
    },
    {
      "name": "array",
      "kind": "function",
      "signature": "array(offsets: ArrayLike | None = None, transforms: ArrayLike | None = None)",
      "description": "Return an array of copies of this geometry with optional offsets and/or linear transforms."
    },
    {
      "name": "bounding_box",
      "kind": "function",
      "signature": "bounding_box()",
      "description": "Returns `Box` representation of the bounding box of a `Geometry`."
    },
    {
      "name": "bounds",
      "kind": "function",
      "signature": "bounds()",
      "description": "Returns bounding box min and max coordinates."
    },
    {
      "name": "bounds_intersection",
      "kind": "function",
      "signature": "bounds_intersection(bounds1: Bound, bounds2: Bound)",
      "description": "Return the bounds that are the intersection of two bounds."
    },
    {
      "name": "bounds_union",
      "kind": "function",
      "signature": "bounds_union(bounds1: Bound, bounds2: Bound)",
      "description": "Return the bounds that are the union of two bounds."
    },
    {
      "name": "car_2_sph",
      "kind": "function",
      "signature": "car_2_sph(x: float, y: float, z: float)",
      "description": "Convert Cartesian to spherical coordinates."
    },
    {
      "name": "car_2_sph_field",
      "kind": "function",
      "signature": "car_2_sph_field(f_x: float, f_y: float, f_z: float, theta: float, phi: float)",
      "description": "Convert vector field components in cartesian coordinates to spherical."
    },
    {
      "name": "contains",
      "kind": "function",
      "signature": "contains(other: Geometry, strict_inequality: tuple[bool, bool, bool] = [False, False, False])",
      "description": "Returns `True` if the `.bounds` of `other` are contained within the `.bounds` of `self`."
    },
    {
      "name": "evaluate_inf_shape",
      "kind": "function",
      "signature": "evaluate_inf_shape(shape: Shapely)",
      "description": "Returns a copy of shape with inf vertices replaced by large numbers if polygon."
    },
    {
      "name": "from_gds",
      "kind": "function",
      "signature": "from_gds(gds_cell: Cell, axis: Axis, slab_bounds: tuple[float, float], gds_layer: int, gds_dtype: int | None = None, gds_scale: PositiveFloat = 1.0, dilation: float = 0.0, sidewall_angle: float = 0, reference_plane: PlanePosition = 'middle')",
      "description": "Import a `gdstk.Cell` and extrude it into a GeometryGroup."
    },
    {
      "name": "from_shapely",
      "kind": "function",
      "signature": "from_shapely(shape: Shapely, axis: Axis, slab_bounds: tuple[float, float], dilation: float = 0.0, sidewall_angle: float = 0, reference_plane: PlanePosition = 'middle')",
      "description": "Convert a shapely primitive into a geometry instance by extrusion."
    },
    {
      "name": "inside",
      "kind": "function",
      "signature": "inside(x: NDArray[float], y: NDArray[float], z: NDArray[float])",
      "description": "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."
    },
    {
      "name": "inside_meshgrid",
      "kind": "function",
      "signature": "inside_meshgrid(x: NDArray[float], y: NDArray[float], z: NDArray[float])",
      "description": "Perform `self.inside` on a set of sorted 1D coordinates. Applies meshgrid to the supplied coordinates before checking inside."
    },
    {
      "name": "intersections_2dbox",
      "kind": "function",
      "signature": "intersections_2dbox(plane: Box)",
      "description": "Returns list of shapely geometries representing the intersections of the geometry with a 2D box."
    },
    {
      "name": "intersections_plane",
      "kind": "function",
      "signature": "intersections_plane(x: float | None = None, y: float | None = None, z: float | None = None, cleanup: bool = True, quad_segs: int | None = None, section_tolerance_2d: bool = False)",
      "description": "Returns list of shapely geometries at plane specified by one non-None value of x,y,z."
    },
    {
      "name": "intersections_tilted_plane",
      "kind": "function",
      "signature": "intersections_tilted_plane(normal: Coordinate, origin: Coordinate, to_2D: MatrixReal4x4, cleanup: bool = True, quad_segs: int | None = None, section_tolerance_2d: bool = False)",
      "description": "Return a list of shapely geometries at the plane specified by normal and origin."
    },
    {
      "name": "intersects",
      "kind": "function",
      "signature": "intersects(other: Geometry, strict_inequality: tuple[bool, bool, bool] = [False, False, False])",
      "description": "Returns `True` if two `Geometry` have intersecting `.bounds`."
    },
    {
      "name": "intersects_axis_position",
      "kind": "function",
      "signature": "intersects_axis_position(axis: int, position: float, section_tolerance_2d: bool = False)",
      "description": "Whether self intersects plane specified by a given position along a normal axis."
    },
    {
      "name": "intersects_plane",
      "kind": "function",
      "signature": "intersects_plane(x: float | None = None, y: float | None = None, z: float | None = None)",
      "description": "Whether self intersects plane specified by one non-None value of x,y,z."
    },
    {
      "name": "kspace_2_sph",
      "kind": "function",
      "signature": "kspace_2_sph(ux: float, uy: float, axis: Axis)",
      "description": "Convert normalized k-space coordinates to angles."
    },
    {
      "name": "load_gds_vertices_gdstk",
      "kind": "function",
      "signature": "load_gds_vertices_gdstk(gds_cell: Cell, gds_layer: int, gds_dtype: int | None = None, gds_scale: PositiveFloat = 1.0)",
      "description": "Load polygon vertices from a `gdstk.Cell`."
    },
    {
      "name": "make_shapely_box",
      "kind": "function",
      "signature": "make_shapely_box(minx: float, miny: float, maxx: float, maxy: float)",
      "description": "Make a shapely box ensuring everything untraced."
    },
    {
      "name": "make_shapely_point",
      "kind": "function",
      "signature": "make_shapely_point(minx: float, miny: float)",
      "description": "Make a shapely Point ensuring everything untraced."
    },
    {
      "name": "parse_two_xyz_kwargs",
      "kind": "function",
      "signature": "parse_two_xyz_kwargs(**xyz: Any)",
      "description": "Turns x,y,z kwargs into indices of axes and the position along each axis."
    },
    {
      "name": "parse_xyz_kwargs",
      "kind": "function",
      "signature": "parse_xyz_kwargs(**xyz: Any)",
      "description": "Turns x,y,z kwargs into index of the normal axis and position along that axis."
    },
    {
      "name": "plot",
      "kind": "function",
      "signature": "plot(x: float | None = None, y: float | None = None, z: float | None = None, ax: Ax = None, plot_length_units: LengthUnit = None, viz_spec: VisualizationSpec = None, **patch_kwargs: Any)",
      "description": "Plot geometry cross section at single (x,y,z) coordinate."
    },
    {
      "name": "plot_params",
      "kind": "function",
      "signature": "plot_params()",
      "description": "Default parameters for plotting a Geometry object."
    },
    {
      "name": "plot_shape",
      "kind": "function",
      "signature": "plot_shape(shape: Shapely, plot_params: PlotParams, ax: Ax)",
      "description": "Defines how a shape is plotted on a matplotlib axes."
    },
    {
      "name": "pop_axis",
      "kind": "function",
      "signature": "pop_axis(coord: tuple[Any, Any, Any], axis: int)",
      "description": "Separates coordinate at `axis` index from coordinates on the plane tangent to `axis`."
    },
    {
      "name": "reflect_points",
      "kind": "function",
      "signature": "reflect_points(points: ArrayFloat3D, polar_axis: Axis, angle_theta: float, angle_phi: float)",
      "description": "Reflect a set of points in 3D at a plane passing through the coordinate origin defined and normal to a given axis defined in polar coordinates (theta, phi) w.r.t. the `polar_axis` which can be 0, 1, or 2."
    },
    {
      "name": "reflected",
      "kind": "function",
      "signature": "reflected(normal: Coordinate)",
      "description": "Return a reflected copy of this geometry."
    },
    {
      "name": "rotate_points",
      "kind": "function",
      "signature": "rotate_points(points: ArrayFloat3D, axis: Coordinate, angle: float)",
      "description": "Rotate a set of points in 3D."
    },
    {
      "name": "rotated",
      "kind": "function",
      "signature": "rotated(angle: float, axis: Axis | Coordinate)",
      "description": "Return a rotated copy of this geometry."
    },
    {
      "name": "scaled",
      "kind": "function",
      "signature": "scaled(x: float = 1.0, y: float = 1.0, z: float = 1.0)",
      "description": "Return a scaled copy of this geometry."
    },
    {
      "name": "sph_2_car",
      "kind": "function",
      "signature": "sph_2_car(r: float, theta: float, phi: float)",
      "description": "Convert spherical to Cartesian coordinates."
    },
    {
      "name": "sph_2_car_field",
      "kind": "function",
      "signature": "sph_2_car_field(f_r: float, f_theta: float, f_phi: float, theta: float, phi: float)",
      "description": "Convert vector field components in spherical coordinates to cartesian."
    },
    {
      "name": "surface_area",
      "kind": "function",
      "signature": "surface_area(bounds: Bound = None)",
      "description": "Returns object's surface area with optional bounds."
    },
    {
      "name": "to_gds",
      "kind": "function",
      "signature": "to_gds(cell: Cell, x: float | None = None, y: float | None = None, z: float | None = None, gds_layer: NonNegativeInt = 0, gds_dtype: NonNegativeInt = 0)",
      "description": "Append a Geometry object's planar slice to a .gds cell."
    },
    {
      "name": "to_gds_file",
      "kind": "function",
      "signature": "to_gds_file(fname: PathLike, x: float | None = None, y: float | None = None, z: float | None = None, gds_layer: NonNegativeInt = 0, gds_dtype: NonNegativeInt = 0, gds_cell_name: str = 'MAIN')",
      "description": "Export a Geometry object's planar slice to a .gds file."
    },
    {
      "name": "to_gdstk",
      "kind": "function",
      "signature": "to_gdstk(x: float | None = None, y: float | None = None, z: float | None = None, gds_layer: NonNegativeInt = 0, gds_dtype: NonNegativeInt = 0)",
      "description": "Convert a Geometry object's planar slice to a .gds type polygon."
    },
    {
      "name": "translated",
      "kind": "function",
      "signature": "translated(x: float, y: float, z: float)",
      "description": "Return a translated copy of this geometry."
    },
    {
      "name": "unpop_axis",
      "kind": "function",
      "signature": "unpop_axis(ax_coord: Any, plane_coords: tuple[Any, Any], axis: int)",
      "description": "Combine coordinate along axis with coordinates on the plane tangent to the axis."
    },
    {
      "name": "volume",
      "kind": "function",
      "signature": "volume(bounds: Bound = None)",
      "description": "Returns object's volume with optional bounds."
    },
    {
      "name": "zero_dims",
      "kind": "function",
      "signature": "zero_dims()",
      "description": "A list of axes along which the `Geometry` is zero-sized based on its bounds."
    }
  ],
  "group": "flex_rf.tidy3d"
}
