Home > Community > Forums > Custom IC SKILL > How to get the lower level shapes in skill?

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

 How to get the lower level shapes in skill? 

Last post Wed, Feb 27 2013 11:20 PM by Andrew Beckett. 7 replies.
Started by jiangzhou 25 Feb 2013 05:53 PM. Topic has 7 replies and 1277 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, Feb 25 2013 5:53 PM

    • jiangzhou
    • Not Ranked
    • Joined on Tue, Feb 26 2013
    • Posts 3
    • Points 75
    How to get the lower level shapes in skill? Reply

    I want to get the lower level shapes in an area.Also,I saw a post in forum.

    Code  writing like below:

    ******************************************************

    procedure(abGetOverlapShape(overlap)
      if(listp(overlap) then
          abGetOverlapShape(cadr(overlap))
      else
          overlap
      )
    )

    cv=geGetEditCellView()

    figList2= dbGetOverlaps(cv list(car(pts) car(pts)) list("M2" "drawing") 32 t)

    flattenendFigList2=foreach(mapcar overlap figList2
      srcShape=abGetOverlapShape(overlap)
      dbCopyFig(srcShape cv dbGetHierPathTransform(overlap))
    )

    ******************************************************

    But 'dbGetHierPathTransform' is used for IC6.1.How can I replace it in IC5.1?Thanks!!

    • Post Points: 20
  • Mon, Feb 25 2013 9:23 PM

    Re: How to get the lower level shapes in skill? Reply

    You can use this:

    /*****************************************************************
    *                                                                *
    *                (abGetOverlapTransform overlap)                 *
    *                                                                *
    * Get the transform needed to transform the shape in the overlap *
    *           into the current cell's coordinate system            *
    *                                                                *
    *****************************************************************/
    
    (procedure (abGetOverlapTransform overlap)
      (let (transform)
           (if (listp overlap)
               (setq transform (dbConcatTransform 
                                (abGetOverlapTransform (cadr overlap))
                                (or
                                  (dbGetq (car overlap) transform)
                                  (list (dbGetq (car overlap) origin)
                                        (dbGetq (car overlap) orient)
                                        1.0)
                                  )
                                ))
               (setq transform (list 0:0 "R0" 1.0)))
           transform
           )) 
    
     

     

    • Post Points: 20
  • Mon, Feb 25 2013 9:38 PM

    • jiangzhou
    • Not Ranked
    • Joined on Tue, Feb 26 2013
    • Posts 3
    • Points 75
    Re: How to get the lower level shapes in skill? Reply

    Thank you,Andrew .But if get shape from mosaic,error occurs.

    How to  deal with this problem?Thanks!!

    • Post Points: 35
  • Mon, Feb 25 2013 9:47 PM

    Re: How to get the lower level shapes in skill? Reply

    Rewrite the code to handle mosaics!

    I'm afraid I don't have time to do that now (in the code where I was using this I explicitly checked if the object was a mosaic and made no attempt to handle them - it's not that difficult though). I have a heavy schedule this week and so can only give quick answers on the forum.

    Sorry!

    Andrew.

    • Post Points: 20
  • Mon, Feb 25 2013 9:59 PM

    • jiangzhou
    • Not Ranked
    • Joined on Tue, Feb 26 2013
    • Posts 3
    • Points 75
    Re: How to get the lower level shapes in skill? Reply

    Thank you!

    If you have time,can you tell me the method to get the origin of every instance in mosaic?

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

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 96
    • Points 1,460
    Re: How to get the lower level shapes in skill? Reply

     dbGetTrueOverlaps has an optional argument to return the row and column of the mosaic instance of the found shape. Then multiply the rows by the Y pitch and the columns by the X pitch and use that when transforming the shapes.

    Create a simple cell with two rectangles. Then place it in several mosaics with different rotations. Test your algorithm using this simple cell then you can build it into Andrew's code.

    Ted

    • Post Points: 5
  • Wed, Feb 27 2013 10:43 PM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 246
    • Points 4,375
    Re: How to get the lower level shapes in skill? Reply

     What is mosaic ?

    What the special features in it ?

     

    • Post Points: 20
  • Wed, Feb 27 2013 11:20 PM

    Re: How to get the lower level shapes in skill? Reply
    An array. If when creating an instance you specify the number of rows and columns then it will be a mosaic, not a single instance. That complicates things a little!
    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by jiangzhou at 25 Feb 2013 05:53 PM. Topic has 7 replies.