Protection from the out of bounds parameters is added.
Test cases are added.
Standard_Integer &theOutMinIdx,
Standard_Integer &theOutMaxIdx)
{
+ // Set initial values for the result indexes to handle situation when requested parameter space
+ // is slightly greater than B-spline parameter space.
+ theOutMinIdx = theFlatKnots.Lower();
+ theOutMaxIdx = theFlatKnots.Upper();
+
// Compute first and last used flat knots.
for(Standard_Integer aKnotIdx = theFlatKnots.Lower();
aKnotIdx < theFlatKnots.Upper();
--- /dev/null
+puts "================"
+puts "0027261"
+puts "================"
+puts ""
+###############################################################
+# Incorrect bounding box is created for the face
+##############################################################
+
+restore [locate_data_file bug27261_f1.brep] f1
+bounding f1
+
+# Visual check.
+smallview
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
--- /dev/null
+puts "================"
+puts "0027261"
+puts "================"
+puts ""
+###############################################################
+# Incorrect bounding box is created for the face
+##############################################################
+
+restore [locate_data_file bug27261_f2.brep] f2
+bounding f2
+
+# Visual check.
+smallview
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file