EDA365电子工程师网

标题: Change the cline or line to shape( Source Code) [打印本页]

作者: bavol    时间: 2012-10-11 13:58
标题: Change the cline or line to shape( Source Code)
本帖最后由 bavol 于 2012-10-12 22:29 编辑

功能:将CLINE或者LINE转变为相应层面的SHAPE,之前如果有NET属性,也会同时保留。

1. 下载附件后,解压放入PCBENV目录下,在allegro.ilinit文件中添加一句
load("cline2shape.il")     ;请注意是否为英文引号及空格。

2.重开ALLEGRO,执行Command>cline2shape命令调用。

3.直接选择要进行转换的CLINE或者LINE,支持使用TempGroup进行选择。
等级不够的,可以直接留下邮箱,统一发送
作者: bavol    时间: 2012-10-11 21:15
这帖子也沉的太快了,自己顶一个
作者: bavol    时间: 2012-10-12 22:31
bavol 发表于 2012-10-11 21:15
这帖子也沉的太快了,自己顶一个

就没人需要吗
作者: icebluexiong    时间: 2012-10-14 09:08
谢谢分享!!
作者: bluemare    时间: 2012-10-14 16:43
谢谢分享!!
作者: yang-2200    时间: 2012-10-17 10:09
yang.peggy@iac.com.tw
樓主我有需要
作者: bavol    时间: 2012-10-17 21:59
yang-2200 发表于 2012-10-17 10:09
樓主我有需要

请查收
作者: wolf343105    时间: 2012-10-18 08:56
wolf343105@126.com
作者: yang-2200    时间: 2012-10-18 09:33
感謝樓主.收到了
現在去試試..
作者: yang-2200    时间: 2012-10-18 09:49
樓主~~~~
剛試了,但是E- Command not found: cline2shape
可以請你把使用的方式用圖示嗎
作者: careyhung    时间: 2012-10-18 14:26
谢谢分享!~和c2s的skill相同?
作者: bavol    时间: 2012-10-18 23:25
careyhung 发表于 2012-10-18 14:26
谢谢分享!~和c2s的skill相同?

是的,这个命令可以自己改
作者: bavol    时间: 2012-10-18 23:26
本帖最后由 bavol 于 2012-10-18 23:28 编辑
yang-2200 发表于 2012-10-18 09:49
樓主~~~~
剛試了,但是E- Command not found: cline2shape
可以請你把使用的方式用圖示嗎


你告诉我,你的文件存放的位置,你先要确定 文件被正确载入了
作者: bavol    时间: 2012-10-18 23:26
wolf343105 发表于 2012-10-18 08:56

已发送,请查收
作者: SilverJohn    时间: 2012-10-19 01:01
Сongratulations.
作者: wolf343105    时间: 2012-10-19 08:52
bavol 发表于 2012-10-18 23:26
已发送,请查收

谢谢好人.好人一生平安.
作者: yang-2200    时间: 2012-10-19 13:22
D:\USER\skill\cline2shape.il  存放處
load("D:/USER/skill/cline2shape.il")設定處
作者: szhot    时间: 2012-10-19 21:21
好很好的
作者: longzhiming    时间: 2012-10-19 22:17
本论坛早就有这样的skill了
作者: bavol    时间: 2012-10-19 23:21
yang-2200 发表于 2012-10-19 13:22
D:\USER\skill\cline2shape.il  存放處
load("D:/USER/skill/cline2shape.il")設定處

已经给你发消息
作者: bavol    时间: 2012-10-19 23:28
SilverJohn 发表于 2012-10-19 01:01
Сongratulations.

Thanks for your feedback in previous mail, do you have any new skills can share with us?
作者: bavol    时间: 2012-10-19 23:50
longzhiming 发表于 2012-10-19 22:17
本论坛早就有这样的skill了

there are three more function.
first, it can handle shapes in muti-layers at sametime,
second, it keeps the net name,
third, it can chamfer the shape corner with 45 degree .
The most important, I supply the source code freely.
作者: longzhiming    时间: 2012-10-20 09:01
bavol 发表于 2012-10-19 23:50
there are three more function.
first, it can handle shapes in muti-layers at sametime,
second, i ...

