選択オブジェクトの座標値の操作
(foreach o (geGetSelectedSet) ; (dbGetq o points) は、o が path, pathSeg, polygon の場合に定義され、その頂点の座標値である。 ; (dbGetq o bBox) は、図形 o に内接する長方形の頂点の座標値である。 (foreach point (or (dbGetq o points) (dbGetq o bBox)) (printf "(%f, %f)\n" (xCoord point) (yCoord point)) ; X座標値、Y座標値 ) ) ; ちなみに、 ; (upperRight (dbGetq o bBox)) ; (lowerLeft (dbGetq o bBox)) ; でbBoxの2隅の頂点データを取り出せる
(dbGetq o objType) で得られる値には、"path", "pathSeg", "ellipse", "polygon", "rect", "marker", "line", "inst", "mosaic", "stdVia", "net" などがある
※オブジェクトの各プロパティの名前はskdfref.pdfのP.626からを参照
座標値の変形
(dbTransformPoint (dbGetq o xy) (list 0:10 "R90" 2.5)) → XY座標値を(0,10)だけ平行移動させ、90度回転させ、2.5倍に拡大する
(dbTransformBBox (dbGetq o bBox) (list 0:10 "R90" 2.5)) → bBoxの各座標値のXYを (0.0, 10.0) だけ平行移動させ、90度回転させ、2.5倍に拡大する
(dbConcatTransform (list 0.0:10.0 "R90" 2.5) (list 5.0:2.0 "MY" 3.7)) → 変換リスト同士を合成する
ピンの作成
[方法1] rect または polygon オブジェクトのピンを作成する
(leCreatePin cellView ; セルビュー '("AL1" "pin") ; レイヤー "rectangle" ; 形状 12.5:86.4 ; 座標値 "VSS" ; ネット名 "input" ; 入出力方向 '("top" "bottom" "left" "right") ; アクセス方向 )
→ この方法はPセル内部でのピン作成には使用できない。
Pセル内部にピンを作成するには下記の[方法2]を使う。
[方法2] 任意のオブジェクトをPinにする方法
※ただし、グラビティが有効になるのは rect オブジェクトのみ
(setq aVSSPin (dbCreatePin (dbCreateNet cellView "VSS") (dbCreatePath cellView '("AL1" "drawing") ; レイヤー '(0:0 12:0 12:5 15:5 15:0 20:0) ; 頂点座標値 1.5 ; 幅 ) ) ) (dbSetq (dbGetq aVSSPin pin) (list "top" "left" "bottom" "right") accessDir)
ネットとオブジェクトを作成してからdbCreatePinでピンを作成し、その後、~>pin~>accessDirの値を設定する。
d_libId, d_cellId, d_instIdの取り方
(setq library "CommonCells") (setq cell "NAND3" ) (setq view "schematic" ) (setq instance "I3" )
; d_libId (setq libId (ddGetObj library))
; d_cellId (setq cellId (ddGetObj library cell))
; d_instId (setq instId (dbFindAnyInstByName (dbOpenCellViewByType library cell view) instance))