Home > Community > Forums > Custom IC SKILL > Script for finding same Metal type Shape Overlapping a Trace

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Script for finding same Metal type Shape Overlapping a Trace 

Last post Fri, Mar 1 2013 11:03 AM by Andrew Beckett. 21 replies.
Started by RFStuff 26 Feb 2013 05:07 AM. Topic has 21 replies and 2259 views
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts:
  • Tue, Feb 26 2013 5:07 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Script for finding same Metal type Shape Overlapping a Trace Reply

    Dear All,

    I want to find whether same metal type shape  is overlapping another shape of the same metal.

    If it is overlapping, then the overlap area should blink.

    Basically this I need for finding SHORT with undesired trace.

    For example: I have a trace ( may be a Rectangle/Path). I select this. Then an enabled SKILL script should find a same metal type shape overlapping with the trace and highligting the overlapped area with the trace.

    Can anybody show me some light  for this.

    Kind Regards,

    • Post Points: 20
  • Tue, Feb 26 2013 7:53 AM

    Re: Script for finding same Metal type Shape Overlapping a Trace Reply
    I'd probably use dbGetOverlaps to find the shapes (on the layer of interest) within the bBox of the selected trace, and then use dbLayerAnd to produce the shapes on a dummy layer to find the precise interactions. Then create markers with the same coordinates as the polygons coming from dbLayerAnd, and delete the dbLayerAnd result shapes.

    There's also a set of functions (dbPointAnd or something like that - I'm in an airport and can't check) which don't need to actually create any shapes in the database, but those could be harder to use if you've got a variety of different source shape types.

    Regards,
    Andrew
    • Post Points: 20
  • Tue, Feb 26 2013 8:15 AM

    • theopaone
    • Top 100 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 72
    • Points 1,105
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

     Andrew is correct, dbLayerAnd is the easiest to use to create the overlapping areas but the dbPointArrayAnd (I'm away from Virtuoso so check the name) may be easier to use if you find shapes in the hierarchy. Transform the points to the current cellView, perform the AND and create a marker. If using dbLayerAnd, output the shapes to a layer like "y0" and then turn them into markers. Be sure to delete the new shapes.

    Ted

    • Post Points: 20
  • Tue, Feb 26 2013 9:56 PM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

     dear andrew & ted,

     thanks alot for your replies.

    could you please tell th function for creating a marker around the polygon.

    is odcRegMarker() the right one ?

    kind regards,

    • Post Points: 20
  • Wed, Feb 27 2013 12:27 AM

    • berndfi
    • Top 100 Contributor
    • Joined on Tue, Sep 11 2012
    • Neubiberg, Bavaria
    • Posts 64
    • Points 1,195
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

     For that purpose I would try "geCreateMarkerByBBox".

    • Post Points: 20
  • Wed, Feb 27 2013 12:45 AM

    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    Bernd's right - that's what I was going to suggest (or any of the geCreateMarker family). Note that when you move to IC61, these functions are obsolete - they create markers using the "old" way of a shape on the marker layer, compared with the new OpenAccess marker objects. So in IC61 you should use dbCreateMarker (this didn't exist in IC5141).

    Andrew.

    • Post Points: 20
  • Wed, Feb 27 2013 10:55 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    Dear Andrew,

    I tried with dbGetOverlaps(). But it did NOT work

    The test scenario is as follows:-

    I am in the toplevel and I have the hierarchy level of 5.In level 4 only 3 shapes (paths) are overlapping with the trace.

    But if you see it is actually showing me 6 shapes. Which is NOT correct.

     shapeList = dbGetOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    \t (db:217705012
    \t     (db:217517248 db:262161624)
    \t     (db:217517248 db:262161472)
    \t     (db:217517248 db:262161312)
    \t     (db:217517248 db:261977724)
    \t     (db:217517248 db:261977644)
    \t     (db:217517248 db:261977564)
    \t )

    Then for dbLayerAnd() the following returned nil

    dbLayerAnd(cv "ME7" list(car(cdr(shapeList))) list(obj1))

     Kind Regards,

    • Post Points: 20
  • Wed, Feb 27 2013 11:10 AM

    • theopaone
    • Top 100 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 72
    • Points 1,105
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    1. Before IC6, dbGetOverlaps returned the value of any shape whose Bounding Box intersected with the search bounding box. dbGetTrueOverlaps found shapes that only physically overlapped the search box.

    2. The shapes in the hierarchy have to be transformed to the current coordinate space before passing into dbLayerAnd. The shapes that are returned as a list are hierarchical shapes, you have to transform their points into the current coordinate space and then either create new shapes (usually on a layer like y0) or use the point list in the dbPointArray functions. If doing the former, be sure to delete the new shapes after you are done with them. If the latter, you have to transform rectangles into 4 points and paths have to be transformed into their outlines.

    Commands to look up: dbConcatTransform,  dbTransformPoint.

    Ted

    RFStuff:

    DI tried with dbGetOverlaps(). But it did NOT work

    The test scenario is as follows:-

    I am in the toplevel and I have the hierarchy level of 5.In level 4 only 3 shapes (paths) are overlapping with the trace.

    But if you see it is actually showing me 6 shapes. Which is NOT correct.

     shapeList = dbGetOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    \t (db:217705012
    \t     (db:217517248 db:262161624)
    \t     (db:217517248 db:262161472)
    \t     (db:217517248 db:262161312)
    \t     (db:217517248 db:261977724)
    \t     (db:217517248 db:261977644)
    \t     (db:217517248 db:261977564)
    \t )

    Then for dbLayerAnd() the following returned nil

    dbLayerAnd(cv "ME7" list(car(cdr(shapeList))) list(obj1))

     Kind Regards,

     

     

    • Post Points: 35
  • Wed, Feb 27 2013 11:41 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    1) The guide says that usage of dbGetTrueOverlaps() should be avoided

     

    2) I couldn't get about your point transformation idea.

    1st of all dbLayerAnd() needs the list of shape IDs not the list of POINTS.

    2nd if you know the exact points of overlap ( which you think can be transformed), then why one needs the ANDing operation.

    It is a chicken egg dilema.

    Kind Regards,

     

     

    • Post Points: 35
  • Wed, Feb 27 2013 11:48 AM

    • theopaone
    • Top 100 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 72
    • Points 1,105
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    Disregard the warning. It may have performance problems in IC5141 but it is the only way you will get the answer you want.

    The shape ID's that are being returned are hierarchical. The dbLayer functions only take shapes defined in the local coordinate space. If you just get the shape from the hierarchical list, you are getting the shape in the local coordinate space for the shape's master cellView. You have to get the points of that shape and then transform them to the current coordinate space (in you open cellView) and then create a new shape with those transformed points. Pass that new shape into  the dbLayer functions. You are not transforming the overlap, you are transforming the original points to the current coordinate space, creating a new shape and using that shape to determine the overlap points.

     Which came first? The rooster.

    • Post Points: 5
  • Wed, Feb 27 2013 12:02 PM

    Re: Script for finding same Metal type Shape Overlapping a Trace Reply
    I've posted an example in the last few days called something like abGetOverlapTransform which will take one of the results from dbGetOverlaps and give you the overall transform. Then you could use dbCopyFig to copy the original shape using abGetOverlapShape - I may have posted that too, I can't remember - I'll check, using the combined transform into the current cellview. Do the dbLayetAnd on this new shape and then delete it when you're done.

    Slight performance penalty when using dbGetTrueOverlaps but you don't really need to worry about using that because any false hits will return nil from the layer and.

    Andrew
    • Post Points: 5
  • Thu, Feb 28 2013 12:08 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

     Hi TheoPain,

    I tried with dbGetTrueOverlaps().

    But No chnage in the output. As you have mentioned, it should have returned 3 objects instead of 6 objects as there are only total 3 overlapping objects (PATHS) of the same metal layer of  the trace.

    shapeList = dbGetTrueOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    \t (db:217705012
    \t     (db:217517248 db:262161624)
    \t     (db:217517248 db:262161472)
    \t     (db:217517248 db:262161312)
    \t     (db:217517248 db:261977724)
    \t     (db:217517248 db:261977644)
    \t     (db:217517248 db:261977564)
    \t )

    Kind Regards,

    • Post Points: 20
  • Thu, Feb 28 2013 2:59 AM

    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    A picture might help, but I suspect that the problem is that the dbGetTrueOverlaps is finding all the objects which interact with the bounding box of obj1. See the attached picture. In this case, the selected object is obj1, and I get:

    (db:0x17511f12
        (db:0x17511f92 db:0x17512292)
        (db:0x17511f92 db:0x17512293)
    )

    The top right path iteracts with the bounding box of the first shape - that's correct. If the path had moved a little to the right so that it didn't interact with the bBox of the fat path, then dbGetTrueOverlaps wouldn't return it - however, dbGetOverlaps (in IC5141) would still return it if the bBox of the lower shape interacts with the bBox of the selected shape. That's what the difference between the two functions (in IC61 dbGetOverlaps always returns the "true" overlaps).

    That's why you need to do the dbLayerAnd as well. Here's what I did to do that:

    overlaps=dbGetTrueOverlaps(cv obj1~>bBox obj1~>layer 0:5)
    shapeList=nil
    foreach(overlap overlaps
      unless(overlap==obj1
        shapeList=cons(dbCopyFig(abGetOverlapShape(overlap) cv abGetOverlapTransform(overlap)) shapeList)
      )
    )
    interactingRegions=dbLayerAnd(cv "y0" list(obj1) shapeList)
    foreach(shape shapeList
      dbDeleteObject(shape)
    )
    ; if a shape on y0 isn't enough, you can convert to markers
    foreach(shape interactingRegions
      if(shape~>objType=="polygon" then
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>points)
      else
        geCreateMarkerByBBox(cv "warning" "SHORT" "shorting shape" "some reason" shape~>bBox)
      )
      dbDeleteObject(shape)
    )

    Regards,

    Andrew.

    • Post Points: 20
  • Thu, Feb 28 2013 3:51 AM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 214
    • Points 3,780
    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

    Dear Andrew,

    Thanks a lot. 

    I think you might have forgotten to attach the picture.

    Kind Regards,

    • Post Points: 20
  • Thu, Feb 28 2013 4:01 AM

    Re: Script for finding same Metal type Shape Overlapping a Trace Reply

     I must be getting old and forgetting things. Here  it is - sorry!

    Andrew.


    • Post Points: 20
Page 1 of 2 (22 items) 1 2 Next >
Sort Posts:
Started by RFStuff at 26 Feb 2013 05:07 AM. Topic has 21 replies.