With the continuous development and improvement of computer simulation technology, computer simulation analysis has become an important means for judging the feasibility of casting process design. But computer consumption is also gradually increasing due to the more complex castings, the huge computation quantity and the long cycle of casting process design. Therefore, in order to reduce the computer consumption, a new method for optimal riser design based on geometric reasoning method and fruit fly optimization algorithm in CAD is proposed in this paper. The main focus of the method is to carry out the initial process optimization design of riser purely taking into account the casting geometry based on CAD techniques. Firstly, geometric reasoning method based on implicit surface is used to obtain every hot spot of casting. Secondly, the open source CAD application (HeeksCAD) is used to compute the volume and heat transfer area of casting which need to be compensated. Thirdly, fruit fly optimization algorithm (FOA) is used to optimize the riser geometric sizes. A cylinder sleeve casting is taken as an example to illustrate the feasibility of the methodology. Finally, numerical modeling method confirms the validity of the implementation of the new methodology for optimal riser design. The results indicate that the method could be useful in cutting down the expense and time of casting production cycle, particularly for casting process optimization stage.