`procedure( ContInOrder()
prog( ( OBJ1 OBJ2 obj1 obj2 Vline Hline HW VW HBP VBP xHBP yHBP xHEP yHEP xVBP yVBP xVEP yVEP
Space1 Space2 Space3 Space4 LeftDown LeftUp RightUp RightDown TechFile CGroupId
MyViaOptions Window Num1 Num2 BigNum SmallNum NEWVIAS)
OBJ1 = geGetSortedSelectByLine()
OBJ2 = geGetSortedSelectByLine()
Setlist = mapcar('list OBJ1 OBJ2)
F1=car(OBJ1) L1=cadr(OBJ1)
F2=car(OBJ2) L2=cadr(OBJ2)
foreach(Set Setlist
if(caar(Set)~>objType == "pathSeg"
then obj1 = car(leConvertShapeToPathSeg(leConvertShapeToPolygon( caar(Set))) )
dbDeleteObject(caar(Set))
else obj1 = car(leConvertShapeToPathSeg(leConvertShapeToPolygon( caar(Set))) )
);
if(caadr(Set)~>objType == "pathSeg"
then obj2 = car(leConvertShapeToPathSeg(leConvertShapeToPolygon(caadr(Set))) )
dbDeleteObject(caadr(Set))
else obj2 = car(leConvertShapeToPathSeg(leConvertShapeToPolygon(caadr(Set))) )
);if ***IC617 SKILL BUG.Delete extra pathSeg ***
if(xCoord(obj1>beginPt)==xCoord(obj1>endPt) && yCoord(obj2>beginPt)==yCoord(obj2>endPt)
then Vline = obj1 Hline = obj2);if
if(xCoord(obj2>beginPt)==xCoord(obj2>endPt) && yCoord(obj1>beginPt)==yCoord(obj1>endPt)
then Vline = obj2 Hline = obj1);if
HW = Hline~>width/2 VW = Vline~>width/2
HBP = Hline~>beginPt HEP = Hline~>endPt
VBP = Vline~>beginPt VEP = Vline~>endPt
xHBP=xCoord(HBP) yHBP=yCoord(HBP)
xHEP=xCoord(HEP) yHEP=yCoord(HEP)
xVBP=xCoord(VBP) yVBP=yCoord(VBP)
xVEP=xCoord(VEP) yVEP=yCoord(VEP)
Space1 = expt((xHBP-xVBP) 2) + expt((yHBP - yVBP) 2)
Space2 = expt((xHBP-xVEP) 2) + expt((yHBP - yVEP) 2)
Space3 = expt((xHEP-xVBP) 2) + expt((yHEP - yVBP) 2)
Space4 = expt((xHEP-xVEP) 2) + expt((yHEP - yVEP) 2)
cond(
(min(Space1 Space2 Space3 Space4) == Space1
dbSetPathSegPoints(Hline list(xVBP-VW yHBP) HEP)
dbSetPathSegPoints(Vline list(xVBP yHBP-HW) VEP)
; println("1") shape L
);
(min(Space1 Space2 Space3 Space4) == Space2
dbSetPathSegPoints(Hline list(xVBP-VW yHBP) HEP)
dbSetPathSegPoints(Vline VBP list(xVEP yHEP+HW))
; println("2") shape F
);
(min(Space1 Space2 Space3 Space4) == Space3
dbSetPathSegPoints(Hline HBP list(xVBP+VW yHEP))
dbSetPathSegPoints(Vline list(xVBP yHBP-HW) VEP)
; println("3") shape _|
);
(min(Space1 Space2 Space3 Space4) == Space4
dbSetPathSegPoints(Hline HBP list(xVBP+VW yHEP))
dbSetPathSegPoints(Vline VBP list(xVEP yHEP+HW))
; println("4") shape 7
);
);cond
;CorePoint = list(xVBP yHBP)
LeftDown =list(xVBP-VW yHBP-HW) LeftUp =list(xVBP-VW yHBP+HW)
RightDown=list(xVBP+VW yHBP-HW) RightUp=list(xVBP+VW yHBP+HW)
TechFile = techGetTechFile(geGetEditRep())
CGroupId = cstFindConstraintGroupIn(TechFile "virtuosoDefaultSetup")
MyViaOptions = viaGetViaOptions(CGroupId)
Window = deGetCellView()
NEWVIAS = viaGenerateViasInArea(Window list(LeftDown LeftUp RightUp RightDown) MyViaOptions)
/*************Delete extra Vias***********/
BigNum = max(MetalLayerNumber(obj1~>layerName) MetalLayerNumber(obj2~>layerName))
SmallNum = min(MetalLayerNumber(obj1~>layerName) MetalLayerNumber(obj2~>layerName))
for(j 0 j=length(NEWVIAS)
;println(nth(j NEWVIAS)>viaHeader>master>shapes>layerName)
if(setof(x nth(j NEWVIAS)>viaHeader>master>shapes>layerName
MetalLayerNumber(x)<SmallNum-1||MetalLayerNumber(x)>BigNum+1);setof
then dbDeleteObject(nth(j NEWVIAS))
);if
);for
/Delete extra Vias*/
);foreach
);let
);procedure
/**********Number***********/
procedure(MetalLayerNumber( MetalLayerName )
let((MetalList MetalNum)
MetalList=list("Active" "Poly" "Contact" "MET1" "Via1" "MET2" "Via2" "MET3" "Via3" "MET4" "Via4" "UME" "TopVia" "TTOPME" )
for(i 1 length(MetalList)
if(nth(i-1 MetalList)== MetalLayerName
then
MetalNum=i);if
);for
MetalNum
);let
);proc
hiSetBindKey("Layout" "1" "ContInOrder()")
`
标签:脚本,obj1,obj2,list,Hline,connect,xVBP,yHBP From: https://www.cnblogs.com/jinzbr/p/18303651