It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I'm wondering if there is any helper function/method that allows me to retrieve the absolute position of a shape (relative to the top level cell) in a hierarchical GDS - or do I need to walk my way back to the top cell through the instance tree ?
The use case is to retrieve the position of shapes on a particular layer that defines the bonding pad openings in a ASIC.
I'm using a code similar to this:
def get_bbox_for_cells_containing_cb_layer(
layout: kdb.Layout, layer: int, datatype: int
):
layer1 = layout.layer(layer, datatype)
top_cell = layout.top_cell()
iter = top_cell.begin_shapes_rec(layer1)
while not (iter.at_end()):
if iter.shape().is_polygon():
logging.debug("Polygon: " + str(iter.shape().dpolygon))
logging.debug(" From shape " + str(iter.shape()))
logging.debug(" Property " + str(iter.shape().properties()))
logging.debug(" BBOX " + str(iter.shape().dbbox()))
elif iter.shape().is_path():
The shapes I'm collecting are "deep" into the hierarchy of the GDS (they don't belong to the top level).
Thank you
Comments
Hi,
About this?
Test Data
Code and Results
With two instances of cell
A
Updated: 2024-09-17