It is shown how discontinuities such as sharp bends, offsets and steps in optical waveguides can be analysed with the method of lines. 3-D results for rib-waveguide bends and offsets are presented. It is shown that even a small bend angle results in remarkable transmission loss.