sounds good! thank you for sharing.
作者: wolf343105    时间: 2012-10-20 11:42
LINE转变不了为相应层面的SHAPE.
作者: bavol    时间: 2012-10-20 17:54
wolf343105 发表于 2012-10-20 11:42
LINE转变不了为相应层面的SHAPE.

是的,不支持line,而且现在改变后的是静态shape, 我在想办法让他自动变成动态shape
作者: longzhiming    时间: 2012-10-20 21:45
本帖最后由 longzhiming 于 2012-10-20 21:53 编辑
bavol 发表于 2012-10-20 17:54
是的,不支持line,而且现在改变后的是静态shape, 我在想办法让他自动变成动态shape


要的就是静态,干嘛要改成动态啊{:soso_e100:} ,记得帮我留一份静态的,还有建议右菜单改成 Done 在最顶,Undo 在其次, 这是用allegro的操作习惯,,,,,谢谢,
作者: bavol    时间: 2012-10-20 22:09
longzhiming 发表于 2012-10-20 21:45
要的就是静态,干嘛要改成动态啊 ,记得帮我留一份静态的,还有建议右菜单改成 Done 在最 ...

嗯,OK。改过我会发上来的。或者你可以试试自己改,有问题咱们讨论。别外一个是,因为我现在用的全部是动态铜,静态铜太麻烦
作者: longzhiming    时间: 2012-10-21 09:41
本帖最后由 longzhiming 于 2012-10-21 09:45 编辑

third, it can chamfer the shape corner with 45 degree .
以前另人的SKILL就是静态的,也保持网络名,就是没做45度处理.有点不爽, 你的做45度处理,真的很给力,很好.{:soso_e142:}
作者: XYX365    时间: 2012-10-21 11:16
本帖最后由 XYX365 于 2012-10-21 11:23 编辑

