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
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++)
{
--- /dev/null
+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