Using the waveguide mesh in modelling 3D resonators