在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4904|回复: 7

在做邦定图时,怎样得到版图中的PIN角的坐标,尤其是数字区与模拟区是用PIN连的时候。

[复制链接]
发表于 2014-8-28 15:00:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 wangyan2059 于 2014-8-28 18:05 编辑

(hiSetBindKey "layout" "<Key>F10" "textViewCoord()")

(procedure (textViewCoord)
(prog (cw cv selobjects selobj  LabelName points)
(setq cw (hiGetCurrentWindow))
(setq cv (geGetEditCellView))
(setq selobjects (geGetSelSet cv))
(setq myPort  (outfile "/home/wangy/TEST_PROC/TxetCoordinate.txt"))
(fprintf myPort "pinName     x            y\n" )
(foreach selobj selobjects
(setq points0 selobj->objType)
(if (equal selobj->objType "label")  then
(setq LabelName selobj->theLabel)
(setq points selobj->xy)
(setq xCoordx (xCoord points))
(setq yCoordy (yCoord points))
(fprintf myPort "%5s    %f    %f\n" LabelName xCoordx yCoordy)
);endif
);foreach
(close myPort)
);prog
);proce
TEST—COORD.JPG
这是得到的效果图,全选中所有元素,只得到PIN的坐标。
TEST——cood1.JPG
这是在LINUX中的文件COPY到记事本中,再到EXCEL中打开就得了想要的结果
 楼主| 发表于 2014-8-28 18:12:14 | 显示全部楼层
回复 1# wangyan2059

秀秀小东西解决大问题的SKILL。谁能再改成一个PIN打歪了修正到NET或PAD中心后,再输出来坐标的SKILL,呵呵。
 楼主| 发表于 2014-9-25 18:09:20 | 显示全部楼层
本帖最后由 wangyan2059 于 2014-9-25 18:14 编辑

(hiSetBindKey "Layout" "<Key>F10" "textViewCoord()")

(procedure (textViewCoord)

(prog (cw cv selobjects selobj  rang  width  number LabelName points x1 y1 x2 y2 offsetX offsetY)
(setq rang 2)

(setq cw (hiGetCurrentWindow))

(setq cv (geGetEditCellView))

(setq selobjects (geGetSelSet cv))
(setq myPort  (outfile "/home/wangy/TEST_PROC/TxetCoordinate.txt"))
(fprintf myPort "pinName     x            y\n" )
(foreach selobj selobjects
(if (nequal selobj->objType "label")  then
(geDeselectFig selobj))
);foreach

(foreach selobjL selobjects

(if (equal selobjL->objType "label")  then
(setq LabelName selobjL->theLabel)
(setq layerLabel selobjL~>layerName)
(setq points selobjL~>xy)
(setq xCoordx (xCoord points))
(setq yCoordy (yCoord points))
(setq objects (gePointToFig (hiGetCurrentWindow) nil points))
(if (and (equal objects~>layerName layerLabel) (equal objects~>objType "path")) then

    (setq points  objects~>path)

    (setq width (quotient objects~>width 2))

    (setq number (difference objects~>nPoints 2))

(for number 0 number

(if (or (lessp (abs (difference yCoordy (yCoord (nth number points)))) width) (lessp (abs (difference xCoordx (xCoord (nth number points)))) width)) then

(setq x1 (abs (difference (xCoord (nth number+1 points)) (xCoord (nth number points))) ) )

(setq y1 (abs (difference (yCoord (nth number+1 points)) (yCoord (nth number points))) ) )

(if (greaterp x1 0.0001) then

(setq offsetY (difference (yCoord (nth number points)) yCoordy) )

else

(setq offsetY 0))

(if (greaterp y1 0.0001) then

(setq offsetX (difference (xCoord (nth number points)) xCoordx) )

else

(setq offsetX 0))

);endif


(postincrement number));endfor

);endif

(if (and (equal objects~>layerName layerLabel) (equal objects~>objType "rect")) then


(setq Box objects~>bBox)

(setq x2 (plus (abs (quotient (difference (xCoord (lowerLeft Box)) (xCoord (upperRight Box))) 2)) (xCoord (lowerLeft Box))) )


(setq y2 (plus (abs (quotient (difference (yCoord (lowerLeft Box)) (yCoord (upperRight Box))) 2)) (yCoord (lowerLeft Box))) )

(if (lessp (abs (difference xCoordx x2)) rang) then

(setq offsetX (difference x2 xCoordx)))


(if (lessp (abs (difference yCoordy y2)) rang) then

(setq offsetY (difference y2 yCoordy)))

);endif

(setq movePare (list (offsetXffsetY) "R0"))

(dbMoveFig selobjL, nil, movePare)
(setq points selobjL~>xy)
(setq xCoordx (xCoord points))
(setq yCoordy (yCoord points))
(fprintf myPort "%5s    %.3f    %.3f\n" LabelName xCoordx yCoordy)
);endif
);foreach
(close myPort)

);prog

);proce

注意情况.zip

474 Bytes, 下载次数: 30 , 下载积分: 资产 -2 信元, 下载支出 2 信元

 楼主| 发表于 2014-9-25 18:20:26 | 显示全部楼层
本帖最后由 wangyan2059 于 2014-9-26 09:41 编辑

回复 3# wangyan2059

上面的是已改成一个PIN打歪了修正到NET或PAD中心后,再输出的SKILL。谁把这个修改成也能输出层次化单元的PAD中心坐标啊?
发表于 2014-9-26 14:42:30 | 显示全部楼层
嗯,能说说这个具体使用的场合吗?

回复 4# wangyan2059
发表于 2015-12-30 13:48:37 | 显示全部楼层
来学习下
发表于 2017-5-10 19:07:44 | 显示全部楼层
同学习下
发表于 2019-10-28 10:39:25 | 显示全部楼层
谢谢!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-3 00:35 , Processed in 0.033224 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表