EETOP 创芯网论坛 (原名:电子顶级开发网)
标题: virtuoso Layout切线打孔脚本 [打印本页]
作者: Visen_Chiang 时间: 2024-6-26 16:14
标题: virtuoso Layout切线打孔脚本
Alt+E之后选择两把线,自动连接
Alt+3/Alt+D之后选择两把先,自动连接并打孔,打孔顺着电流方向
可以设置techfile来规定最少打孔为2
选择两条线,一横一竖,之后按下Alt+W,自动连接
同上,按下Alt+2/Alt+S,自动连接并打孔,打孔顺着电流方向
作者: Visen_Chiang 时间: 2024-6-26 16:16
本帖最后由 Visen_Chiang 于 2024-6-27 11:08 编辑
仅path能用
写脚本时所使用的virtuoso版本是6.1.8,没有在其他版本使用过
作者: Layout2019 时间: 2024-6-26 16:35
有拐㇉的path也能用吗
作者: Visen_Chiang 时间: 2024-6-26 17:10
只要是path不是pathSeg就可以,是通过勾股定理来算比较近的两个点来接的。
作者: Skadoodle7 时间: 2024-6-26 19:23
本帖最后由 Skadoodle7 于 2024-6-26 19:44 编辑
没反应怎么回事
作者: zcwolf 时间: 2024-6-26 19:49
myViaOptions = viaGetViaOptions(constraintGroupId)这一句有bug呀
作者: Visen_Chiang 时间: 2024-6-26 21:33
DFM 这个可以换成现在正在使用的group
作者: Visen_Chiang 时间: 2024-6-26 21:35
zcwolf 发表于 2024-6-26 19:49
myViaOptions = viaGetViaOptions(constraintGroupId)这一句有bug呀
试着把前一行的DFM换成你现在正在用的group呢?
就是create vias显示的
作者: Visen_Chiang 时间: 2024-6-26 21:37
Skadoodle7 发表于 2024-6-26 19:23
没反应怎么回事
要看当前create vias用的是tf文件里的哪种group,如果没有DFM这个group要手动改一下。另外还要看一下键盘映射是否支持左alt这个快捷键。或者需要在.cdsenv中把menushortcut改为nil并重启virtuoso
作者: student321 时间: 2024-6-26 22:40
kadsknd
作者: zcwolf 时间: 2024-6-27 09:14
不知道为什么,换了也还是有bug
作者: Skadoodle7 时间: 2024-6-27 09:56
已经把快捷键放到小键盘上了,但是还是没有反应,显示undefined function。另外请教一下怎么看当前用的是什么group。谢谢!
作者: Visen_Chiang 时间: 2024-6-27 10:35
( , 下载次数:
40 )
这个就是,除了Same as Wire
需要在脚本中把DFM换成你需要的
作者: Visen_Chiang 时间: 2024-6-27 10:36
undefined function CBAV()吗?这好像是没有成功load
作者: Visen_Chiang 时间: 2024-6-27 10:37
请问还是和之前一样的提示吗,脚本改了之后可以放一张图来看看吗
不清楚是不是virtuoso版本的问题?
作者: Visen_Chiang 时间: 2024-6-27 10:48
( , 下载次数:
42 )
Alt不能用的,排除windows到Linux环境,键盘映射不支持之外
在.cdsenv中加上这一行就可以禁用virtuoso Alt开启菜单栏的快捷键
这样就可以将Alt设置为组合快捷键了。
作者: YuSHL 时间: 2024-6-27 10:55
616没有 viaGetViaOptions()
作者: Visen_Chiang 时间: 2024-6-27 11:06

