Usage of current iteration approximation added if necessary.
Test-case for issue #25886
if (!Ok && Abs(myfirstU-mylastU) <= TolU)
{
Ok = Standard_True; // stop interval cutting, approx the rest part
+
+ if ((thetol3d + thetol2d) < (KeptT3d + KeptT2d))
+ {
+ KeptMultiCurve = TheMultiCurve;
+ KeptUfirst = myfirstU;
+ KeptUlast = mylastU;
+ KeptT3d = thetol3d;
+ KeptT2d = thetol2d;
+ }
+
mylastU = KeptUlast;
tolreached = Standard_False; // helas
--- /dev/null
+puts "========"
+puts "OCC25886"
+puts "========"
+puts ""
+#################################################
+# Wrong result obtained by projection algorithm
+#################################################
+
+set ok_len_c3x "3.28347"
+set ok_len_c5x "3.28346"
+
+smallview -2D-
+
+restore [locate_data_file OCC25886_cx.brep] cx
+
+explode cx
+copy cx_1 f
+mksurface s f
+mkcurve c3 cx_3
+mkcurve c5 cx_5
+project c3x c3 s
+project c5x c5 s
+
+2dfit
+
+set len_c3x [string range [lindex [length c3x] 4] 0 6]
+set len_c5x [string range [lindex [length c5x] 4] 0 6]
+if {$len_c3x != $ok_len_c3x} {
+ puts "ERROR: OCC25866 is reproduced. Length of projection is $len_c3x, but expected length is $ok_len_c3x"
+}
+if {$len_c5x != $ok_len_c5x} {
+ puts "ERROR: OCC25866 is reproduced. Length of projection is $len_c5x, but expected length is $ok_len_c5x"
+}
+
+set only_screen_axo 1
CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) Summary = 685 ( 687 )
STATSHAPE : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 286 ( 288 )
-TOLERANCE : MaxTol = 0.5384357498 ( 0.5384357497 ) AvgTol = 0.009441130625 ( 0.009436309132 )
+TOLERANCE : MaxTol = 0.5386330267 ( 1.019942733 ) AvgTol = 0.009444234359 ( 0.01316262156 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 0 ( 0 )
CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 108 ( 108 ) Summary = 673 ( 673 )
STATSHAPE : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 108 ( 108 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 282 ( 282 )
-TOLERANCE : MaxTol = 0.5384357498 ( 0.5384357497 ) AvgTol = 0.01216240032 ( 0.0121742825 )
+TOLERANCE : MaxTol = 0.5386330267 ( 1.019942733 ) AvgTol = 0.01216555298 ( 0.01597193199 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 0 ( 0 )