我已修改成可以轉換Shape為動態或靜態Shape,也將the end cap type 改為可以變更,如下代碼
  1. procedure(LCB_cline_to_shape()
  2. let( ()
  3.         axlSetFindFilter(?enabled list("noall" "clines") ?onButtons list("noall" "clines"))
  4.         LCBpopup = axlUIPopupDefine( nil (list
  5.                     list("Done" 'LCB_Done)
  6.                     list("Undo" 'LCB_unDo)
  7.                     list("Cancel" 'LCB_Cancel)
  8.                     list("MENU_SEPARATOR" nil)
  9.                     list("Set Dynamic" "bDynamic = t")
  10.                     list("Set Statics" "bDynamic = nil")
  11.                     list("MENU_SEPARATOR" nil)
  12.                     list("EndCapType = OCTAGON" "sEndCapType = 'OCTAGON")
  13.                     list("EndCapType = ROUND" "sEndCapType = 'ROUND")
  14.                     list("EndCapType = SQUARE" "sEndCapType = 'SQUARE")
  15.             ))
  16.         axlUIPopupSet(LCBpopup)
  17.         LCBstartMark = axlDBTransactionStart()
  18.         notdone = t
  19.         bDynamic = t
  20.         sEndCapType = 'OCTAGON
  21.         while(notdone
  22.                 lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
  23.                 if(lclines then
  24.                      foreach(clinedbid lclines ;clinedbid = car(lclines)
  25.                         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26.                         net = clinedbid->net->name
  27.                         layer = clinedbid->layer
  28.                         axlUIWPrint(layer "** now layer is layer. **")
  29.                         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30.                         polydbid = axlPolyFromDB(clinedbid ?endCapType sEndCapType)
  31.                         if(polydbid then
  32.                             axlDeleteObject(clinedbid)
  33.                             if(bDynamic then
  34.                               tNewLayer = strcat("BOUNDARY/" cadr(parseString(layer "/")))
  35.                               unless(axlDBCreateShape(car(polydbid) t tNewLayer net)
  36.                                 axlUIWPrint(nil "** Error. Failed to create Shape from Cline. **")
  37.                              ); endif
  38.                         else
  39.                              unless(axlDBCreateShape(car(polydbid) t Layer net)
  40.                                  axlUIWPrint(nil "** Error. Failed to create Shape from Cline. **")
  41.                              ); endif
  42.                         )
  43.                         if(cadr(polydbid) then
  44.                             if(bDynamic then
  45.                                 tNewLayer = strcat("BOUNDARY/" cadr(parseString(layer "/")))
  46.                                 axlDBCreateShape(cadr(polydbid) t tNewLayer net)
  47.                         else
  48.                                 axlDBCreateShape(cadr(polydbid) t layer net)
  49.                         )
  50.                 )
  51.                else
  52.                 axlUIWPrint(nil "** Error. Failed to create Polydbid from Cline. **")
  53.         ); endif
  54.   ); end foreach cline
  55.   ); endif
  56. ); end while
  57. axlDBTransactionCommit(LCBstartMark)
  58. )); let and procedure
复制代码

作者: bavol    时间: 2012-10-21 11:29
XYX365 发表于 2012-10-21 11:16
我已修改成可以轉換Shape為動態或靜態Shape,也將the end cap type 改為可以變更,如下代碼

学习了,多谢XYX365{:soso_e179:}
作者: wolf343105    时间: 2012-10-21 20:41
LINE转变不了为相应层面的SHAPE.真没办法吗
作者: wolf343105    时间: 2012-10-21 20:42
LINE转变不了为相应层面的SHAPE.真没办法吗
作者: bavol    时间: 2012-10-21 22:41
wolf343105 发表于 2012-10-21 20:42
LINE转变不了为相应层面的SHAPE.真没办法吗

有办法,过两天帮你改吧。你为什么一定要转line 呢?
作者: wolf343105    时间: 2012-10-22 08:47
有需要.
作者: longzhiming    时间: 2012-10-22 21:03
bavol 发表于 2012-10-21 22:41
有办法,过两天帮你改吧。你为什么一定要转line 呢?

line可以方便画多种形状,而cline不行
作者: cao_7654321    时间: 2012-10-25 14:36
happytree@163.com
楼主能发给我一份吗?非常感谢!
作者: bavol    时间: 2012-10-25 22:37
cao_7654321 发表于 2012-10-25 14:36
楼主能发给我一份吗?非常感谢!

请查收
作者: deadknight    时间: 2012-10-26 15:41
496907988@qq.com
急需,多谢了!
作者: szhot    时间: 2012-10-26 20:10
planet.deng@163.com
作者: bavol    时间: 2012-10-26 23:41
deadknight 发表于 2012-10-26 15:41
急需,多谢了!

请查收
作者: szhot    时间: 2012-10-27 02:28
thank you !
作者: XYX365    时间: 2012-10-28 09:50
本帖最后由 XYX365 于 2012-10-28 09:51 编辑

新增Lines轉為静态shape
  1. procedure(LCB_cline_to_shape()
  2. let( ()
  3.         axlSetFindFilter(?enabled list("noall" "LINES" "clines") ?onButtons list("noall" "LINES" "clines"))
  4.         LCBpopup = axlUIPopupDefine( nil (list
  5.                     list("Done" 'LCB_Done)
  6.                     list("Undo" 'LCB_unDo)
  7.                     list("Cancel" 'LCB_Cancel)
  8.                     list("MENU_SEPARATOR" nil)
  9.                     list("Set Dynamic" "bDynamic = t")
  10.                     list("Set Statics" "bDynamic = nil")
  11.                     list("MENU_SEPARATOR" nil)
  12.                     list("EndCapType = OCTAGON" "sEndCapType = 'OCTAGON")
  13.                     list("EndCapType = ROUND" "sEndCapType = 'ROUND")
  14.                     list("EndCapType = SQUARE" "sEndCapType = 'SQUARE")
  15.             ))
  16.         axlUIPopupSet(LCBpopup)
  17.         LCBstartMark = axlDBTransactionStart()
  18.         notdone = t
  19.         bDynamic = t
  20.         sEndCapType = 'OCTAGON
  21.         while(notdone
  22.                 lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
  23.                 if(lclines then
  24.                      foreach(clinedbid lclines ;clinedbid = car(lclines)
  25.                         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  26.                         net = clinedbid->net->name
  27.                         layer = clinedbid->layer
  28.                         ;******************
  29.                        unless(clinedbid->isEtch
  30.                                  bDynamic = nil
  31.                         )
  32.                         axlUIWPrint(layer "** now layer is layer. **")
  33.                         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  34.                         polydbid = axlPolyFromDB(clinedbid ?endCapType sEndCapType)
  35.                         if(polydbid then
  36.                             axlDeleteObject(clinedbid)
  37.                             if(bDynamic then
  38.                               tNewLayer = strcat("BOUNDARY/" cadr(parseString(layer "/")))
  39.                               unless(axlDBCreateShape(car(polydbid) t tNewLayer net)
  40.                                 axlUIWPrint(nil "** Error. Failed to create Shape from Cline. **")
  41.                              ); endif
  42.                         else
  43.                              unless(axlDBCreateShape(car(polydbid) t Layer net)
  44.                                  axlUIWPrint(nil "** Error. Failed to create Shape from Cline. **")
  45.                              ); endif
  46.                         )
  47.                         if(cadr(polydbid) then
  48.                             if(bDynamic then
  49.                                 tNewLayer = strcat("BOUNDARY/" cadr(parseString(layer "/")))
  50.                                 axlDBCreateShape(cadr(polydbid) t tNewLayer net)
  51.                         else
  52.                                 axlDBCreateShape(cadr(polydbid) t layer net)
  53.                         )
  54.                 )
  55.                else
  56.                 axlUIWPrint(nil "** Error. Failed to create Polydbid from Cline. **")
  57.         ); endif
  58.   ); end foreach cline
  59.   ); endif
  60. ); end while
  61. axlDBTransactionCommit(LCBstartMark)
  62. )); let and procedure
复制代码

作者: yucai888    时间: 2012-10-29 09:07
看看,顶顶
作者: mingx    时间: 2012-10-30 10:37
谢谢分享!!
作者: glater    时间: 2012-11-2 15:12
这个还是个不错的skill,支持一下!
作者: mingx    时间: 2012-12-5 17:17
谢谢啦!
作者: icebluexiong    时间: 2012-12-5 21:47
谢谢分享
作者: szhot    时间: 2013-2-22 00:36
顶!就喜欢开源的
作者: CheneyChe    时间: 2013-3-25 20:59
帮我发个,谢谢! 2410168849@qq.com
作者: bavol    时间: 2013-3-25 23:05
CheneyChe 发表于 2013-3-25 20:59
帮我发个,谢谢!

看29楼
作者: szhot    时间: 2013-4-25 03:13
:):):):)
作者: liuanty    时间: 2013-8-23 08:12
楼主我现在还需要这个,你还能不能发呀?liuanty@yeah.net
作者: lichunhui    时间: 2013-10-16 14:47
我需要,邮箱是lichunhui@neusoft.com 麻烦在把使用方法写的详细些,我是新手,不太会用啊
最好再有个能够让pin与pin对齐的,就更完美了
作者: mingx    时间: 2014-3-5 10:12
感謝樓主.收到了
現在去試試..
作者: eda366_murphy    时间: 2014-3-23 09:18
需要更详细功能的
作者: 1784997175    时间: 2014-6-17 18:33
请问楼主现在还能要吗?邮箱是1784997175@qq.com 谢谢
作者: yingjuan    时间: 2014-6-25 22:01
非常感谢。我用得是16.2,可以调用。
作者: jjmhere    时间: 2014-9-19 09:09
这个niu,谢谢楼主
作者: vivienluo    时间: 2014-9-27 16:07

作者: vivienluo    时间: 2014-9-27 16:08

作者: jerry2118    时间: 2014-10-11 18:51
我也正想找这样的的Skill,手机板单点接地很多,不好处理用能否把你改过的发给小弟一份?314860351@qq.com
作者: bavol    时间: 2014-10-14 19:37
jerry2118 发表于 2014-10-11 18:51
我也正想找这样的的Skill,手机板单点接地很多,不好处理用能否把你改过的发给小弟一份?

帖子中间楼层有源代码,自己copy

作者: zz13512    时间: 2014-10-24 00:41
13512010332@126.com,多谢多谢
作者: sis    时间: 2014-11-6 11:03
尼斯....
作者: 狂想的旅程    时间: 2014-11-13 19:55
关注
作者: akl1111    时间: 2014-12-8 10:00
好看看
作者: akl1111    时间: 2014-12-8 10:31
2725629522@qq.com
作者: zhanghui_198269    时间: 2015-7-22 22:28
ddddd
作者: 祭司    时间: 2015-7-23 09:56
支持一下,source谢谢分享~~
作者: Crystal2012    时间: 2015-7-23 10:11
谢谢分享!!
作者: tim207    时间: 2015-7-23 15:07
这些功能都很好
作者: wang66jin    时间: 2015-9-11 13:23
XYX365 发表于 2012-10-28 09:50
新增Lines轉為静态shape

unless(axlDBCreateShape(car(polydbid) t Layer net)  这句中Layer要小写哦 layer
作者: destiny_fz    时间: 2015-9-11 14:26
贴出来的那个代码调用不了,开头加axlCmdRegister("cline_to_shape" `LCB_cline_to_shape)调用。可以把线转为shape,但执行done ,cancel 等命令均说没有定义,但我看程序开头已经定义了的,不知道为什么不起作用。
作者: chfanjiang    时间: 2016-1-17 21:25
allegro.ilinit 請問這個 file 在那裡啊? 我找不到啊
作者: J蓝虹    时间: 2016-1-18 12:37
bavol 发表于 2012-10-12 22:31
就没人需要吗

刚好碰到了这样的case,马上down下来救急,谢谢

作者: 大个小眼    时间: 2016-1-21 17:59
本帖最后由 大个小眼 于 2016-1-21 18:05 编辑
XYX365 发表于 2012-10-28 09:50
新增Lines轉為静态shape



作者: 蓝色的天口    时间: 2016-1-22 09:10
1197451336@qq.com lz给一个给我撒
作者: whl0760    时间: 2016-4-11 10:27
真是好工具,是做阻抗匹配的神器。
作者: cpf09    时间: 2016-4-12 08:54
715015350@qq.com       楼主我 也想要这个skill
作者: binjuaner    时间: 2016-4-14 16:18
能发人一下吗?ljzhou_007@163.com,谢谢
作者: xuchenxiao123    时间: 2016-4-19 10:57
807309334@qq.com
作者: kk8770560    时间: 2016-4-19 21:46
谢谢!楼主辛苦了顶顶顶
作者: mentorkk    时间: 2016-11-15 04:37
感謝樓主.收到了
作者: jordanli22    时间: 2017-6-1 21:20
812620232@qq.com
作者: 渐行渐远渐无书    时间: 2017-6-5 16:22
好东西啊 ,还看不了。。
作者: bruce777    时间: 2017-6-5 16:53
bruceliao1124@gmail.com  楼主我 也想要这个skill , 能发一下吗?谢谢!
作者: Ling    时间: 2017-10-20 10:34
您好,急需这个Skill,可以的话再麻烦您发给我,邮箱如下:kim951228@gmail.com,非常感谢您!
作者: 九月    时间: 2017-10-24 10:23
谢谢分享

作者: greg2015    时间: 2018-1-27 11:59
251771893@qq.com
作者: yoyo1204    时间: 2018-1-30 17:03
需要
作者: yoyo1204    时间: 2018-1-30 17:04
1490237590@qq.com 谢谢楼主啦
作者: digitzing    时间: 2018-2-2 11:31
这帖子也沉的太快了,我顶一个



作者: Archeus_NvL0Z    时间: 2018-3-12 17:33
bavol 发表于 2012-10-11 21:15
这帖子也沉的太快了,自己顶一个

1224905649@qq.com    谢谢楼主!

作者: Archeus_NvL0Z    时间: 2018-3-12 17:33
bavol 发表于 2012-10-11 21:15
这帖子也沉的太快了,自己顶一个

1224905649@qq.com    谢谢楼主!

作者: chengcheng123    时间: 2018-3-15 18:53
感谢楼主,一个个发邮件好有心。可以分享到百度网盘的哦





欢迎光临 EDA365电子工程师网 (https://bbs.elecnest.cn/) Powered by Discuz! X3.2