The shaping and focusing of a Ne7+ ion beam by transmission through an array of nanocapillaries of rectangular cross section in mica is studied both by experiments and simulations. The transmitted angular profiles of the beam are measured as they develop with charging-up the rectangular capillaries by ion impact and compared with rhombic capillaries of different parameters in mica. Thereby it is found that the profiles after transmission through rectangular capillaries degrade with charging them up. This is in contrast to our previous findings [Phys. Rev. A.86, 022,901 (2012)] with rhombic capillaries, where the transmitted angular profiles only shift by charging-up. The reasons for that and the features of the tailored shapes of the transmitted ion beams will be discussed here, supported by simulations.