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
- 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 toTrue
, theground_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 ofbase_metal_gap
is calculated by combining the areas ofbase_metal_gap_wo_grid
andground_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_calculations –
True
(default) to optimize ground grid area calculations.
- Returns: dictionary
{layer_name: {'area': area, 'density': density}}
, wherearea
is in um^2 anddensity
is a fraction < 1.
