3D printing has the characteristics of layer-by-layer manufacturing, which causes high surface roughness. This paper proposes a scheme to develop a printing protocol combining layer-wise and continuous printing based on the required surface roughness. It involves four modules: model slicing, printing pattern estimation, slices adjusting and printing protocol generation. Firstly, the candidate slices are obtained by model slicing based on the required surface roughness. Secondly, the printing pattern of each slice is estimated based on the max-min distance of the corresponding slice and Maximum Filled Distance (MFD) of the printing resin material. Then, the candidate slices are adjusted based on the maximum and minimum printable thickness of the printer. Finally, the printing protocol involving slice number, slice thickness, printing pattern and printing time is generated, and the surface roughness of the printed objects using the generated printing protocol can be estimated. Two printing protocols of the model cup with different required surface roughness are automatically generated. And two objects are printed based on the corresponding printing protocols. The roughness of the printed objects is measured using the roughness tester. The average roughness of the printed objects is smaller than the required roughness because the roughness of continuous printing is small. And the error between the measured and the predicted roughness is smaller than 2 µm.