EDA365电子论坛网
标题:
Cline2Shape的SKILL小工具
[打印本页]
作者:
ahoom
时间:
2023-11-28 09:52
标题:
Cline2Shape的SKILL小工具
这个skill功能是可以将
Cline
转换成相应层的
Shape
。将下面文本保存.il格式即可。调用字符cl2s
;============================================================================
; Copyright Tait Electronics Ltd., 2005. All rights reserved.
;
; Program Name: cl2s.il
;
; Author: Dave Elder, PCB Design Manager,
; Tait Electronics, Christchurch, New Zealand
;
dave.elder@tait.co.nz
;
; Tested on: Allegro 15.2
;
; Purpose: Convert a cline to a shape.
;
; Usage: To run the routine within Allegro type: "cl2s".
;
; History:
;
; 1.3 21-Mar-05 DE Release to Allegro Forum
;
;============================================================================
axlCmdRegister("cl2s" 'CL2S_clineToShape ?cmdType "interactive")
defun( CL2S_clineToShape ()
let((mark, popupAllActive, popupGrayOops, oldSetData, endType, pt, clines, cline, layer, netName, parent, polys, (oopsCount 0), n)
mark = axlDBTransactionStart()
popupAllActive = axlUIPopupDefine(nil '(
("Done" "axlDBTransactionCommit(mark), axlFinishEnterFun()")
("Oops" "axlDBTransactionOops(mark), when(zerop(--oopsCount), axlUIPopupSet(popupGrayOops))")
("Cancel" "axlDBTransactionRollback(mark), axlCancelEnterFun()")
("MENU_SEPARATOR", nil)
("Toggle End Cap Type"
"endType = nthelem( n++ list( 'SQUARE, 'ROUND, 'OCTAGON))
printf(\"Select cline (End Cap Type will be %s)\\n\", endType)
if( n > 3, n = 1)"
)
))
axlUICmdPopupSet(popupAllActive)
popupGrayOops = axlUIPopupDefine(nil, '(
("Done" "axlDBTransactionCommit(mark), axlFinishEnterFun()")
("Cancel" "axlDBTransactionRollback(mark), axlCancelEnterFun()")
("Toggle End Cap Type"
"endType = nthelem( n++ list( 'SQUARE, 'ROUND, 'OCTAGON))
printf(\"Select cline (End Cap Type will be %s)\\n\", endType)
if( n > 3, n = 1)"
)
))
axlUIPopupSet(popupGrayOops)
endType = 'OCTAGON
n = 1
oldSetData = list(axlGetSelSet(), axlGetFindFilter(nil), axlGetFindFilter(t))
axlSetFindFilter(?enabled list("noall", "CLINES"), ?onButtons list("noall", "CLINES"))
while(pt = axlEnterPoint(?prompts sprintf(nil, "Select cline (End Cap Type will be %s)", endType))
axlClearSelSet()
while(axlAddSelectPoint(pt), t); necessary to add all objects at point
clines = axlGetSelSet()
caseq(length(clines)
(0, axlUIWPrint(nil, 'error, "No cline Here"))
(1
cline = car(clines), layer = cline ->layer, netName = cline ->net ->name, parent = cline ->parent
polys = axlPolyFromDB(cline ?endCapType endType)
if(polys then
axlDBTransactionMark(mark), axlUIPopupSet(popupAllActive), oopsCount++
axlClearSelSet(); Require for Allegro transaction bug that does not clear the find bit (Courtesy fxf).
axlDeleteObject(cline)
foreach(poly, polys, axlDBCreateShape(poly, t, layer, netName, and(parent ->objType, parent)))
else axlUIWPrint(nil, 'error, "Sorry. Could not convert this cline.")
)
)
(t, axlUIWPrint(nil, 'error, "Multiple clines Here. Pick again"))
); caseq
); while
axlSetFindFilter(?enabled cons("noall", cadr(oldSetData)) ?onButtons cons("noall", caddr(oldSetData)))
axlSingleSelectObject(car(oldSetData))
axlDBTransactionCommit(mark)
axlFinishEnterFun()
))
作者:
Big_pig
时间:
2023-11-28 19:40
很实用的小工具
作者:
w_w
时间:
2023-11-30 21:19
学习学习 谢谢分享
作者:
senfetech
时间:
2024-1-9 15:04
6666666666
作者:
七彩雨
时间:
2024-1-11 14:58
学习学习,谢谢分享
作者:
dianchao240711
时间:
2024-8-15 14:51
666666666666
作者:
Dc2023072710a
时间:
2024-8-15 15:20
+11111111111111111
作者:
杰1111
时间:
2025-1-21 18:44
感谢分享
欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/)
Powered by Discuz! X3.2