x y coordinates

S

sajin

Guest
Hi all
I have a doubt in getting the x y coordinates of
instances down the heirarchy in a layout view. I have to find out the
x y coordinates w.r.t the top level, of some 100 instances
instantiated in it. Is there an easy way to find out this, with all
the orientations and all are taken care.

Thanking all in advance
Sajin
 
Hi all
I have a doubt in getting the x y coordinates of
instances down the heirarchy in a layout view. I have to find out the
x y coordinates w.r.t the top level, of some 100 instances
instantiated in it. Is there an easy way to find out this, with all
the orientations and all are taken care.
If you have the instIds for the different levels of the hierarchy, then pass this list to
geGetInstTransform (or recursively apply dbConcatTransform) to get the resulting overall transform.


Then, use dbTranformPoint to get the transformed xy coordinate.


i.e: if there's an instance hierarchy inst1->inst2->inst3->inst4, then the coordinates of inst4 with
respect to inst1 are given by

dbTransformPoint( inst4~>xy geGetInstTransform(list(inst1 inst2 inst3)) )

Stéphane
 
On Jun 11, 4:54 am, "S. Badel" <stephane.ba...@REMOVETHISepfl.ch>
wrote:
Hi all
I have a doubt in getting the x y coordinates of
instances down the heirarchy in a layout view. I have to find out the
x y coordinates w.r.t the top level, of some 100 instances
instantiated in it. Is there an easy way to find out this, with all
the orientations and all are taken care.

If you have the instIds for the different levels of the hierarchy, then pass this list to
geGetInstTransform (or recursively apply dbConcatTransform) to get the resulting overall transform.

Then, use dbTranformPoint to get the transformed xy coordinate.

i.e: if there's an instance hierarchy inst1->inst2->inst3->inst4, then the coordinates of inst4 with
respect to inst1 are given by

dbTransformPoint( inst4~>xy geGetInstTransform(list(inst1 inst2 inst3)) )

Stéphane
Try This, I hacked it up from something else I had.

;***************************************************************************
; Scan the layout hierarchy for instances
; and list it's placement origin in the current coordinate system
; Warning: uses recursion
;***************************************************************************

procedure( GetInstOrigin( @key
(cv (geGetEditCellView))
(transform list(0:0 "R0" 1))
cellname)

let( (origin)
printf( "cell:%s transform is :%L\n" cv~>cellName transform)
;--------------------------------------------------------
; Decend the hierarchy updating the transform
;--------------------------------------------------------
foreach( inst cv~>instances
if( inst~>objType == "inst" then
newTransform = dbConcatTransform( inst~>transform
transform)
GetInstOrigin(
?cellname cellname
?cv (inst~>master)
?transform newTransform
)
)
)
t
)
)
 

Welcome to EDABoard.com

Sponsor

Back
Top