In the stability assessment of geotechnical engineering, predicting the spatial distribution of cracks on joint surfaces is a key but unresolved issue. This study combines direct shear tests with machine learning methods to analyze the influence of surface shape on the shear failure behavior. Based on the Naive Bayes classifier, a prediction model was constructed. Under constant normal force conditions, direct shear tests were conducted on tooth-shaped artificial joints. For natural marble joints, a quantitative characterization method was developed through three-dimensional laser scanning and image morphology processing, from which two predictive variables were extracted: effective field of view area and relative height. The results showed that the inclination angle and bulge height significantly affected the shear mobility, crack development process, and expansion behavior. Moreover, as the normal force increased, the crack pattern shifted from a progressive development to a co-developing trend. Subsequently, a Gaussian Naive Bayes classifier was constructed and evaluated through five-fold cross-validation, achieving an accuracy of 86.72% and a cross-validation loss of 0.028. Preliminary tests using independent combined samples indicated that the model can predict the spatial distribution of failure with a reasonable probability under similar test conditions. However, to achieve wider application, further verification is still needed on different rock types, stress levels, and larger datasets. By combining three-dimensional morphological features with probabilistic modeling, this intelligent method provides a new framework for quantitative analysis of shear fractures in crack structures, not only supporting theoretical research but also assisting in the practical assessment of the susceptibility to landslides in mountain engineering.