Disclosed is a method of virtually designing a post and core restoration adapted for attachment in a damaged tooth of a patient, where the damaged tooth comprises a bore for receiving the post of the post and core, wherein the 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 scan of the tooth with a corresponding surface region of the digital 3D shape, such that at least part digital 3D shape is represented relative to the first 3D scan of the tooth;- virtually designing the post and core restoration based on the representation of the digital 3D shape relative to the first 3D scan of the tooth.