diff --git a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx index 332be97de3..429a18035f 100644 --- a/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx +++ b/src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx @@ -269,11 +269,17 @@ namespace for (; aIntervalU <= theIntervals[0].Upper (); ++aIntervalU) { const Standard_Real aParamU = theIntervals[0].Value(aIntervalU); + if (Precision::IsInfinite (aParamU)) + continue; + Standard_Integer aIntervalV = theIntervals[1].Lower (); for (; aIntervalV <= theIntervals[1].Upper (); ++aIntervalV) { gp_Dir aNorm; const Standard_Real aParamV = theIntervals[1].Value(aIntervalV); + if (Precision::IsInfinite (aParamV)) + continue; + if (GeomLib::NormEstim (theSurf, gp_Pnt2d (aParamU, aParamV), Precision::Confusion (), aNorm) != 0) { return Standard_True; diff --git a/tests/bugs/mesh/bug31258 b/tests/bugs/mesh/bug31258 new file mode 100644 index 0000000000..d5a716f80e --- /dev/null +++ b/tests/bugs/mesh/bug31258 @@ -0,0 +1,16 @@ +puts "=======" +puts "0031258: Mesh - OCCT 7.4.0 VIS get wrong render data" +puts "=======" +puts "" + +restore [locate_data_file bug31258.brep] result +tclean result + +vinit +vsetdispmode 1 +vdisplay result +vfit + +checktrinfo result -tri 166 -nod 102 + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png