kqcircuits.util.area

class kqcircuits.util.area.AreaReceiver(*args, **kwargs)[source]

Bases: TileOutputReceiver

Class for handling and storing output from TilingProcessor

@brief Creates a new object of this class

put(ix, iy, tile, obj, dbu, clip)[source]

Function called by TilingProcessor on output

kqcircuits.util.area.get_area_and_density(cell: Cell, layer_infos=None, optimize_ground_grid_calculations=True)[source]

Get total area and density \(\rho=\frac{area}{bbox.area}\) of all layers.

This calculation is slow for geometries with many polygons, and in practice the layers containing ground grid take the majority of time. When optimize_ground_grid_calculations is set to True, the ground_grid layer area is calculated by assuming all polygons in this layer are identical and don’t overlap each other (which they should be by definition). Further, the area of base_metal_gap is calculated by combining the areas of base_metal_gap_wo_grid and ground_grid areas.

Parameters:
  • cell – target cell to get area from

  • layer_infos – list of LayerInfo to get area for, or None to get area for all layers.

  • optimize_ground_grid_calculationsTrue (default) to optimize ground grid area calculations.

Returns: dictionary {layer_name: {'area': area, 'density': density}}, where area is in um^2 and density

is a fraction < 1.

../_images/kqcircuits.util.area.png