After 20 years of wavefront sensors based on pyramid (PWFS), there are no straightforward ways to model such device in standard sequential ray-tracing software: modeling strategies tend to be oriented to the needs of the single user only and, in general, are unsatisfactory due to lack of flexibility. To overcome this problem, we have exploited the possibility of ZEMAXTM – one of the ray- tracing software mostly in use nowadays – to develop a user defined surface (UDS), whose properties are described in a dynamic link library (DLL) written in C language. The pyramid UDS approach greatly improves the versatility during the design and simplifies both quality and tolerance analysis. In order to prove the potentiality of our UDS-DLL surface, referred as PAM2R, we reproduced the optical layout of two PWFS systems already installed at LBT: the single-conjugate system FLAO, and the ground-layer system GWS of LINC-NIRVANA. In this proceeding we will highlight the main characteristics of the PAM2R surface, showing various results we obtained on the above case studies with the aim to establish a common design playground for the PWFS in the AO community.