diff --git a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx index ebcc0e2572..eb52042103 100755 --- a/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx +++ b/src/BRepClass3d/BRepClass3d_SolidExplorer.cxx @@ -580,9 +580,18 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P, else if(myParamOnEdge==0.2) myParamOnEdge = 0.8; else if(myParamOnEdge==0.8) myParamOnEdge = 0.1; else if(myParamOnEdge==0.1) myParamOnEdge = 0.9; - else { myParamOnEdge*=0.5; } - - + // + else { + myParamOnEdge*=0.5; + if(myParamOnEdge < 0.0001) { + gp_Pnt PBidon(P.X()+1.0,P.Y(),P.Z()); + gp_Vec V(P,PBidon); + Par= 1.0; + _Par=Par; + L = gp_Lin(P,V); + return 0; + } + } } //-- for(;;) { ... } } diff --git a/tests/bugs/modalg_5/bug24242 b/tests/bugs/modalg_5/bug24242 new file mode 100644 index 0000000000..6e951a72a1 --- /dev/null +++ b/tests/bugs/modalg_5/bug24242 @@ -0,0 +1,11 @@ +puts "============" +puts "OCC24242" +puts "============" +puts "" +############################################################################ +# Hang-up during classification a 3D point relative to a solid +############################################################################ + +restore [locate_data_file bug24242_sx] b1 +point p 14.3213918 20. 20. +bclassify b1 p