diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index 1bc4318172..f891ab9b60 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -1899,6 +1899,10 @@ Standard_Boolean BRepLib:: TShort_Array1OfShortReal& aNormArr1 = aPT1->ChangeNormals(); TShort_Array1OfShortReal& aNormArr2 = aPT2->ChangeNormals(); + if (aPTEF1->Nodes().Lower() != aPTEF2->Nodes().Lower() || + aPTEF1->Nodes().Upper() != aPTEF2->Nodes().Upper()) + continue; + for(Standard_Integer anEdgNode = aPTEF1->Nodes().Lower(); anEdgNode <= aPTEF1->Nodes().Upper(); anEdgNode++) { diff --git a/tests/bugs/modalg_6/bug27391 b/tests/bugs/modalg_6/bug27391 new file mode 100644 index 0000000000..7b8905f26e --- /dev/null +++ b/tests/bugs/modalg_6/bug27391 @@ -0,0 +1,10 @@ +puts "============" +puts "OCC27391" +puts "============" +puts "" +###################################################### +# BRepLib::EnsureNormalConsistency() raises exception in case of asynchronious PolygonOnTriangulation problem +###################################################### + +restore [locate_data_file bug27391_Ficomirrors_ExportBinMoldflow.brep] a +correctnormals a