It looks like you're new here. If you want to get involved, click one of these buttons!
I am trying to retrieve the center point of all the vias (being represented by a box on a specific layer, say e.g. (17,0)) in a specific region of a layout.
I am using the following code that looks recursively for all the cells under a main cell that have shapes on the layer containing the vias:
via_centers = set()
shapes_iterator = main_cell_view.cell.begin_shapes_rec_overlapping(via_layer_index, target_bbox)
while not shapes_iterator.at_end():
shape = shapes_iterator.shape()
First, I get much less shapes than vias drawn of the vias layer.
Second, I noted that some shapes with the same center point are returned several times. To keep only one of these points, I had to use a Python set for the via_centers variable.
Third, the center point of the returned shapes (after transformation from relative to absolute coordinates) do not match with the coordinates of the actual vias.
For sure, I'm doing something wrong. But what?
Many thanks for your help.