Disclosed is a method of virtually designing a post and core restorationadapted for attachment in a damaged tooth of a patient, where the damagedtooth comprises a bore for receiving the post of the post and core, whereinthe method comprises:- obtaining a first 3D scan comprising at least a part of the damaged tooth;- providing a digital 3D shape adapted to fit the bore of the damaged tooth;- virtually matching the first 3D scan of the tooth and the digital 3D shape,where the matching comprises matching a surface region in the first 3D scanof the tooth with a corresponding surface region of the digital 3D shape, suchthat at least part digital 3D shape is represented relative to the first 3Dscanof the tooth;- virtually designing the post and core restoration based on therepresentation of the digital 3D shape relative to the first 3D scan of thetooth.