How to transform the point of the 3 paths to top level when

C

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 wrote, on 07/20/09 08:41:
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,

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.
 

Welcome to EDABoard.com

Sponsor

Back
Top