Many cell functions rely on the ability of microtubules to self-organize as complex networks. In plants, cortical microtubules are essential to determine cell shape as they guide the deposition of cellulose microfibrils, and thus control mechanical anisotropy of the cell wall. Here we analyze how, in turn, cell shape may influence microtubule behavior. Building upon previous models that confined microtubules to the cell surface, we introduce an agent model of microtubules enclosed in a three-dimensional volume. We show that the microtubule network has spontaneous aligned configurations that could explain many experimental observations without resorting to specific regulation. In particular, we find that the preferred cortical localization of microtubules emerges from directional persistence of the microtubules, and their interactions with each other and with the stiff wall. We also identify microtubule parameters that seem relatively insensitive to cell shape, such as length or number. In contrast, microtubule array anisotropy depends on local curvature of the cell surface and global orientation follows robustly the longest axis of the cell. Lastly, we find that geometric cues may be overcome, as the network is capable of reorienting toward weak external directional cues. Altogether our simulations show that the microtubule network is a good transducer of weak external polarity, while at the same time, easily reaching stable global configurations.