A method for producing a dental shaped body from a blank that has a corpus of tooth restoration material by a tool adapted to remove the material. To detect a position of the corpus inserted in a machining device, contact scanning is performed on the blank by the tool. At least one dimension of the blank corpus is detected, and the machining tool is prepositioned for a contacting operation according to the detected at least one dimension of the blank corpus.