This document presents FRi3D, a novel 3D model of coronal mass ejections (CMEs) that incorporates key aspects of their structure and evolution, such as expansion, deflection, rotation, pancaking, and magnetic field configuration. The model describes CMEs as continuously analytic magnetic flux ropes that can reproduce observed deformations. It fits white-light and in-situ observations of real CMEs better than existing models by capturing their pancaked shape and larger impact distance. The FRi3D model has various applications including space weather forecasting and input to MHD simulations.