  We analyze the superconducting gap in semiconductor/superconductor nanowires
under orbital effects of a magnetic field in the weak- and strong-hybridization
regimes using an universal procedure that guarantees the stationarity of the
system -- vanishing of the supercurrent induced by spatially varying vector
potential. We perform minimization of the free energy with respect to the
vector potential which allows to account for the orbital effects even for
systems with intrinsically broken spatial symmetries. For the experimentally
relevant scenario of a strongly coupled semiconductor/superconductor, where the
wave function of the charge carriers hybridizes between the two materials, we
find that the gap closes due to the orbital effects in a sizable magnetic field
compatible with the the recent experimental report [S. M. Albrecht, et al.,
Nature 531, 206 (2016)].
