The reason of the exception has been eliminated
Test-cases for issue #26281
while (val <= Eps) {
KnotIndex++;
+
+ if(KnotIndex >= Knots.Upper())
+ break;
+
K1 = K2;
K2 = knots[KnotIndex + 1];
val = K2 - K1;
if(ip < PLowerRow)
ip = PUpperRow;
+ if(ip > PUpperRow)
+ ip = PLowerRow;
+
for (j = 0; j <= d2; j++)
{
const gp_Pnt& P = Poles.Value(ip,jp);
--- /dev/null
+puts "========"
+puts "OCC26281"
+puts "========"
+puts ""
+####################################################################
+# BRepCheck_Edge::Tolerance() raises exception on the given shapes
+####################################################################
+
+restore [locate_data_file OCC26281_a_6055.brep] a
+computetolerance a
--- /dev/null
+puts "========"
+puts "OCC26281"
+puts "========"
+puts ""
+####################################################################
+# BRepCheck_Edge::Tolerance() raises exception on the given shapes
+####################################################################
+
+restore [locate_data_file OCC26281_a_6213.brep] a
+computetolerance a