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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
楼主: lynn_au

[求助] 求十字交叉金属线去线头自动打孔的脚本!拜谢!

[复制链接]
发表于 2019-11-7 07:56:55 | 显示全部楼层
楼上的脚本应该是cut metal的,没有打via的吧。
发表于 2019-11-7 16:28:06 | 显示全部楼层


chinarml 发表于 2019-11-7 07:56
楼上的脚本应该是cut metal的,没有打via的吧。


可以设置Auto自动打孔,脚本也是借鉴的,不是自己写的
发表于 2019-11-22 09:23:01 | 显示全部楼层


长安归故里 发表于 2019-11-5 16:54
hiSetBindKey("Layout" "G" "xiubian()")

procedure(xiubian()


还有别的脚本可以分享一下么?谢谢啦。
发表于 2019-11-22 14:59:47 | 显示全部楼层
难道不用判断链接关系吗?我是比较好奇,并不是所有overlap的地方都打孔把。你是怎么判断呢
发表于 2019-12-20 15:35:13 | 显示全部楼层
hiSetBindKey("Layout" "<Key>F10" "ccc()")

procedure(ccc()
        object_List=geGetSelSet()
        objectA=car(object_List)
        pointsA=objectA~>points
        widthA=objectA~>width
        objectB=cadr(object_List)
        pointsB=objectB~>points
        widthB=objectB~>width
       
        if(car(car(pointsA))==car(cadr(pointsA))
        then
                pointsShu=pointsA
                widthShu=widthA
                object_Shu=objectA
                pointsHeng=pointsB
                widthHeng=widthB
                object_Heng=objectB       
                CutMetal()
        else
                pointsShu=pointsB
                widthShu=widthB
                object_Shu=objectB
                pointsHeng=pointsA
                widthHeng=widthA
                object_Heng=objectA
                CutMetal()
        )

)

procedure(CutMetal()
        y1Shu=cadr(car(pointsShu))
        y2Shu=cadr(cadr(pointsShu))
        yMaxShu=max(y1Shu y2Shu)
        yMinShu=min(y1Shu y2Shu)
        x1Heng=car(car(pointsHeng))
        x2Heng=car(cadr(pointsHeng))
        xMaxHeng=max(x1Heng x2Heng)
        xMinHeng=min(x1Heng x2Heng)
        xShu=car(car(pointsShu))
        yHeng=cadr(car(pointsHeng))
       
        when((xMaxHeng-xShu)<(xShu-xMinHeng)&&x1Heng<x2Heng
                xHeng_new=xShu+widthShu/2
                object_Heng~>points=list(car(pointsHeng) rplaca(cadr(pointsHeng) xHeng_new))
        )
        when((xMaxHeng-xShu)<(xShu-xMinHeng)&&x1Heng>x2Heng
                xHeng_new=xShu+widthShu/2
                object_Heng~>points=list(rplaca(car(pointsHeng) xHeng_new) cadr(pointsHeng))
        )       

        when((xMaxHeng-xShu)>(xShu-xMinHeng)&&x1Heng<x2Heng
                xHeng_new=xShu-widthShu/2
                object_Heng~>points=list(rplaca(car(pointsHeng) xHeng_new) cadr(pointsHeng))
        )
        when((xMaxHeng-xShu)>(xShu-xMinHeng)&&x1Heng>x2Heng
                xHeng_new=xShu-widthShu/2
                object_Heng~>points=list(car(pointsHeng) rplaca(cadr(pointsHeng) xHeng_new))
        )       


        when((yMaxShu-yHeng)>(yHeng-yMinShu)&&y1Shu<y2Shu
                yShu_new=yHeng-widthHeng/2
                remove_cell=cadr(car(pointsShu))
                object_Shu~>points=list(remove(remove_cell append1(car(pointsShu) yShu_new)) cadr(pointsShu))
        )
        when((yMaxShu-yHeng)>(yHeng-yMinShu)&&y1Shu>y2Shu
                yShu_new=yHeng-widthHeng/2
                remove_cell=cadr(cadr(pointsShu))
                object_Shu~>points=list(car(pointsShu) remove(remove_cell append1(cadr(pointsShu) yShu_new)))
        )
       
        when((yMaxShu-yHeng)<(yHeng-yMinShu)&&y1Shu<y2Shu
                yShu_new=yHeng+widthHeng/2
                remove_cell=cadr(cadr(pointsShu))
                object_Shu~>points=list(car(pointsShu) remove(remove_cell append1(cadr(pointsShu) yShu_new)))
        )
        when((yMaxShu-yHeng)<(yHeng-yMinShu)&&y1Shu>y2Shu
                yShu_new=yHeng+widthHeng/2
                remove_cell=cadr(car(pointsShu))
                object_Shu~>points=list(remove(remove_cell append1(car(pointsShu) yShu_new)) cadr(pointsShu))
        )
               
hiDisplayForm(CreatContactGUIForm)

)

M1M2ContactTypeGUI=hiCreateStringField(

?name   'M1M2ContactTypeGUI
?prompt "M1_M2 Contact Type"
?defValue "M2_M1" ;contact cype must be same as PDK name
?callback  "hiGetCurrentForm()"
?editable  t

)

M2M3ContactTypeGUI=hiCreateStringField(

?name   'M2M3ContactTypeGUI
?prompt "M2_M3 Contact Type"
?defValue "M3_M2" ;contact type must be same as PDK name
?callback  "hiGetCurrentForm()"
?editable  t

)

WidthViaGUI=hiCreateFloatField(

?name 'WidthViaGUI
?prompt "Width of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t

)

LengthViaGUI=hiCreateFloatField(

?name 'LengthViaGUI
?prompt "Length of Via"
?defValue 0.1 ;default
?callback "hiGetCurrentForm()"
?editable t

)

XViaSpaceGUI=hiCreateFloatField(  

?name 'XViaSpaceGUI
?prompt "X Via Spacing"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t

)

YViaSpaceGUI=hiCreateFloatField(  

?name 'YViaSpaceGUI
?prompt "Y Via Spacing"
?defValue 0.13 ;default
?callback "hiGetCurrentForm()"
?editable t

)

ViaEnclosureGUI=hiCreateFloatField(  

?name 'ViaEnclosureGUI
?prompt "Via Enclosure"
?defValue 0.03 ;default
?callback "hiGetCurrentForm()"
?editable t

)


CreatContactGUIForm=hiCreateAppForm(

?name 'CreatContactGUIForm
?formTitle "Creat Contact"
?callback "CreatContact(
                       M1M2ContactTypeGUI->value
                       M2M3ContactTypeGUI->value
                       WidthViaGUI->value
                       LengthViaGUI->value
                       XViaSpaceGUI->value
                       YViaSpaceGUI->value
                       ViaEnclosureGUI->value  
                       )"

?fields list(
            M1M2ContactTypeGUI
            M2M3ContactTypeGUI
            WidthViaGUI
            LengthViaGUI
            XViaSpaceGUI  
            YViaSpaceGUI
            ViaEnclosureGUI
            )
?help ""
)

