PCB抄板之PROTEL到ALLEGRO的转换技巧
|
if (fp1==NULL) ::AfxMessageBox("Can not open the file!!!"); fp2=fopen("place.txt","wt"); if (fp2==NULL) ::AfxMessageBox("Can not create the file!!!"); char refdes[5], Pattern[5]; float midx,midy,refx,refy,padx,pady,rotation; char tb[1]; char tmp='"'; fprintf(fp2,"%s\n", "# Allegro script"); fprintf(fp2,"%s\n", "version 13.6"); fprintf(fp2,"%s\n", "place refdes"); while (!feof(fp1)) { fscanf(fp1,"%s", refdes); fscanf(fp1,"%s", Pattern); fscanf(fp1,"%f", &midx); fscanf(fp1,"%f", &midy); fscanf(fp1,"%f", &refx); fscanf(fp1,"%f", &refy); fscanf(fp1,"%f", &padx); fscanf(fp1,"%f", &pady); fscanf(fp1,"%s", tb); fscanf(fp1,"%f", &rotation); fprintf(fp2, "fillin %c%s%c \n",tmp,refdes,tmp); if (rotation!=0) { fprintf(fp2, "rotate\n"); fprintf(fp2, "iangle %f\n", rotation); }; char yy=tb[0]; if (yy!='T') fprintf(fp2, "pop mirror\n"); fprintf(fp2, "pick %f %f \n", padx,pady); fprintf(fp2, "next \n"); }; fprintf(fp2, "done"); fclose(fp1); fclose(fp2); |
<< SMT 110问开发无铅焊接工艺的五个步骤 >>
查看所有评论




世纪芯是一支由众多技术研发专家和科研企业结盟组成了技术服务型团队,自组建以来一直帮助政府、知名科研机构以及国内众多抄板企业攻克技术难题,10年来,我们专注反向技术研究并不断挑战大型疑难项目,目前已经成为国内抄板企业的中流砥柱。