Reliable optical critical dimension (OCD) metrology in the regime where the inspection wavelength λ is much larger than the critical dimensions (CDs) of the measurand is only possible using a model-based approach. Due to the complexity of the models involved, that often require solving Maxwell's equations, many applications use a library based look-up approach. Here, the best experiment-to-theory fit is found by comparing the measurement data to a library consisting of pre-calculated simulations. One problem with this approach is that it makes the accuracy of the solution dependent on the refinement of the grid. Interpolating between library values requires a uniform grid in most cases, and can also be very time-consuming. We present an approach based on radial basis functions that is fast, accurate and most importantly works on arbitrary grids. The method is implemented in a application based on the programming language R, that additionally allows for Bayesian data analysis, and provides multiple diagnostics.