The present work focuses on the solid modeling of the church of Santa Sofia in Benevento, Italy, and is related to a multidisciplinary research project that involved methods typical to both the humanities and mathematical engineering. Starting from the history of the church and its current configuration, a twofold objective is pursued: to give a brief account of the methodology used to analyze and virtualize the main phases of Santa Sofia and to report on the problem of modeling the church vault complex. Indeed, the 3D modeling of the church presented different levels of difficulty with some parts very easy to draw and others calling for specific geometrical analysis. In particular, to reconstruct the complex system of vaults of the church, a home-made code based on remapping Coons patches was written. The resulting 3D models of the different archeological and architectural phases of Santa Sofia are an example of virtual heritage and, being a digital content, allow for immediate sharing both to the scientific community and to a general and nonexpert audience, keeping in mind that knowledge is the means used to ensure the enhancement and preservation of cultural heritage.