We present a 3D deep learning framework that can generate a complete cranial model using a defective one. The Boolean subtraction between these two models automatically generates the geometry of the implant required for surgical reconstruction. There is little or no need for post-processing to eliminate noise in the implant model generated by the proposed approach. The framework can be used to meet the repair needs of cranial imperfections caused by trauma, congenital defects, plastic surgery, or tumor resection. Traditional implant design methods for skull reconstruction rely on the mirror operation. However, these approaches have great limitations when the defect crosses the plane of symmetry or the patient's skull is asymmetrical. The proposed deep learning framework is based on an enhanced three-dimensional autoencoder. Each training sample for the framework is a pair consisting of a cranial model converted from CT images and a corresponding model with simulated defects on it. Our approach can learn the spatial distribution of the upper part of normal cranial bones and use flawed cranial data to predict its complete geometry. Empirical research on simulated defects and actual clinical applications shows that our framework can meet most of the requirements of cranioplasty.