Commit 1b8095c2 authored by dauncey's avatar dauncey

First reorganisation of geometry files for 8 inch wafers

parent fd5c2663
This diff is collapsed.
static unsigned pairWafer(uint32_t l, std::pair<int,int> &p) {
for(unsigned w(0);w<numberOfWafers(l);w++) {
if(validWafer(l,w)) {
if(waferPair(l,w)==p) return w;
}
}
return 0xffffffff;
}
static unsigned point2DWafer(uint32_t l, Point2D p) { /* method */
int ix(0.5+2.0*p.x()/fWaferWidth);
if(p.x()<0.0) ix=-0.5+2.0*p.x()/fWaferWidth;
int iy(0.5+2.0*p.y()/fWaferHeight);
if(p.y()<0.0) iy=-0.5+2.0*p.y()/fWaferHeight;
// Search around this area
int wMin(0xffffffff);
double rhoMin(1.0e12);
std::pair<int,int> pxy;
for(int jx(ix-2);jx<=(ix+2);jx++) {
pxy.first=jx;
for(int jy(iy-2);jy<=(iy+2);jy++) {
pxy.second=jy;
unsigned w(pairWafer(l,pxy));
if(w<0xffffffff) {
Point2D dp(waferPoint2D(l,w)-p);
if(rhoMin>dp.rho()) {
rhoMin=dp.rho();
wMin=w;
}
}
}
}
return wMin;
}
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment