|
我在改自动设置层叠的Skill时,每次设置层叠后TOP层的光绘就不出现,除非是比TOP多一位,比如TOP1就出现了,这是个什么情况,我改的光绘部分的代码,请各位指点哪里设置错误了
(defun _LX_CreatCamtxt (layername)
prog( ()
deleteFile("./cam.txt")
if(layername==nil
then
axlMsgPut("have not *.teach file.")
else
design_unit=nthelem(1 axlDBGetDesignUnits())
extrac_accuracy=nthelem(2 axlDBGetDesignUnits())
if(extrac_accuracy==0||extrac_accuracy==1||extrac_accuracy==2||extrac_accuracy==3 ||extrac_accuracy==4
then
case(extrac_accuracy
(0
ExtraAccuracy=6
)
(1
ExtraAccuracy=60
t)
(2
ExtraAccuracy=600
t)
(3
ExtraAccuracy=6000
t)
(4
ExtraAccuracy=60000
t)
);end_case
if( design_unit == "millimeters" then ExtraAccuracy=ExtraAccuracy/40)
if( design_unit == "inches" then ExtraAccuracy=ExtraAccuracy/1000)
rpt=outfile("./cam.txt")
snum=0
gnum=0
vnum=0
foreach(eachname layername
case(car(parseString(eachname ""))
("T"
sprintf(camlayer,"%s","TOP")
fprintf(rpt "(axlfcreate \"%s\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/TOP\" \"PIN/TOP\" \"ETCH/TOP\" \"BOARD GEOMETRY/OUTLINE\" ))\n",camlayer,ExtraAccuracy)
t)
("B"
sprintf(camlayer,"%s","BOTTOM")
fprintf(rpt "(axlfcreate \"%s\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/BOTTOM\" \"PIN/BOTTOM\" \"ETCH/BOTTOM\" \"BOARD GEOMETRY/OUTLINE\" ))\n",camlayer,ExtraAccuracy)
t)
("S"
snum=snum+1
sprintf(camlayer,"%s%d","SIG",snum)
fprintf(rpt "(axlfcreate \"%s\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/%s\" \"PIN/%s\" \"ETCH/%s\" \"BOARD GEOMETRY/OUTLINE\" ))\n",camlayer,ExtraAccuracy,eachname,eachname,eachname,eachname)
t)
("V"
vnum=vnum+1
sprintf(camlayer,"%s%d","VCC",vnum)
fprintf(rpt "(axlfcreate \"%s\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/%s\" \"PIN/%s\" \"ETCH/%s\" \"BOARD GEOMETRY/OUTLINE\" ))\n",camlayer,ExtraAccuracy,eachname,eachname,eachname,eachname)
t)
("G"
gnum=gnum+1
sprintf(camlayer,"%s%d","GND",gnum)
fprintf(rpt "(axlfcreate \"%s\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/%s\" \"PIN/%s\" \"ETCH/%s\" \"BOARD GEOMETRY/OUTLINE\" ))\n",camlayer,ExtraAccuracy,eachname,eachname,eachname,eachname)
t)
);end_case
);end_foreach
fprintf(rpt "(axlfcreate \"SILKTOP\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"REF DES/SILKSCREEN_TOP\" \"PACKAGE GEOMETRY/SILKSCREEN_TOP\" \"BOARD GEOMETRY/OUTLINE\" ))\n",ExtraAccuracy)
fprintf(rpt "(axlfcreate \"SILKBOTTOM\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"REF DES/SILKSCREEN_BOTTOM\" \"PACKAGE GEOMETRY/SILKSCREEN_BOTTOM\" \"BOARD GEOMETRY/OUTLINE\" ))\n",ExtraAccuracy)
fprintf(rpt "(axlfcreate \"SOLDTOP\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/SOLDERMASK_TOP\" \"PIN/SOLDERMASK_TOP\" \"PACKAGE GEOMETRY/SOLDERMASK_TOP\" \"BOARD GEOMETRY/OUTLINE\" \"BOARD GEOMETRY/SOLDERMASK_TOP\" ))\n",ExtraAccuracy)
fprintf(rpt "(axlfcreate \"SOLDBOTTOM\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"VIA CLASS/SOLDERMASK_BOTTOM\" \"PIN/SOLDERMASK_BOTTOM\" \"PACKAGE GEOMETRY/SOLDERMASK_BOTTOM\" \"BOARD GEOMETRY/OUTLINE\" \"BOARD GEOMETRY/SOLDERMASK_BOTTOM\" ))\n",ExtraAccuracy)
fprintf(rpt "(axlfcreate \"PASTETOP\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"PIN/PASTEMASK_TOP\" \"PACKAGE GEOMETRY/PASTEMASK_TOP\" \"BOARD GEOMETRY/OUTLINE\" ))\n",ExtraAccuracy)
fprintf(rpt "(axlfcreate \"PASTEBOTTOM\" '(0 0 0 %d 0 1 0 0 0 0 0 0 0) '(\"PIN/PASTEMASK_BOTTOM\" \"PACKAGE GEOMETRY/PASTEMASK_BOTTOM\" \"BOARD GEOMETRY/OUTLINE\" ))\n",ExtraAccuracy)
close(rpt)
else
axlMsgPut("Please set accuracy with 0 1 2 3 4")
);end_if
);end_if
));end_defun _LX_CreatCamtx
|
|