0030348: Shape Healing - ShapeFix_Wire::FixEdgeCurves() throws Standard_OutOfRange...
authorkgv <kgv@opencascade.com>
Tue, 6 Nov 2018 16:42:22 +0000 (19:42 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 9 Nov 2018 14:32:41 +0000 (17:32 +0300)
Call FixClosed() instead of out-of-range FixConnected() at the last edge.

src/ShapeFix/ShapeFix_Wire.cxx

index e5b273d..4bb06b1 100644 (file)
@@ -757,7 +757,14 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
           sbwd->Remove ( i-- );
           nb--;
           myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
-          FixConnected (i + 1, Precision());
+          if (i == nb)
+          {
+            FixClosed (Precision());
+          }
+          else
+          {
+            FixConnected (i + 1, Precision());
+          }
         }
        myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
       }