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]

Return bounds and concatenated geometry tables for selected components.

Parameters:
  • box_plus_buffer – If True, use selected components’ bounding box plus the supplied buffer; otherwise use the chip size.

  • qcomp_ids – Component ids to include (may be empty to include all).

  • case – Return code from QRenderer.get_unique_component_ids.

  • x_buff – Buffer to add in x when box_plus_buffer is True.

  • y_buff – Buffer to add in y when box_plus_buffer is True.

Returns:

Bounding box (minx, miny, maxx, maxy). pd.DataFrame: Path and poly tables concatenated for the selection. pd.DataFrame: Path, poly, and junction tables concatenated. bool: True if chip names match between design and layer stack. set | None: Valid chip names if they match, otherwise None.

Return type:

tuple

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]