DRC - elementwise length comparison between several distinct pieces

In a DRC scripting context: If I have succesfully seperated a layer into two distinct pieces (an upper and lower piece), and have done so for all of boxes/polygons of that type, how can I output the pairwise combinations where the length of the upper is smaller than the lower?

Comments

  • I dont quite get the issue. Would you mind posting the script or a picture of the problem?
  • Hi hfred and thank you for the quick reply. I am new to DRC scripting in KLayout and in general too, so far my script does nothing fruitful, but in the provided picture I am atleast verifying that my script manages to remove the overlap, giving distinct pieces. I now want to check that the upper piece has a larger vertical length than the lower piece. This can probably be done in many different ways, but I am not complete understanding how to do it for each combination of pieces without looping like in a traditional language? To my understanding DRC in KLayout is more holistic? Meaning one needs to consider all polygons (in a layer) at once? are you able to see my provided picture below?

  • Hello arikb, I can see the picture and i understand the problem now. Im not very experienced with DRC or klayout in general, but i think the main issue is that, since the polygons are already seperated you would need to determine which pair of polygons belong togheter. So unless you have a proper way of doing that you could try to calculate the vertical length of the pieces without seperating them using the polygon and the overlapping area.
  • I am not sure the seperation is the issue.. But would you say in general that DRC in KLayout is constrained to doing checks for all polygons residing in a layer in one swoop, i.e. completely geometrically considering them all at once? Or would some loop logic be viable? All I know is that if I'd do some loop - if I in each loop would do layer.output() I would probably get many reports or have the result from the previous overwritten by the former or something like that... Therefore I am not sure looping is the way to go.

    Regardless, how would you approach the problem? The layers are called horisontal and vertical. And I simply want to verify that verticals length above the cross is larger than verticals length below the cross.

  • As far as i know having some looping is not a major issue, but generally i dont think DRC is the right tool for this. I guess you could seperate each polygon alongside the overlapping polygon to its own seperate layer, which would make comparing them easier, but honestly i dont have a solid idea how to solve the issue.
Sign In or Register to comment.