DRC: "not_inside"

edited October 2014 in KLayout Support
Hallo!

I have a problem with the "not_inside" function of the DesignRuleCheck:
It doesn't detect all designrule failures.

My Version: KLayout 0.23.7 on Windows7

My code:
report("DRC Bugfinder.lyrdb")
Contact= input(15, 0)
Metal1= input(20, 0)
Contact.not_inside(Metal1).output("not_inside_Metal1_Contact","metal - contact not_inside")

My Problem would be more descriptive if I could upload a screenshot, but I'll try to outline it schematically:
basically I have 2 polygons whereas the "Contact"-polygon is not completely inside the "Metal1"-polygon:
Contact: +
Metal1: -
space:...
-----------------------------------
----------+-+-+-+-+-+-+-+---
............++++++-+-+-+-+---
----------+-+-+-+-+-+-+-+---
-----------------------------------
is correctly detected
----------
----------
----+-+-+-+++++++++++++
----------
----------
is NOT detected! But only if the left end of the "Contact"-box is enclosed on 3 sides by the Metal1, if it is mirrored or rotated by 90° it is detected correctly.

Could this be a bug or is there an error in my code or layout?

Tanks and best regards,
Paul

Comments

  • edited November -1

    Hi Paul,

    thanks for your ASCII art :-)

    The forum version I am using is too old to support image attachments, and migration is some effort, so I postponed that activity.

    You can embed images from external sources in your post using markdown. For now I have reformatted your drawing for other readers:

    -----------------------------------
    ----------+-+-+-+-+-+-+-+---
    ............++++++-+-+-+-+---
    ----------+-+-+-+-+-+-+-+---
    -----------------------------------
    

    and the failing one:

    ----------
    ----------
    ----+-+-+-+++++++++++++
    ----------
    ----------
    

    I am trying to understand that ... By "+-" you mean metal and contact is overlapping, right?

    I'll check that.

    Matthias

  • edited November -1

    Hi Paul,

    I can reproduce it and I'm quite concerned that such a simple thing is not working. It happens only on the right side. Apparently I have tested too much on the left side.

    I'll fix that in the next minor release. As a workaround you may use

    Contact.interacting(Contact - Metal1)
    

    which basically gives the same results, just a little slower.

    Thanks for mentioning this.

    Matthias

  • edited October 2014

    Hi Matthias!

    No problem, you have interpreted my ASCII art correctly, "+-" is overlapping.

    Thanks for your promt answer and your help,
    I thought that "interacting" would select also shapes that are completely inside, but it works fine and does the same.
    Best regards,
    Paul

  • edited November -1
    Hi, Matthias,
    "interacting" really gives the same results ac "not_inside", it also detects shapes that are completely outside the other shape, but then in the picture of the description of the "Assistent" the red box should also be selected white, is this correct?
    Regards,
    Paul
  • edited October 2014
    Sorry, Matthias,
    I solved my last question by myself, I didn't understand, that you had combined the Metal1 and Contact with a boolen "not" in your exampel!
    Thanks,
    Paul
Sign In or Register to comment.