学习了,感谢教导
我用的是6.1.8
作者: Skadoodle7 时间: 2024-6-27 11:21
好吧 我的就是same as wire
作者: Visen_Chiang 时间: 2024-6-27 11:22
换成其他的group,你可以选择其他的group挨个试一下,看看哪种group打孔更舒适一些,就在脚本中替换为这个group
作者: zcwolf 时间: 2024-6-27 15:44
试了试其它所有情况 有一个group用不了 其它是可以用的 问题解决了。但还有个小建议 这里划线的逻辑是不是没必要和select by line的逻辑做成一样 划线点一下就好 没必要点两下。
作者: Skadoodle7 时间: 2024-6-27 15:56
楼主我的可以运行了,但是只能一根线自动连上,一捆线还是不能,一捆线的中间会微微倾斜一个角度,也不会延长然后打孔
作者: Visen_Chiang 时间: 2024-6-27 16:31
这个确实是用的select by line的函数,我是一边学习一边写的,现在不知道有什么方法可以少点击一下。我想,要快速点击两下是因为中间有需要转弯的情况吧。
作者: Visen_Chiang 时间: 2024-6-27 16:33
Alt+S/W/2是要先选择两条线,这是一对线的连接对应的快捷键
Alt+D/E/3是要先按下快捷键,然后通过两次select by line,分别选择两把线,这是多组线连接对应的快捷键。
你是进行的哪个操作呢?
作者: zcwolf 时间: 2024-6-27 16:34
对 因为感觉这个脚本不需要拐弯 都是直线 可以参考一下这个脚本 是点击一下的。
procedure( ConnectNetByName()
let(
(Obj1sObj2s Obj1 Obj2 Ob1Name
Point1 Point2 Point3 Point4 PX1 PX2 PX3 PX4
PY1 PY2 PY3 PY4 Space1 Space2 Space3Space4 TechFile CGroupId MyViaOptions
point_LD_xpoint_LU_x point_RD_x point_RU_x point_LD_y point_LU_y point_RD_y point_RU_y
Window Ob2W Ob1W LeftDown LeftUp RightUp RightDown
)
geSelectBy2PointsLine()
Obj1s=geGetSelSet()
geSelectBy2PointsLine()
Obj2s=geGetSelSet()
procedure(FlipPathSeg(pSeg)
dbSetPathSegPoints(pSeg pSeg~>endPtpSeg~>beginPt)
pSeg
;
);
point_LD_x = nil
point_LU_x = nil
point_RD_x = nil
point_RU_x = nil
point_LD_y = nil
point_LU_y = nil
point_RD_y = nil
point_RU_y = nil
foreach(OBJ1x Obj1s
cond(
(OBJ1x~>objType!="pathSeg"
Obj1= car(leConvertShapeToPathSeg(OBJ1x)));
(OBJ1x~>objType=="pathSeg"
if((xCoord(OBJ1x~>beginPt)==xCoord(OBJ1x~>endPt) &&yCoord(OBJ1x~>beginPt)>yCoord(OBJ1x~>endPt))
||(yCoord(OBJ1x~>beginPt)==yCoord(OBJ1x~>endPt) &&xCoord(OBJ1x~>beginPt)>xCoord(OBJ1x~>endPt))
thenprintln("Flip") Obj1 = FlipPathSeg(OBJ1x)
elseObj1 = OBJ1x
);if
);
);cond
Ob1Name = Obj1~>net~>name
Ob1W = Obj1~>width/2
;printf("Mark0:%L \n" Ob1Name)
foreach(OBJ2x Obj2s
if(OBJ2x~>net~>name==Ob1Name
then
;printf("Mark1:%L \n"OBJ2x~>net~>name)
cond(
(OBJ2x~>objType!="pathSeg"
Obj2= car(leConvertShapeToPathSeg(OBJ2x)));
(OBJ2x~>objType=="pathSeg"
if((xCoord(OBJ2x~>beginPt)==xCoord(OBJ2x~>endPt)&&yCoord(OBJ2x~>beginPt)>yCoord(OBJ2x~>endPt))
||(yCoord(OBJ2x~>beginPt)==yCoord(OBJ2x~>endPt) &&xCoord(OBJ2x~>beginPt)>xCoord(OBJ2x~>endPt))
thenObj2 = FlipPathSeg(OBJ2x)
elseObj2 = OBJ2x
);if
);
);cond
Ob2W = Obj2~>width/2
Point1 = Obj1~>beginPt Point2 =Obj1~>endPt
Point3 = Obj2~>beginPt Point4 =Obj2~>endPt
PX1 = xCoord(Point1) PY1 = yCoord(Point1)
PX2 = xCoord(Point2) PY2 = yCoord(Point2)
PX3 = xCoord(Point3) PY3 = yCoord(Point3)
PX4 = xCoord(Point4) PY4 = yCoord(Point4)
Space1 = expt((PX1-PX3) 2) + expt((PY1 -PY3) 2)
Space2 = expt((PX1-PX4) 2) + expt((PY1 -PY4) 2)
Space3 = expt((PX2-PX3) 2) + expt((PY2 -PY3) 2)
Space4 = expt((PX2-PX4) 2) + expt((PY2 -PY4) 2)
if((PX1==PX2)&& (PY3==PY4)
then ;NearPt = list(PX1 PY3)
LeftDown = list(PX1-Ob1W PY3-Ob2W) LeftUp = list(PX1-Ob1W PY3+Ob2W)
RightDown = list(PX1+Ob1W PY3-Ob2W) RightUp= list(PX1+Ob1W PY3+Ob2W)
if(min(Space1 Space2 Space3 Space4) ==Space1
then dbSetPathSegPoints(Obj1 list(PX1 PY3-Ob2W) Point2)
dbSetPathSegPoints(Obj2 list(PX1-Ob1W PY3) Point4)
);if
if(min(Space1 Space2 Space3 Space4) ==Space2
then dbSetPathSegPoints(Obj1 list(PX1PY3-Ob2W) Point2)
dbSetPathSegPoints(Obj2 Point3 list(PX1+Ob1W PY3))
);if
if(min(Space1 Space2 Space3 Space4) ==Space3
then dbSetPathSegPoints(Obj1 Point1 list(PX1 PY3+Ob2W))
dbSetPathSegPoints(Obj2 list(PX1-Ob1W PY3) Point4)
);if
if(min(Space1 Space2 Space3 Space4) ==Space4
then dbSetPathSegPoints(Obj1 Point1 list(PX1 PY3+Ob2W))
dbSetPathSegPoints(Obj2 Point3list(PX1+Ob1W PY3))
)
)
if((PY1==PY2) && (PX3==PX4)
then ;NearPt = list(PX3 PY1)
LeftDown = list(PX3-Ob2W PY1-Ob1W) LeftUp = list(PX3-Ob2W PY1+Ob1W)
RightDown= list(PX3+Ob2W PY1-Ob1W) RightUp= list(PX3+Ob2W PY1+Ob1W)
if(min(Space1 Space2 Space3 Space4) ==Space1
then dbSetPathSegPoints(Obj1 list(PX3-Ob2W PY1) Point2)
dbSetPathSegPoints(Obj2 list(PX3PY1-Ob1W) Point4)
);if
if(min(Space1 Space2 Space3 Space4) ==Space2
then ;dbSetPathSegStyle(Obj1 car(OS1)"truncate" caddr(OS1) cdddr(OS1))
dbSetPathSegPoints(Obj1 list(PX3-Ob2W PY1) Point2)
dbSetPathSegPoints(Obj2 Point3 list(PX3 PY1+Ob1W))
);if
if(min(Space1 Space2 Space3 Space4) ==Space3
then ;dbSetPathSegStyle(Obj1 car(OS1) cadr(OS1)"truncate" cdddr(OS1))
dbSetPathSegPoints(Obj1 Point1list(PX3+Ob2W PY1))
dbSetPathSegPoints(Obj2 list(PX3PY1-Ob1W) Point4)
);if
if(min(Space1 Space2 Space3 Space4) ==Space4
then ;dbSetPathSegStyle(Obj1 car(OS1)cadr(OS1) "truncate" cdddr(OS1))
dbSetPathSegPoints(Obj1 Point1list(PX3+Ob2W PY1))
dbSetPathSegPoints(Obj2 Point3list(PX3 PY1+Ob1W))
))
)
)
point_LD_x = cons( xCoord(LeftDown) point_LD_x)
point_LU_x = cons(xCoord(LeftUp) point_LU_x)
point_RD_x = cons(xCoord(RightDown) point_RD_x)
point_RU_x = cons(xCoord(RightUp) point_RU_x)
point_LD_y = cons(yCoord(LeftDown) point_LD_y)
point_LU_y = cons(yCoord(LeftUp) point_LU_y)
point_RD_y = cons(yCoord(RightDown) point_RD_y)
point_RU_y = cons(yCoord(RightUp) point_RU_y)
)
LeftDown = list(apply('min point_LD_x)apply('min point_LD_y))
LeftUp = list(apply('min point_LD_x)apply('max point_LU_y))
RightUp = list(apply('max point_RU_x)apply('max point_LU_y))
RightDown = list(apply('max point_RU_x)apply('min point_RD_y))
println(RightDown)
/******************************************************************************/
TechFile = techGetTechFile(geGetEditRep())
CGroupId =cstFindConstraintGroupIn(TechFile "virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts=2
MyViaOptions~>automatic~>preventDRCWithNeighbors= t
MyViaOptions~>automatic~>cutBBoxOrientation= "auto"
MyViaOptions~>automatic~>viaAlignment= "auto"
MyViaOptions~>automatic~>connectShapesOnSameNet=t
Window = deGetCellView()
viaGenerateViasInArea(Window list(LeftDownLeftUp RightUp RightDown) MyViaOptions)
TechFile = techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile"virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 2
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>cutBBoxOrientation= "horizontal"
MyViaOptions~>automatic~>viaAlignment = "centerLeft" ||"centerRight"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
TechFile = techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile"virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 2
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>cutBBoxOrientation= "vertical"
MyViaOptions~>automatic~>viaAlignment = "lowerCenter" ||"upperCenter"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
TechFile= techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile"virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 2
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>cutBBoxOrientation ="horizontal"
MyViaOptions~>automatic~>viaAlignment = "centerRight" ||"centerLeft"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
TechFile = techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile"virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 2
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>cutBBoxOrientation = "vertical"
MyViaOptions~>automatic~>viaAlignment = "centerCenter"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
TechFile= techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile "virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 2
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>cutBBoxOrientation ="horizontal"
MyViaOptions~>automatic~>viaAlignment = "centerCenter"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
TechFile= techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile"virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
MyViaOptions~>automatic~>minNumCuts= 1
MyViaOptions~>automatic~>connectShapesOnSameNet=t
MyViaOptions~>automatic~>preventDRCWithNeighbors = t
MyViaOptions~>automatic~>cutBBoxOrientation = "vertical"
MyViaOptions~>automatic~>viaAlignment = "centerCenter"
viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown)MyViaOptions)
)
;let
);pro
/*procedure(MetalLayerNumber(MetalLayerName )
let(( MetalList MetalNum)
MetalList=list("ME1""VI1" "ME2" "VI2" "ME3" "VI3""ME4" "VI4" "ME5" "VI5" "ME6""VI6" "ME7" "VI7" )
for(i 1 length(MetalList)
if(nth(i-1 MetalList)== MetalLayerName
then
MetalNum=i);if
);for
MetalNum
);let
);proc
*/
hiSetBindKey("Layout""Shift<Key>8" "ConnectNetByName()")
;partial select two parts lines, one partis horizontal, another part is vertical,
;then runswCreateVias("horizontal" )/swCreateVias ("vertical"),
;hozizontal/vertical vias will be createdand related nets will shorten.
;Orientation is a member of list("auto" "horizontal" "vertical")
procedure(swCreateVias(Orientation)
let((cv objs tf nets Hnets Vnets firHselDirfirVselDir len HnetId Hw HselDir HselPtCoord
selFigPt HnetLayerName VnetId Vw VselDirVselPtCoord VselFigPt VnetL ayerName
Hstretch Vstretch viaLoca autoViaL cstGrpIdviaOpt ions HnetGrp HselFigPt VnetGrp VnetLayerName viaOptions)
cv=geGetEditCellView()
objs=geGetSelSet()
tf=ciGetTechFile()
nets=setof(iobjs i~>objType=="path"||i~>objType=="pathSeg")
Hnets=setof(inets swNetInfo(i)~>netDir=="Horizontal")
Hnets=sort(Hnetslambda((a b)
yCoord(swNetInfo(a)~>selPtCoord)>yCoord(swNetInfo(b)~>selPtCoord)))
Vnets=setof(inets swNetInfo(i)~>netDir=="Vertical")
Vnets=sort(Vnetslambda((a b)
xCoord(swNetInfo(a)~>selPtCoord)<xCoord(swNetInfo(b)~>selPtCoord)))
if(!Hnets||!Vnetsthen ;only select Hnets or Vnets, output error message
error("\nPleasepartial select at least one vertical net and one horizontal net!!!"));if
firHselDir=swNetInfo(car(Hnets))~>selDir
firVselDir=swNetInfo(car(Vnets))~>selDir
cond( (firHselDir=="Right"&&firVselDir=="Up" Hnets=reverse(Hnets))
(firHselDir=="Left"&&firVselDir=="Down" Vnets=reverse(Vnets))
(firHselDir=="Left"&&firVselDir=="Up" Hnets=reverse(Hnets)Vnets=reverse(Vnets)) );cond
;makesure create vias from inside to outside
len=min(length(Hnets)length(Vnets))
for(i1 len
HnetId=nth(i-1Hnets)
Hw=HnetId~>width
HselDir=swNetInfo(HnetId)~>selDir
HselPtCoord=swNetInfo(HnetId)~>selPtCoord
HselFigPt=swNetInfo(HnetId)~>selFigPt
HnetLayerName=HnetId~>layerName
HnetGrp=HnetId~>figGroup
VnetId=nth(i-1Vnets)
Vw=VnetId~>width
VselDir=swNetInfo(VnetId)~>selDir
VselPtCoord=swNetInfo(VnetId)~>selPtCoord
VselFigPt=swNetInfo(VnetId)~>selFigPt
VnetLayerName=VnetId~>layerName
VnetGrp=VnetId~>figGroup
case(HselDir
("Right" Hstretch=list(xCoord(VselPtCoord)-xCoord(HselPtCoord)+Vw/20) )
("Left" Hstretch=list(xCoord(VselPtCoord)-xCoord(HselPtCoord)-Vw/20) ) );case
leStretchFig(HnetIdHstretch HselFigPt)
case(VselDir
("Down" Vstretch=list(0yCoord(HselPtCoord)-yCoord(VselPtCoord)-Hw/2) )
("Up" Vstretch=list(0yCoord(HselPtCoord)-yCoord(VselPtCoord)+Hw/2) ) );case
leStretchFig(VnetIdVstretch VselFigPt)
viaLoca=list(xCoord(swNetInfo(VnetId)~>selPtCoord)yCoord(swNetInfo(HnetId)~>selPtCoord))
cstGrpId=cstFindConstraintGroupIn(tf"virtuosoDefaultExtractorSetup" )
viaOptions=viaGetViaOptions(cstGrpId)
viaOptions~>automatic~>minNumCuts=2
viaOptions~>automatic~>cutBBoxOrientation=Orientation
autoViaL=viaGenerateViasAtPoint(cvviaLoca viaOptions
?topAndBottomLayerslist(HnetLayerName VnetLayerName))
cond(
(HnetGrp mapcar(lambda((x) dbAddFigToFigGroup(HnetGrpx)) autoViaL) )
(VnetGrp mapcar(lambda((x) dbAddFigToFigGroup(VnetGrpx)) autoViaL) ) );cond
/*foreach(autoViaautoViaL ;change vias enclosure, and align vias to nets edge
autoVia~>layer1Enc=mapcar(lambda((x)if(plusp(0.05-x) then 0.05 else x)) autoVia~>layer1Enc)
autoVia~>layer2Enc=mapcar(lambda((x)if(plusp(0.05-x) then 0.05 else x)) autoVia~>layer2Enc)
autoVia~>originOffset=mapcar(lambda((x)cond( (zerop(x) 0.0)
(plusp(x)case(Orientation("vertical" 0.38-Hw/2 ) ("horizontal"0.38-Vw/2) ) )
(minusp(x)case(Orientation("vertical" -(0.38-Hw/2)) ("horizontal"-(0.38-Vw/2))))))
autoVia~>origin0ffset);mapcar
);foreach*/
geSelectFigs(autoViaL)
);for
);let
);proc
hiSetBindKey("Layout""Shift<Key>(" "swCreateVias(\"horizontal\")")
hiSetBindKey("Layout""Shift<Key>)" "swCreateVias(\"vertical\")")
;SwNetInfo(netId) can return net'sinformation excluding netId~>??
;partial select a net, only select onepoint of a pathseg or path, put its dbId in swNetInfo(netId) ,
;then use swNetInfo(netId)~>?? toretrieve its net informations which not include in netId~>??
procedure(swNetInfo(netId)
let((netInfo selFigPt xBeg yBeg xEnd yEndnetDir netRoute selDir selPt selPtCoord
nextPtCoord xFir yFir xSec ySec xLast yLastxSeLa ySeLa netPts)
netInfo=makeTable('net)
selFigPt=geGetSelSetFigPoint(netId)
if(netId~>objType=="pathSeg" then
xBeg=xCoord(netId~>beginPt) yBeg=yCoord(netId~>beginPt)
xEnd=xCoord(netId~>endPt) yEnd=yCoord(netId~>endPt)
if(car(selFigPt)&&!car(last(selFigPt)) then
selPt="beginPt"
selPtCoord=netId~>beginPt
nextPtCoord=netId~>endPt
when(xBeg==xEnd&&yBeg!=yEnd
netDir="Vertical"
if(yBeg>yEnd
then netRoute="UpToDown" selDir="Up"
else netRoute="DownToUp" selDir="Down" );if
);when
when(xBeg!=xEnd&&yBeg==yEnd
netDir="Horizontal"
if(xBeg>xEnd
then netRoute="RightToLeft" selDir="Right"
else netRoute="LeftToRight" selDir="Left" );if
);when
);if
if(!car(selFigPt)&&car(last(selFigPt)) then
selPt="endPt"
selPtCoord=netId~>endPt
nextPtCoord=netId->beginPt
when(xBeg==xEnd&&yBeg!=yEnd
netDir="Vertical"
if(yBeg>yEnd
then netRoute="UpToDown" selDir="Down"
else netRoute="DownToUp" selDir="Up" );if
);when
when(xBeg!=xEnd&&yBeg==yEnd
netDir="Horizontal"
if(xBeg>xEnd
then netRoute="RightToLeft" selDir="Left"
else netRoute="LeftToRight" selDir="Right" );if
);when
);if
);if
if(netId~>objType=="path" then
netPts=netId~>points
xFir=xCoord(nth(0netPts)) yFir=yCoord(nth(0netPts))
xSec=xCoord(nth(1netPts)) ySec=yCoord(nth(1 netPts))
xLast=xCoord(nth(0reverse(netPts))) yLast=yCoord(nth(0reverse(netPts)))
xSeLa=xCoord(nth(1reverse(netPts))) ySeLa=yCoord(nth(1reverse(netPts)))
if(car(selFigPt)&&!car(last(selFigPt)) then
selPt="firstPt"
selPtCoord=nth(0netPts)
nextPtCoord=nth(1netPts)
when(xFir==xSec&&yFir!=ySec
netDir="Vertical"
if(yFir>ySec
then netRoute="UpToDown" selDir="Up"
else netRoute="DownToUp" selDir="Down" );if
);when
when(xFir!=xSec&&yFir==ySec
netDir="Horizontal"
if(xFir>xSec
then netRoute="RightToleft" selDir="Right"
else netRoute="LeftToRight" selDir="Left" );if
);when
);if
if(!car(selFigPt)&&car(last(selFigPt)) then
selPt="lastPt"
selPtCoord=nth(0reverse(netPts))
nextPtCoord=nth(1reverse(netPts))
when(xLast==xSeLa&&yLast!=ySeLa
netDir="Vertical"
if(yLast<ySeLa
then netRoute="UpToDown" selDir="Down"
else netRoute="DownToUp" selDir="Up" );if
);when
when(xLast!=xSeLa&&yLast==ySeLa
netDir="Horizontal"
if(xLast<xSeLa
then netRoute="RightToLeft" selDir="Left"
else netRoute="LeftToRight" selDir="Right" );if
);when
);if
);if
netInfo['net]=netId
netInfo['selFigPt]=selFigPt
netInfo['netDir]=netDir
netInfo['netRoute]=netRoute
netInfo['selDir]=selDir
netInfo['selPt]=selPt
netInfo['selPtCoord]=selPtCoord
netInfo['nextPtCoord]=nextPtCoord
netInfo
);let
);proc
作者: Visen_Chiang 时间: 2024-6-27 16:49
本帖最后由 Visen_Chiang 于 2024-6-27 16:57 编辑
感谢感谢,我load来看看。
————————————————
学习了,又是不一样的思路。
作者: zcwolf 时间: 2024-7-1 17:24
可以在select by line下面加上这两个函数leHiConvertShapeToPolygon()和leHiConvertPolygonToPath()这两个函数, 这样不管碰到什么类型的线段都可以连接了(实际用下来会碰到一些pathseg属性的线连不上)
作者: zcwolf 时间: 2024-7-1 17:26
我直接把select by line函数替换为为geSelectBy2PointsLine() 能运行 但还是有bug 线段连接顺序就变成随机的了
作者: yucer 时间: 2024-9-24 15:33
本帖最后由 yucer 于 2024-9-24 16:54 编辑
佬,在左边的话有问题啊
我知道了这个是在第一象限可以用
作者: qinghao.chen 时间: 2024-9-29 16:57
这个脚本里面包含了多个解释有点不太理解,方便加一下联系方式吗?
作者: Visen_Chiang 时间: 2024-9-30 11:55
因为我不用partial去连线。。。所以这个情况没有测,我是full mode的。。。
作者: Charlie4gh 时间: 2025-1-12 16:16
这个函数报错了dbSetPathSegPoints
作者: qlg123 时间: 2025-1-17 14:27
你好,请问一下viaGetViaOptions这个函数的具体功能是什么,ic6.1.6里面没有这个函数,所以想找找看能不能通过一些方式来实现同样的功能
作者: Visen_Chiang 时间: 2025-1-17 17:19
这里是函数的描述
抱歉 我不知道如何能替换这个函数,搜了一下只看到一个符合问题的回复,在下面贴上链接以供参考。
分享两个自己写的Skill脚本 - 第2页 - 脚本讨论区 - EETOP 创芯网论坛 (原名:电子顶级开发网) -
欢迎光临 EETOP 创芯网论坛 (原名:电子顶级开发网) (https://bbs.eetop.cn/) |
Powered by Discuz! X3.5 |