From: isn Date: Thu, 9 Jun 2016 14:30:26 +0000 (+0300) Subject: 0027391: BRepLib::EnsureNormalConsistency() raises exception in case of asynchronious... X-Git-Tag: V7_0_winwerth~6 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9d671cd1b05a1289d3f836ae2c191e26b943f287;p=occt-copy.git 0027391: BRepLib::EnsureNormalConsistency() raises exception in case of asynchronious PolygonOnTriangulation problem additional check have been added to BRepLib::EnsureNormalConsistency() func. Any edges with two adjacent faces will be skipped (while updating of their normals) if the number of discretization points (nodes) will be different for each of this faces on this edge. test case --- 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