get_layer_overlaps
- ipkiss3.all.get_layer_overlaps(layout, layers)
Finds overlapping geometries between all shapes in each specified layer of a layout.
- Parameters:
- layout: Layout data of a PCell
Layout data of a PCell.
- layers: list[Layer]
List of layers to inspect.
- Returns:
- overlap_elems: Dict
Dictionary of IPKISS layers as keys, with the overlapping geometries as elements in that layer.
Examples
import si_fab.all as pdk import ipkiss3.all as i3 class OverlappingDesign(i3.PCell): class Layout(i3.LayoutView): def _generate_elements(self, elems): elems += i3.Rectangle(layer=i3.TECH.PPLAYER.SI, center=(0, 0), box_size=(10, 10)) elems += i3.Rectangle(layer=i3.TECH.PPLAYER.SI, center=(5, 5), box_size=(10, 10)) elems += i3.Rectangle(layer=i3.TECH.PPLAYER.SIN, center=(15, 15), box_size=(10, 10)) elems += i3.Rectangle(layer=i3.TECH.PPLAYER.SIN, center=(20, 20), box_size=(10, 10)) return elems cell = OverlappingDesign() cell_lay = cell.Layout() cell_lay.visualize() overlapping_elements = i3.get_layer_overlaps(cell_lay, [i3.TECH.PPLAYER.SI, i3.TECH.PPLAYER.SIN]) # Copy the overlapping elements into a crossing error layer and visualize them. si_elems = [ b.modified_copy(layer=i3.TECH.PPLAYER.ERROR.CROSSING) for b in overlapping_elements[i3.TECH.PPLAYER.SI] ] sin_elems = [ b.modified_copy(layer=i3.TECH.PPLAYER.ERROR.CROSSING) for b in overlapping_elements[i3.TECH.PPLAYER.SIN] ] i3.LayoutCell().Layout(elements=si_elems + sin_elems).visualize()