The invention relates to a surgical method of attachment of a first bony segment in relation with a second bony segment, both segments belonging to a same bone, which comprises the steps of:milling said bone and cutting it partially, to separate it in two bony segments linked together by a bony hingedistracting both bony segments around said hingefitting an osteotomy implant into the cavity thus obtainedattaching said implant to both bony segmentswherein it comprises the preoperative steps of:determining the position and the direction of the future partial cut, calculating its depth, calculating the relative three-dimensional positions of both bony segments to obtain the final desired alignment of the two bony segments,choosing among several osteotomy implants, one which is wider than the largest distance between the facing sides of said bony segments after distraction,determining the position and the shape of the future implant reception cavity and calculating its dimensions,deducing therefrom the shape of the two part cavities to be milled in the bone before the distraction step.