The constructive solid geometry (CSG) method is widely used in the Monte Carlo community because of its geometry flexibility. As the requirements of designing new reactors and development of deterministic methods, the CSG method is adopted for the geometry modeling in the deterministic numerical nuclear reactor physics codes to construct complex geometries in recent years. In the new developed numerical nuclear reactor physics code NECP-X, the CSG method is also implemented to expand its geometric modeling capability, but it is difficult to efficiently calculate the volume of complex geometries. This work develops a new efficient method for calculating volume of arbitrarily complex geometries for NECP-X. Rather than implementing the sampling method, the new developed method is based on the characteristic ray information, which is used for the method of characteristics (MOC) sweeping in NECP-X. The implementation shows that this method is very convenient to be applied to the MOC codes. A set of cases such as pin-cell and hexagonal rod-bundle assembly problems are tested to show the accuracy and performance.