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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
123
返回列表 发新帖
楼主: 谷雨渔

[求助] 这种走线应该怎么画

[复制链接]
发表于 2024-5-17 11:19:29 | 显示全部楼层
创建这个线的脚本需求多嘛,想写个试试
发表于 2024-5-20 12:24:24 | 显示全部楼层


寻雨 发表于 2024-5-14 11:16
选中矩形的shape,设置快捷键hiSetBindKey("Layout" "1" "RectChopToLadder(5 1)"),使用快捷键1或者在CIW ...


更新一下,修复不在格点的问题


hiSetBindKey("Layout" "<Key>1" "RectChopToLadder(10 5)")
procedure(RectChopToLadder(stepW stepH)
let((shapes shapeH shapeW steps MinLadderWidth firstPoint chopPoints P1 P2 lastPoint)
shapes=geGetSelectedSet()
foreach(shape shapes
        if(shape!=nil&&shape~>objType=="rect" then
        shapeH=yCoord(cadr(shape~>bBox))-yCoord(car(shape~>bBox))
        shapeW=xCoord(cadr(shape~>bBox))-xCoord(car(shape~>bBox))
        steps=round2((shapeW-stepW)/(stepW+stepH))+1
        mfgGrid=techGetMfgGridResolution(techGetTechFile(shap~>cellView))
        MinLadderWidth=round2(((shapeH-stepH*(steps-1))/2)/mfgGrid)*mfgGrid
        firstPoint=list(xCoord(car(shape~>bBox)) yCoord(car(shape~>bBox))+MinLadderWidth)
        chopPoints=nil
        chopPoints=append1(chopPoints firstPoint)
        for(n 1 steps-1
                P1=list(xCoord(firstPoint)+stepW yCoord(firstPoint))
                chopPoints=append1(chopPoints P1)
                P2=list(xCoord(firstPoint)+stepW+stepH yCoord(firstPoint)+stepH)
                chopPoints=append1(chopPoints P2)
                firstPoint=P2
                 );end for
        lastPoint=list(xCoord(cadr(shape~>bBox)) yCoord(P2))
        chopPoints=append1(chopPoints lastPoint)
        );end if
        leChopShape(shape chopPoints nil nil 10)
        );end foreach
);end let
);end procedure


发表于 2024-5-21 17:43:24 | 显示全部楼层


寻雨 发表于 2024-5-14 11:16
选中矩形的shape,设置快捷键hiSetBindKey("Layout" "1" "RectChopToLadder(5 1)"),使用快捷键1或者在CIW ...


帅哥,借用了你的代码进行了一点点修改,另发了个帖子,感谢




两个造滑梯的skill脚本
https://bbs.eetop.cn/thread-969772-1-1.html
(出处: EETOP 创芯网论坛 (原名:电子顶级开发网))



您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-6-16 12:00 , Processed in 0.022435 second(s), 6 queries , Gzip On, Redis On.

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