双面拼板脚本试写,觉得可以的记得顶下!
COM units,type=inch
COM affected_layer,mode=all,affected=no
COM clear_layers
###########################################################gui
set GUI_CMD = c:/tmp/gui_cmd.$$
set GUI_RESP = c:/tmp/gui_resp.$$
set IFILE = c:/tmp/do_info.$$
alias GUI_OUT 'echo \!:* >> $GUI_CMD'
alias GUI_EXE 'c:/genesis/e82/all/gui $GUI_CMD > $GUI_RESP; source $GUI_RESP; rm $GUI_CMD; rm $GUI_RESP'
GUI_OUT WIN 200 200
GUI_OUT TEXT usename 5 Name
GUI_OUT RADIO st SurfaceTechnics H 1 000099
GUI_OUT NotHals
GUI_OUT Hals
GUI_OUT END
GUI_OUT LABEL 'Pls input the size'
GUI_OUT FORM
GUI_OUT TEXT px 10 PX:
GUI_OUT TEXT py 10 PY:
GUI_OUT LABEL ' Unit:INCH'
GUI_OUT ENDFORM
GUI_OUT RADIO quit Quit H 1 990000
GUI_OUT Continue
GUI_OUT Quit
GUI_OUT END
GUI_EXE
##########################################################################panle
COM sr_auto,step=pcb,num_mode=multiple,xmin=0,ymin=0,width=$px,\
height=$py,panel_margin=0,step_margin=0.0787401575,gold_plate=no,\
gold_side=right,orientation=horizontal,evaluate=no,active_margins=yes,\
top_active=0.511811,bottom_active=0.511811,left_active=0.511811,\
right_active=0.511811,step_xy_margin=no,step_margin_x=0.0787401575,\
step_margin_y=0.0787401575
COM set_attribute,type=step,job=$job,name1=$step,name2=,name3=,\
attribute=.pnl_class,value=,units=inch
COM set_attribute,type=step,job=$job,name1=$step,name2=,name3=,\
attribute=.pnl_pcb,value=pcb,units=inch
###########################################################################info
COM info,out_file=c:/tmp/wlayer,write_mode=replace,\
args=-t layer -e $JOB/$STEP/drl-2 -d exists
source c:/tmp/wlayer
COM info,out_file=c:/tmp/wstep,write_mode=replace,\
args=-t step -e $JOB/$step
source c:/tmp/wstep
COM info,out_file=c:/tmp/wdrl,write_mode=replace,\
args=-t layer -e $JOB/pcb/drl
source c:/tmp/wdrl
COM info,out_file=c:/tmp/wmatrix,write_mode=replace,\
args=-t matrix -e $JOB/matrix
source c:/tmp/wmatrix
#########################################################################add drill
COM affected_layer,mode=all,affected=no
COM clear_layers
COM affected_layer,name=drl,mode=single,affected=yes
set t=-1
set addyks = `echo "scale=10;$gSR_LIMITSymin" | bc`
foreach i (`echo $gTOOLdrill_size`)
@ t ++
set addx = `echo "scale=10;$gSR_LIMITSxmax + 0.196850" | bc`
set addy = `echo "scale=10;$addyks + $i/1000 + 0.078" | bc`
set addyks = $addy
COM add_pad,attributes=no,x=$addx,y=$addy,symbol=r$i,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
end
set wky = `echo "scale=10;$gSR_LIMITSymax + 0.11811" | bc`
set syp1x = `echo "scale=10;$gSR_LIMITSxmax + 0.236220" | bc`
set syp1y = `echo "scale=10;$gSR_LIMITSymax + 0.236220" | bc`
set syp2x = `echo "scale=10;$gSR_LIMITSxmax + 0.236220" | bc`
set syp2y = `echo "scale=10;$gSR_LIMITSymax + 0.000000" | bc`
set syp3x = `echo "scale=10;$gSR_LIMITSxmax + 0.236220" | bc`
set syp3y = `echo "scale=10;$gSR_LIMITSymin - 0.236220" | bc`
set syp4x = `echo "scale=10;$gSR_LIMITSxmin - 0.236220" | bc`
set syp4y = `echo "scale=10;$gSR_LIMITSymin - 0.236220" | bc`
set syp5x = `echo "scale=10;$gSR_LIMITSxmin - 0.236220" | bc`
set syp5y = `echo "scale=10;$gSR_LIMITSymax + 0.236220" | bc`
COM add_text,attributes=no,type=canned_text,x=$gSR_LIMITSxmin,y=$wky,\
text=$job,x_size=0.227,y_size=0.265,w_factor=2.624671936,polarity=positive,\
angle=0,mirror=no,fontname=canned_67,bar_type=UPC39,bar_char_set=full_ascii,\
bar_checksum=no,bar_background=no,bar_add_string=no,bar_add_string_pos=top,\
bar_width=0.008,bar_height=0.175,ver=1
COM add_pad,attributes=no,x=$syp1x,y=$syp1y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp2x,y=$syp2y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp3x,y=$syp3y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp4x,y=$syp4y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp5x,y=$syp5y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
switch ($st)
case 1:
breaksw
case 2:
set pxgk1x = `echo "scale=10;$gSR_LIMITSxmin/2 + $gSR_LIMITSxmax/2" | bc`
set pxgk1y = `echo "scale=10;$gSR_LIMITSymax + 0.23622" | bc`
set pxgk2x = `echo "scale=10;$gSR_LIMITSxmin - 0.23622" | bc`
set pxgk2y = `echo "scale=10;$gSR_LIMITSymin/2 + $gSR_LIMITSymax/2" | bc`
COM add_pad,attributes=no,x=$pxgk1x,y=$pxgk1y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$pxgk2x,y=$pxgk2y,symbol=r125,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
breaksw
endsw
#####if end
COM affected_layer,mode=all,affected=no
COM clear_layers
###########################################################################add sypad
foreach i (`echo $gROWrow`)
if ( $gROWcontext[$i] == board && $gROWlayer_type[$i] != drill && $gROWlayer_type[$i] != rout ) then
COM affected_layer,name=$gROWname[$i],mode=single,affected=yes
COM add_pad,attributes=no,x=$syp1x,y=$syp1y,symbol=sypad,polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp2x,y=$syp2y,symbol=sypad,polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp3x,y=$syp3y,symbol=sypad,polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp4x,y=$syp4y,symbol=sypad,polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$syp5x,y=$syp5y,symbol=sypad,polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM affected_layer,mode=all,affected=no
COM clear_layers
endif
end
#################################################################################add fn
foreach i (`echo $gROWrow`)
if ( $gROWcontext[$i] == board && $gROWlayer_type[$i] != drill && $gROWlayer_type[$i] != rout ) then
switch ($gROWside[$i])
case top:
set mirr = no
set fnx = `echo "scale=10;$gSR_LIMITSxmin" | bc`
set fny = `echo "scale=10;$gSR_LIMITSymin -0.25" | bc`
breaksw
case bottom:
set mirr = yes
set fnx = `echo "scale=10;$gSR_LIMITSxmin + 2.5" | bc`
set fny = `echo "scale=10;$gSR_LIMITSymin -0.25" | bc`
breaksw
case inner:
if ( $gROWfoil_side[$i] == bottom ) then
set mirr = yes
set fnx = `echo "scale=10;$gSR_LIMITSxmin + 2.5" | bc`
set fny = `echo "scale=10;$gSR_LIMITSymin -0.25" | bc`
else
set mirr = no
set fnx = `echo "scale=10;$gSR_LIMITSxmin" | bc`
set fny = `echo "scale=10;$gSR_LIMITSymin -0.25" | bc`
endif
breaksw
endsw
set date = `date +%Y/%m/%d`
set filename = `echo F/Njob $gROWname[$i] $usename $date '8888' | tr '[a-z]' '[A-Z]'`
COM affected_layer,name=$gROWname[$i],mode=single,affected=yes
COM add_text,attributes=no,type=string,x=$fnx,y=$fny,\
text=$filename,x_size=0.07,y_size=0.1,w_factor=0.8333333135,\
polarity=positive,angle=0,mirror=$mirr,fontname=standard,bar_type=UPC39,\
bar_char_set=full_ascii,bar_checksum=no,bar_background=yes,bar_add_string=yes,\
bar_add_string_pos=top,bar_width=0.008,bar_height=0.2,ver=1
COM affected_layer,mode=all,affected=no
COM clear_layers
endif
end
#################################################################################add bb
COM affected_layer,mode=all,affected=no
COM clear_layers
set bbx1 = 0.047
set bby1 = 0.047
set bbx2 = 0.047
set bby2 = `echo "scale=0;($py - 0.4)/1 + 0.047" | bc`
set bbx3 = `echo "scale=0;($px - 0.4)/1 + 0.047" | bc`
set bby3 = 0.047
foreach i (`echo $gROWrow`)
if ( $gROWcontext[$i] == board && $gROWlayer_type[$i] != drill && $gROWlayer_type[$i] != rout ) then
COM affected_layer,name=$gROWname[$i],mode=single,affected=yes
COM add_pad,attributes=no,x=$bbx1,y=$bby1,symbol=bb,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$bbx2,y=$bby2,symbol=bb,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM add_pad,attributes=no,x=$bbx3,y=$bby3,symbol=bb,\
polarity=positive,angle=0,mirror=no,nx=1,ny=1,dx=0,dy=0,xscale=1,yscale=1
COM affected_layer,mode=all,affected=no
COM clear_layers
endif
end
#################################################################################fillcu
COM fill_params,type=solid,origin_type=datum,solid_type=fill,min_brush=10,use_arcs=yes,symbol=lj,dx=0.2,dy=0.2,break_partial=yes,cut_prims=no,outline_draw=no,outline_width=0,outline_invert=no
foreach i ($gROWrow)
if ( $gROWlayer_type[$i] == signal && $gROWcontext[$i] == board && $gROWside[$i] != inner ) then
set fillculayer = $gROWname[$i]
COM affected_layer,mode=all,affected=no
COM clear_layers
COM affected_layer,name=$fillculayer,mode=single,affected=yes
COM sr_fill,polarity=positive,step_margin_x=-0.393,step_margin_y=-0.393,\
step_max_dist_x=10,step_max_dist_y=10,sr_margin_x=0.1181,sr_margin_y=0.1181,\
sr_max_dist_x=0,sr_max_dist_y=0,nest_sr=yes,consider_feat=yes,\
feat_margin=0.01,consider_drill=no,drill_margin=0,consider_rout=no,\
dest=affected_layers,layer=,attributes=no
endif
end
COM affected_layer,mode=all,affected=no
COM clear_layers
######################################fill inner
foreach i ($gROWrow)
if ( $gROWlayer_type[$i] != solder_paste && $gROWlayer_type[$i] != silk_screen && $gROWlayer_type[$i] != solder_mask && $gROWlayer_type[$i] != rout &&$gROWlayer_type[$i] != drill && $gROWcontext[$i] == board && $gROWside[$i] == inner ) then
COM fill_params,type=pattern,origin_type=datum,solid_type=surface,min_brush=1,use_arcs=yes,symbol=lj,dx=0.2,dy=0.2,break_partial=yes,cut_prims=no,outline_draw=no,outline_width=0,outline_invert=no
COM sr_fill,polarity=positive,step_margin_x=0.0393701,step_margin_y=0.0393701,step_max_dist_x=10,step_max_dist_y=10,sr_margin_x=0.1181,sr_margin_y=0.1181,sr_max_dist_x=0,sr_max_dist_y=0,nest_sr=yes,consider_feat=yes,feat_margin=0.01,consider_drill=no,drill_margin=0,consider_rout=no,dest=layer_name,layer=$gROWname[$i],attributes=no
endif
end
COM affected_layer,mode=all,affected=no
COM clear_layers
不错,顶一下
看不懂,能否指点一下.
dssjkfsdljksdfl
可以,顶一下
顶啊
比较基础的,适合刚学看看,支持一下。
有没有教材啊?放些上去哦,谢谢
对这个有兴趣的朋友加我qq 190170444
可以啊 ,请教一下咯!575883261
不错不错
为什么不用 Perl-TK 编写呢...?
不错,受益良多
可以,顶一下
内行看门道,外行看热闹...
我也想请教一下啊!
有谁用过,说一下
不错不错!
谢谢小编分享!
脚本值得学习!
顶一下啊!
不错,顶一下
不错,学习一下
不太明白?
不错,顶一下
ding!
11!11