Home > Community > Forums > Custom IC SKILL > Object occupying a point

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: *

 Object occupying a point 

Last post Mon, Jan 14 2013 1:29 AM by Andrew Beckett. 2 replies.
Started by thomas1000 11 Jan 2013 04:31 PM. Topic has 2 replies and 521 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Jan 11 2013 4:31 PM

    Object occupying a point Reply

    Is there any way to tell if an object, say for example it is a metal object, actually occupies a given point (as opposed to surrounding it like a U or O shape).  The bounding box cannot be used because the object may surround but not actually have metal at the point in question.  Expecially if it is a trace.  I need to know if the object actually occupies the point itself with part of its body.

    • Post Points: 20
  • Mon, Jan 14 2013 1:03 AM

    • marcelpreda
    • Top 150 Contributor
    • Joined on Tue, Jan 19 2010
    • Bucharest, Romania
    • Posts 43
    • Points 695
    Re: Object occupying a point Reply

     Hi there,

     

    You have at least two options:

    #1

    you have the x:y coordinates of the point, just create a small bbox , like (x-0.001:y-0.001) : (x+0.001:y+0.001) and then use 

    dbgetTrueOverlaps(
    d_cellView
    l_bBox
    [ tx_layer | t | nil [ lx_level ] ]
    [ g_doRowCol ]
    )
    => ld_fig | nil

     If your object is overlapping this small bbox then it shuld  be found in the ld_fig list.

    Take care: ld_fig is "a list of lists [of lists [of lists [....]]] of db_objects"  (nested lists).

     

     #2

    If you know the x:y coordinates of the point and also the coordinates of your shape as poligon points you can use an algorithm like "ray casting" , see http://en.wikipedia.org/wiki/Ray_casting_algorithm#Ray_casting_algorithm .

     You have to deal with the points are are on the perimeter: are they in or are they out ?

     

    BR,

    Marcel

    • Post Points: 20
  • Mon, Jan 14 2013 1:29 AM

    Re: Object occupying a point Reply

    A couple of additional thoughts. First, you don't need to create a small box - a zero area box will do (i.e. list(x:y x:y)).

    For the ray casting idea, you can find an implementation - abPointInPolygon - here

    Regards,

    Andrew.

     

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by thomas1000 at 11 Jan 2013 04:31 PM. Topic has 2 replies.