Efficient way in DRC to find Straddling shapes

edited June 2014 in KLayout Support
I'd like to select shapes (or even maybe edges) of a layer which "straddle" another layer, i.e. shapes that that cross over edges of the other layer (not just touching).

Does anyone know an efficient way?

Comments

  • edited November -1
    Okay, sorry, this seems to work quite efficiently:

    checkedLayer.interacting(otherLayer).not_inside(otherLayer)
  • edited November -1

    Hi Brendan,

    very good ... that's what I would have suggested anyway :-)

    Best regards,

    Matthias

  • edited November -1
    Hi Matthias,

    Yes, just getting to grips with KLayout's DRC... In general it seems pretty fast at doing conditional selection (as above) or single layer dimension checks, but very slow at doing layer-to-other-layer dimension checks - is that what you expect?

    Cheers,

    Brendan.
  • edited November -1

    Hi Brendan,

    I'd expect record-breaking, unmatched performance of course :-)

    No frankly - performance was not the ultimate goal in the DRC engine. It uses a pretty simple flat approach and the main targets are small to medium sized layouts. And I admit there is room for improvement.

    In contrast to the conditional selection operations, the dimension checks perform a merge step before determining the violations. This step removes overlaps and touching edges and joins long edges. This step is not necessarily slow but it adds some overhead. I assume this is causing a slow execution in your case. You can test that by explicitly merging the layers, i.e.

    # instead of
    l1.overlap(l2, 1.0.um)
    
    # you can write
    l1.merged.overlap(l2.merged, 1.0.um)
    

    If the layers are already merged, the overlap check should not merge again and you can derive the run times for the separate steps from the log file.

    if you happen to have a good testcase that you could send me, I can have a look at the performance. Maybe there is a bottleneck that is easy to remove.

    Best regards,

    Matthias

Sign In or Register to comment.