The transport critical current of a Niobium (Nb) thick film has been measured for a large range of magnetic field. Its value and variation are quantitatively described in the framework of the pinning of vortices due to boundary conditions at the rough surface, with a contact angle well explained by the spectral analysis of the surface roughness. Increasing the surface roughness using a Focused Ion Beam results also in an increase of the superficial critical current.