How to transform the point of the 3 paths to top level when you arein edit-in-place ?

Discussion in 'Cadence' started by Charley, Jul 20, 2009.

  1. Charley

    Charley Guest

    Hi All,

    I have a cell with hierarchy e.g. A (cellview) -- B(cellview) -- C
    (cellview )
    There are 3 paths inside C (cellview) and I want do re-draw (By
    dbCopyFig or dbCreatePath) the same path on the top level.

    which rotation ,A is "R0" ã€B is "R0 " & C is "R90"

    How do write the code ?

    Thank you,
    Charley
     
    Charley, Jul 20, 2009
    #1
  2. Charley wrote, on 07/20/09 08:41:
    Charley,

    You'd need to build the overall transform by using dbConcatTransform() with each
    of the ~>transform attributes of the instances listed in geGetInstHierPath().

    In the example below I kept it simple by not worrying about mosaics (arrays).
    That makes it a bit more complicated, because you need to factor the position
    within the array into the transformation. But I'll leave that as an exercise for
    you if you're even using mosaics...

    ; this code makes absolutely no attempt to deal with mosaics...
    xform=list(0:0 "R0" 1)
    ; reverse the list to get the transform the right way around
    foreach(instPath reverse(geGetInstHierPath(hiGetCurrentWindow()))
    xform=dbConcatTransform(xform car(instPath)~>transform)
    )

    ; now copy selected shapes to the top cellView, with the right transformation
    topCv=geGetTopLevelCellView()
    newShapes=foreach(mapcar shape geGetSelSet()
    dbCopyFig(topCv shape xform)
    )

    Regards,

    Andrew.
     
    Andrew Beckett, Jul 20, 2009
    #2
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.