bounds_for_path_and_poly_tables#

Functions

determine_larger_box(minx, miny, maxx, maxy, ...)

Return box which includes the two boxes.

Classes

BoundsForPathAndPolyTables(design)

Create class which can be used by multiple renderers.

class BoundsForPathAndPolyTables(design: MultiPlanar)[source]#

Create class which can be used by multiple renderers. In particular, this class assumes a LayerStack is being used within QDesign.

are_all_chipnames_in_design() Tuple[bool, set | None][source]#

Using chip names in layer_stack information, then check if the information is in MultiPlanar design.

Returns:

bool if there is a key in design with same chip_name as in layer_stack

Union has either None if the names don’t match, or the set of chip_names that can be used.

Return type:

Tuple[bool, Union[set, None]]

chip_names_not_in_design(layer_stack_names: set, design_names: set)[source]#

Tell user to check the chip name and data in design.

Parameters:
  • layer_stack_names (set) – Chip names from layer_stack.

  • design_names (set) – Chip names from design.

chip_size_not_in_chipname_within_design(chip_name: str)[source]#

Tell user to check the chip size data within design.

Parameters:

chip_name (str) – Chip names from layer_stack.

classmethod ensure_component_box_smaller_than_chip_box_(box_for_xy_bounds: Tuple, chip_bounds_xy: Tuple) Tuple[source]#

If the box_plus_buffer is larger than the aggregate chip bounds from DesignPlanar, use the chip bounds as the cutoff.

Parameters:
  • box_for_xy_bounds (Tuple) – In xy plane, the bounding box for the components to render. Box from QGeometry tables.

  • chip_bounds_xy (Tuple) – In xy plane, the bounding box for aggregate chip size. Box from MultiPlanar chip size.

Returns:

In xy plane, the box_for_xy_bounds will be limited by the chip_bounds_xy

if box_for_xy_bounds is larger than chip_bounds_xy. If chip_bounds_xy is None (bad input), no checking will happen and box_for_xy_bounds will be returned.

Return type:

Tuple

get_bounds_of_path_and_poly_tables(box_plus_buffer: bool, qcomp_ids: List, case: int, x_buff: float, y_buff: float) tuple[tuple[float, float, float, float], DataFrame, DataFrame, bool, None | set][source]#

If box_plus_buffer is True, returns a tuple containing minx, miny, maxx, maxy values for the bounds of what was selected to be rendered. Else, use the chip size for Tuple.

Also, return the Tuple so can be used later within a renderer.

Parameters:
  • box_plus_buffer (bool) – Use the box of selected components plus a buffer size OR the chip size based on QComponents selected.

  • qcomp_ids (List) – Empty or partial list of components in QDesign. From QRenderer.get_unique_component_ids

  • case (int) – Return code used from QRenderer.get_unique_component_ids()

  • x_buff (float) – If box_plus_buffer, need the buffer value in x coordinate.

  • y_buff (float) – If box_plus_buffer, need the buffer value in y coordinate.

Returns:

tuple: minx, miny, maxx, maxy values based

on either total chip size or box_plus_buffer. In xy plane, the box_for_xy_bounds will be limited by the chip_bounds_xy if box_for_xy_bounds is larger than chip_bounds_xy.

pd.DataFrame: The path and poly dataframes concatenated for qcomp_ids pd.DataFrame: The path, poly, junction dataframes concatenated for qcomp_ids bool: If there is a key in design with same chip_name as in layer_stack Union[None,set]: Either None if the names don’t match,

or the set of chip_names that can be used.

Return type:

tuple[tuple[float, float, float, float], pd.DataFrame, pd.DataFrame, bool, Union[None,set]]

get_box_for_xy_bounds() None | Tuple[float, float, float, float][source]#

Assuming the chip size is used from Multiplanar design, and list of chip_names comes from layer_stack that will be used to determine the box size for simulation.

Returns:

None if not able to get the chip information Tuple holds the box to use for simulation [minx, miny, maxx, maxy]

Return type:

Union[None, Union[Tuple[float, float, float, float], None]]

get_x_y_for_chip(chip_name: str) Tuple[tuple, int][source]#

If the chip_name is in self.chips, along with entry for size information then return a tuple=(minx, miny, maxx, maxy). Used for subtraction while exporting design.

Parameters:

chip_name (str) – Name of chip that you want the size of.

Returns:

tuple: The exact placement on rectangle coordinate (minx, miny, maxx, maxy). int: 0=all is good 1=chip_name not in self._chips 2=size information missing or no good

Return type:

Tuple[tuple, int]

determine_larger_box(minx: None | float, miny: None | float, maxx: None | float, maxy: None | float, chip_box: tuple) Tuple[float, float, float, float][source]#

Return box which includes the two boxes.

Parameters:
  • minx (Union[None, float]) – Minimum of x coordinate

  • miny (Union[None, float]) – Minimum of y coordinate

  • maxx (Union[None, float]) – Maximum of x coordinate

  • maxy (Union[None, float]) – Maximum of y coordinate

  • chip_box (tuple) – Second box in following format: minx, miny, maxx, maxy

Returns:

The size: minx, miny, maxx, maxy of

box which includes both boxes.

Return type:

Tuple[float, float, float, float]