Selection of multiple edges created using python scripting

Hi all,
I was creating a layout using pya module in python. The layout consists of several edge pairs. I am using edge and edgepair classes to create these edge pairs. Is it possible to select both the edges of an edge pair by clicking on any single edge of the pair? Whenever I try to select an edge from an edge pair, only a single edge is getting selected on klayout viewer (I am using it to identify edges of multiple edge pairs that are very close to each other).
Thank you in advance,
Preet

Comments

  • Hi Preet,

    edge pairs aren't real layout objects ... while edges can be represented by two-point paths with zero width, there is no such representation of an edge pair in GDS. I assume that edge pairs are getting resolved into single edges when you save a layout.

    Edge pairs only play a role in a DRC report database where there a objects for this purpose.

    Matthias

  • Thanks Matthias for the explanation.
    Is there any method by which it will be possible for me to highlight(differentiate) a group of related edges i.e. edges with same DRC violations?

    Thanks in advance,
    Preet

  • Hi Preet,

    what do you mean by "same DRC violations"? Same distance? Or just violations?

    Are we still talking about pya scripts? Or do you mean DRC?

    Matthias

  • Hi Matthias,
    I meant Edgepairs having same violations. I have the co-ordinates of the edges with same violations and I am plotting them on the layout. I was having difficulty with identifying the individual violation.
    Is there any function or method in pya module that I can use to differentiate a given set of edges from others?

    Thanks in advance,
    Preet

  • Hi Preet,

    I guess that this would then rather be a "binning" feature, not DRC.

    DRC is just "less than". The edge pairs mark those situations where the distance between two edges is less than a given distance. If your layout is manhattan the situation will be easier: then the edges of the edge pairs are parallel, and the distance can be computed from the edge pair as:

    # ep = edge pair
    ep.first.distance(ep.second.p1)
    

    But in the general case, I'm afraid there is no clear definition of "violation distance".

    Matthias

Sign In or Register to comment.