Rectangle2D ref=new Rectangle2D.Double(config.getPertXOffset(),config.getPertYOffset(),config.getPertCellWidth(),config.getPertCellHeight());
int row=0;
int col=-1;
setEmpty();
for (Iterator i=cache.getIterator();i.hasNext();){
GraphicNode current=(GraphicNode)i.next();
int currentCol=cache.getPertLevel(current)-1;
if (currentCol<=col) row++;
col=currentCol;
TexturedShape texturedShape=findShape(current);
if (texturedShape==null) continue;
double centerX=origin.getX()+ref.getMaxX()*col+ref.getWidth()/2;
double centerY=origin.getY()+ref.getMaxY()*row+ref.getHeight()/2;
//System.out.println(centerX+"/"+centerY);
GeneralPath shape=texturedShape.toGeneralPath(ref.getWidth(),ref.getHeight(),centerX-ref.getWidth()/2,centerY,null);
current.setPertShape(shape,centerX,centerY);
Rectangle cellBounds=network.scale(shape.getBounds());
if (isEmpty())
bounds.setBounds(cellBounds);
else Rectangle.union(bounds,cellBounds,bounds);
}