We present a study of the pinning of a contact line on a surface disco
ntinuity lying on the boundary between two surfaces with different wet
tabilities. We examine here the case of a non-rectilinear boundary whi
ch is the most frequent case as has been shown by AFM. The observation
of liquid fronts pinned on the frontier shows different kinds of beha
viour: either the liquid follows the exact profile of the boundary eve
n at a small scale, or it is only partially anchored. We propose a the
oretical model in the case of a purely sinusoidal boundary, that predi
cts four different regimes of pinning. The experimental study, which n
eeded the preparation of such model systems, confirmed the main result
s of the model. In particular, we have shown that the most important p
arameter is the product of the amplitude of the sinusoid and its wavev
ector.