kqcircuits.util.groundgrid
- kqcircuits.util.groundgrid.insert_ground_grid(target_cell: Cell, target_layer: LayerInfo, grid_area: Box, protection: Region | RecursiveShapeIterator, grid_step: int, grid_size: int, grid_offset: int = 0)[source]
Generates ground grid as shapes in a target cell, without cell hierarchy. This function uses integer database units for all inputs.
- Parameters:
target_cell – Cell to place the grid into
target_layer – Layer to place the grid into
grid_area – Area to fill with grid
protection – Region to avoid when filling grid
grid_step – distance between grid rectangles
grid_size – size of grid rectangles
grid_offset – Value between 0 (inclusive) and grid_step/grid_size (exclusive) to place grid rectangle. 0 (default) for bottom left of grid_step * grid_step tile, increasing integer value places rectangle further up and right. Ensures multiple grids don’t overlap.
- kqcircuits.util.groundgrid.make_ground_grid_region(grid_area: Box, protection: Region | RecursiveShapeIterator, grid_step: int, grid_size: int, grid_offset: int = 0) Region[source]
Returns ground grid as a
Region. This function uses integer database units for all inputs.Note:
insert_ground_gridis more efficient if the grid will be inserted into a cell.- Parameters:
target_layer – Layer definition to place the grid into
grid_area – Area to fill with grid
protection – Region to avoid when filling grid
grid_step – distance between grid rectangles
grid_size – size of grid rectangles
grid_offset – Value between 0 (inclusive) and grid_step/grid_size (exclusive) to place grid rectangle. 0 (default) for bottom left of grid_step * grid_step tile, increasing integer value places rectangle further up and right. Ensures multiple grids don’t overlap.
Returns: a Region containing the ground grid