The invention discloses a roof prism machining technology, and relates to the technical field of roof prism machining. The technology comprises the following machining steps that S01, a roof prism blank is taken, and firstly the blank is ground to be provided with two side surfaces; S02, a large surface of the roof prism blank is ground and polished, and a surface where a roof ridge is located ismachined; S03, the surface where the roof ridge is located is used for positioning, and grinding and polishing are conducted to obtain two right-angle surfaces; and S04, the side surfaces are used forpositioning, and grinding and polishing are carried out to obtain two roof ridge surfaces. According to the technology, each surface is machined in place at a time, the production procedures are reduced by nearly a half, the efficiency is improved by about one time, meanwhile, superposition of manual operation errors in the grinding process and the polishing process is reduced, in addition, the surfaces where the side surfaces and the roof ridge are located are subjected to finish machining before the right-angle surfaces and the roof ridge surfaces are machined, the two surfaces serve as reference faces to be used for positioning and machining the right-angle surfaces and the roof ridge surfaces, and the product precision and the percent of pass are greatly improved.