touching/abutting polygons

Discussion in 'Cadence' started by sajin, Mar 29, 2009.

  1. sajin

    sajin Guest

    Hi All
    I have two polygons in layout. I wanted to know whether these two
    polygons are touching each other. Is there a function in SKILL to know
    this.I tried dBLayerAnd, but will be true only if the two polygons are
    averlapping!!
    Thanks
    Sajin
     
    sajin, Mar 29, 2009
    #1
  2. sajin

    Riad KACED Guest

    Hi Sajin,

    There should be a function to do this, I'm pretty much sure. But just
    like you ... I don't know it. That does not help much, I Know ....

    The 'rescue' workaround I'm able to think of right know is just to
    look at the intersection of the points of your polygon.
    Assuming 2 polygons :

    p1~>points =
    ((0.0 0.0)
    (0.0 1.0)
    (1.0 1.0)
    (1.0 0.0)
    )

    p2~>points=
    ((1.0 0.0)
    (1.0 1.0)
    (2.0 1.0)
    (2.0 0.0)
    )

    And assuming a function called RKlistIntersection
    ;
    procedure( RKlistIntersection(l1 l2)
    setof(element l1 member(element l2))
    )
    ;

    Then the intersection of Polygons P1 and P2, i.e RKlistIntersection(p1
    p2) would return :

    ((1.0 1.0)
    (1.0 0.0)
    )

    I can't think of a better solution so far I'm afraid ...
    Hope other chaps are more inspired :)

    Hope this help anyway !
    Riad.
     
    Riad KACED, Mar 30, 2009
    #2
  3. Riad KACED wrote, on 03/30/09 00:27:
    Unfortunately that won't work if the polygons have touching edges, but no
    coincident points.

    If you want to find whether two polygons are overlapping or touching, you can
    use dbLayerOr() and see whether the result is a list of a single object. If you
    want to rule out overlapping objects, then you could also check whether
    dbLayerAnd returns anything - if it does, then they are overlapping.

    Or you could use the function CCSpointOnBoundary (and other related functions)
    from sourcelink solution 11024326 - in the file CCSpointInPolygon.il - to check
    if any of the points on either polygon are on the boundary of the other. There's
    lots of ways it could be done.

    Simplest (smallest amount of coding) is probably to use the dbLayer functions I
    mention above.

    Regards,

    Andrew.
     
    Andrew Beckett, Mar 30, 2009
    #3
  4. Hi Sajin, sounds like this would be simple to flag with a diva/assura
    DRC, though it looks like the other guys have Skill solutions for you.
    If not let me know and i'll post a couple of lines of DRC.

    Thanks

    Stu
     
    stuart.duncan, Mar 31, 2009
    #4
  5. sajin

    Riad KACED Guest

    Hi Andrew,

    Thanks for your advise indeed.
    I'm definitely going ti check out your sourceLink solution.

    Thanks,
    Riad.
     
    Riad KACED, Apr 1, 2009
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.