procedure(CreatContact(
                      M1M2ContactType
                      M2M3ContactType
                      WidthVia
                      LengthVia
                      XViaSpace
                      YViaSpace
                      ViaEnclosureGUI
                      )

x=xShu
y=yHeng
XDelta=LengthVia+XViaSpace
YDelta=WidthVia+YViaSpace
XData=(widthShu-ViaEnclosureGUI*2+XViaSpace)/XDelta
YData=(widthHeng-ViaEnclosureGUI*2+YViaSpace)/YDelta
rows=max(floor(YData) 1)
cols=max(floor(XData) 1)

if((objectA~>purpose=="drawing"&&objectB~>purpose=="drawing")!=t
then
JWMessage("Error!!!" 'Close "Incorrect Layer,Create Contact Failed!")
)

/*
if((widthA>=0.16&&widthB>=0.16)!=t
then
JWMessage("Warning!!!" 'Close "The metal width is too small")
)
*/

if(objectA~>layerName=="M1"&&objectB~>layerName=="M2"
then
leCreateContact(geGetEditRep() M1M2ContactType x:y "R0" WidthVia LengthVia rows cols XDelta YDelta "center" "center")
)

if(objectA~>layerName=="M2"&&objectB~>layerName=="M1"
then
leCreateContact(geGetEditRep() M1M2ContactType x:y "R0" WidthVia LengthVia rows cols XDelta YDelta "center" "center")
)

if(objectA~>layerName=="M3"&&objectB~>layerName=="M2"
then
leCreateContact(geGetEditRep() M2M3ContactType x:y "R0" WidthVia LengthVia rows cols XDelta YDelta "center" "center")
)

if(objectA~>layerName=="M2"&&objectB~>layerName=="M3"
then
leCreateContact(geGetEditRep() M2M3ContactType x:y "R0" WidthVia LengthVia rows cols XDelta YDelta "center" "center")
)

)                                               
发表于 2019-12-23 18:18:53 | 显示全部楼层


yinjuntongtong 发表于 2019-12-20 15:35
hiSetBindKey("Layout" "F10" "ccc()")

procedure(ccc()


大神,为什么我测试过还是只有切线的功能,里面的数据要根据自己的工艺设置是吧,设置过也还是没有打孔功能,求指教
微信图片_20191223182122.png
发表于 2019-12-24 15:07:10 | 显示全部楼层


长安归故里 发表于 2019-12-23 18:18
大神,为什么我测试过还是只有切线的功能,里面的数据要根据自己的工艺设置是吧,设置过也还是没有打孔功 ...


无标题.png
我用的是51的virtuoso,你用的是61以上版本吧,可能是内部函数不一样导致脚本失败,你可能要自己研究一下啰。
发表于 2021-8-6 20:29:38 | 显示全部楼层
ganxiefenxiang
发表于 2021-8-9 14:07:04 | 显示全部楼层


长安归故里 发表于 2019-12-23 18:18
大神,为什么我测试过还是只有切线的功能,里面的数据要根据自己的工艺设置是吧,设置过也还是没有打孔功 ...


你好   这个图片的界面是怎么打开的   为什么  我的工具栏里没找到啊
发表于 2021-8-24 21:01:51 | 显示全部楼层
http://bbs.eetop.cn/thread-898112-2-7.html---消失的7楼---聊天专用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-5-7 15:20 , Processed in 0.028671 second(s), 6 queries , Gzip On, Redis On.

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