Home > Community > Forums > Custom IC SKILL > Select objects in specific layer that intersect with objects in another layer

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

 Select objects in specific layer that intersect with objects in another layer 

Last post Sun, Oct 28 2012 10:25 PM by Slayer. 1 replies.
Started by Peter K 28 Oct 2012 08:17 PM. Topic has 1 replies and 471 views
Page 1 of 1 (2 items)
Sort Posts:
  • Sun, Oct 28 2012 8:17 PM

    • Peter K
    • Not Ranked
    • Joined on Mon, Oct 29 2012
    • Posts 1
    • Points 20
    Select objects in specific layer that intersect with objects in another layer Reply

    Hello,

     I would like to select all objects in LAYER1 which are touching objects in LAYER2.  Any ideas on how to do this with SKILL? 

     Thanks!

    Peter 

    • Post Points: 20
  • Sun, Oct 28 2012 10:25 PM

    • Slayer
    • Top 500 Contributor
    • Joined on Thu, Jan 13 2011
    • Posts 29
    • Points 310
    Re: Select objects in specific layer that intersect with objects in another layer Reply

    IMHO, the simplest action - in the loop take need command (for example dbLayerAnd and etc.) and look at the result if result shape add initial shape to the specific list and result add to the delete list.

    For example:

     

    procedure(Test(pcCV "d")

       let( (l1_list l2_list toDelete needeedShapes tmpShape

            l1_list = setof(i pcCV->shapes i->layerNAme == LAYER1);

            l2_list = setof(i pcCV->shapes i->layerNAme == LAYER2);

            foreach(l1 l1_list

               foreach(l2  l2_list

                  tmpShape = dbLayerAndNot(pcCV LAYER1 l1 l2);

                  when

                    needeedShapes = cons(l1 needeedShapes);

                    toDelete = cons(tmpShape toDelete);

                   );

               );

            );

      foreach(s toDelete dbDeleteObkect(s));

       neededShapes

       )

    )

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by Peter K at 28 Oct 2012 08:17 PM. Topic has 1 replies.