求大家帮帮忙~~~我没查出来
procedure(p()
enterBox(?prompts
list("enter a Bbox")
?doneProc "pointdonehw"
) ;enterBox end
) ;p() end
procedure(pointdonehw(w done pts)
if(done then
xl=xCoord(lowerLeft(pts))
yl=yCoord(lowerLeft(pts))
xu=xCoord(upperRight(pts))
yu=yCoord(upperRight(pts))
) ;if end
) ;pointdonehw end
for(i 0 (length(w)-1)
if((nth(i w)~>layerName=="M1"&&nth(i w)~>purpose=="logic")!=nil
then
list_m1=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M2"&&nth(i w)~>purpose=="logic")!=nil
then
list_m2=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M3"&&nth(i w)~>purpose=="logic")!=nil
then
list_m3=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M4"&&nth(i w)~>purpose=="logic")!=nil
then
list_m4=nth(i w)~>bBox
)
)
if(list_m1!=nil then
list_bottom=list_m1
bottom=1
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else printf("no bottom layer")
)
)
)
if(list_m4!=nil then
list_bottom=list_m1
top=4
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else printf("no top layer")
)
)
)
if(
caar(list_bottom)>caar(list_top)
then
contact_xl=caar(list_bottom)
else
contact_xl=caar(list_top)
)
if(
caadr(list_bottom)>caadr(list_top)
then
contact_yl=caadr(list_bottom)
else
contact_yl=caadr(list_top)
)
if(
cadar(list_bottom)>cadar(list_top)
then
contact_yl=cadar(list_bottom)
else
contact_yl=cadar(list_top)
)
if(
cadadr(list_bottom)>cadadr(list_top)
then
contact_yl=cadadr(list_bottom)
else
contact_yl=cadadr(list_top)
)