Generalized modelling of flexible machining system with arbitrary tool geometry