Hello All,
today I noticed the often used ULP "Array_Board_V52" has a minor
drawback: polygons that contain curves (and not only straight lines)
have the curves replaced with simple lines.
Link: http://www.cadsoft.de/downloads/file/array_board_v52.zip
This is because the "@radius" or "curve" parameter is stripped or not
printed to the intermediate script.
Reading the source I found this at lines 192ff:
s.polygons(p) {
wid=p.width/GridDivisor;
isol=p.isolate/GridDivisor;
printf("change layer %d;\n",p.layer);
printf("change isolate %f;\n",isol);
printf("change rank %d;\n",p.rank);
printf("change thermals %s;\n",onoff[p.thermals]);
printf("change orphans %s;\n",onoff[p.orphans]);
printf("change pour %s;\n",pour[p.pour]);
if(cmn==0) printf("polygon %s%s%d%d %f",s.name,suffix,i,j,wid);
else printf("polygon %s %f",s.name,wid);
p.wires(w){
xx1= w.x1/GridDivisor+dx;
yy1= w.y1/GridDivisor+dy;
xx2= w.x2/GridDivisor+dx;
yy2= w.y2/GridDivisor+dy;
printf(" (%f %f)",xx1,yy1);
}
printf(" (%f %f);\n",xx2,yy2);
}
}
starting at "p.wires(w){...}" is the problem in my opinion. There is
nothing that detects and prints out the @radius or curve parameters.
As I did not understand the internal data structure accessed here I was
not able to fix that. It looks like there needs to be an if-statement
checking if the current polygon segment is a line or a curve and
printing the radius if required.
Could anybody please give a hint? Unfortunately no clue where to start.
Any help really appreciated. Thanks, best regards.
Stefan Langer