abby118的个人空间 https://blog.eetop.cn/?1555282 [收藏] [复制] [分享] [RSS]

日志

auto_slot.il

已有 69 次阅读| 2025-8-14 09:19 |个人分类:学习skill|系统分类:芯片设计

eetop上看到别人分享的脚本,做了修改。备份。

procedure(auto_slot( @optional (slot_space 2) (slot_size 1))

 let(()

    cv=geGetEditCellView()

    obj=geGetSelSet()

    list2=list()

    list3=list()

    slot_step=slot_size+slot_space

    eoffset=0.5

    if(obj != nil then

      layer_name=car(obj~>layerName)

       a=caar(obj~>bBox)

       b=cadar(obj~>bBox)

       x=car(b)-car(a)

       y=cadr(b)-cadr(a)

       countx=fix((x-slot_size-eoffset)/slot_step)+1

       county=fix((y-slot_size-eoffset)/slot_step)+1

       xoffset=(x+slot_space-slot_step*countx)/2

       yoffset=(y+slot_space-slot_step*county)/2

       for(n 0 county-1

        y0=cadr(a)+yoffset+slot_step*n 

        if(oddp(n) != nil then

         xa = (slot_space+slot_size)/2

        else 

           xa = 0

         )

        for(i 0 countx-1

        x0=car(a)+xoffset+xa+slot_step*i     

        text1=dbCreateRect(cv list("TTXT" "drawing") list(x0:y0 (x0+slot_size):(y0+slot_size)))        

        list1=list(text1)

        list2=append(list1 list2)

        i=1+1

        )

        list3=append(list2 list3)

        n=n+1

        )

        shape1=dbLayerAnd(cv list("TTXT" "drawing") geGetSelSet() list3) 

        shape2=dbLayerAndNot(cv layer_name  geGetSelSet() shape1)

        geDeleteSelSet() 

        leMergeShapes(shape2)

        foreach(shapea shape1

              dbDeleteObject(shapea)

           ) 

        foreach(lista list3

              dbDeleteObject(lista)

         )

       

        else

         print("please select the metal to be sloteed")

        )))



点赞

全部作者的其他最新日志

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 2

    周排名
  • 0

    月排名
  • 0

    总排名
  • 1

    关注
  • 1

    粉丝
  • 5

    好友
  • 5

    获赞
  • 5

    评论
  • 304

    访问数
关闭

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


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

GMT+8, 2025-8-21 06:40 , Processed in 0.010405 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部