From 22887d12c4e2d0f9b5153fe69939544a38f96327 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 6 Nov 2018 19:42:22 +0300 Subject: [PATCH] 0030348: Shape Healing - ShapeFix_Wire::FixEdgeCurves() throws Standard_OutOfRange exception Call FixClosed() instead of out-of-range FixConnected() at the last edge. --- src/ShapeFix/ShapeFix_Wire.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ShapeFix/ShapeFix_Wire.cxx b/src/ShapeFix/ShapeFix_Wire.cxx index e5b273da3e..4bb06b163c 100644 --- a/src/ShapeFix/ShapeFix_Wire.cxx +++ b/src/ShapeFix/ShapeFix_Wire.cxx @@ -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 ); } -- 2.20.1