According to an embodiment, a computer program product comprising program code means for causing a data processing system to perform a method for generating and modifying a virtual model of a set of teeth when said program code means are executed on a data processing system is disclosed. The method includes generating a virtual model of the set of teeth from a 3D representation of the set of teeth; obtaining a virtual model of a restoration; and modifying a gingival part of the virtual model of the set of teeth based on the virtual model of said restoration such that the virtual model of the restoration can be virtually inserted into said virtual region.