Useless iterations in IntStart_SearchOnBoundaries_1.gxx

Hallo everybody (and especially the supervisor :-)),

it seems there is a mistake in ros\inc\IntStart_SearchOnBoundaries_1.gxx.

Please look at the following code (function BoundedArc(), around line 200, release 6.6.0).

A function Func and its derivative is evaluated at six parameter values along a curve.
If the "continue" is executed, the parameter value (ur) is NOT incremented and the same value is evaluated again (up to six times) !

//-------------------------------------------------------------- REJECTIONS le 15 oct 98
Standard_Boolean Rejection=Standard_True;
Standard_Real maxdr,maxr,minr,ur,dur;
minr=RealLast();
maxr=-minr;
maxdr=-minr;
dur=(Pfin-Pdeb)*0.2;
for(i=1,ur=Pdeb;i Standard_Real F,D;
if(Func.Values(ur,F,D)) {
Standard_Real lminr,lmaxr;
if(D D*=dur+dur;
if(D>maxdr) maxdr=D;
lminr=F-D;
lmaxr=F+D;
if(lminr if(lmaxr>maxr) maxr=lmaxr;
if(minr0.0) {
Rejection=Standard_False;
continue;
}
}
ur+=dur;
}

The "continue" should be replaced by a "break", shouldn't it?
The intent of this code snippet seems just to set the Rejection variable. All the other ones are used just locally.

Regards.
Mauro

Forum supervisor's picture

Dear Mauro,

we encourage you to register this issue in our bugtracker http://tracker.dev.opencascade.org/ It could also be great if you could provide a bugfix for this issue.

Regards,
Forum Supervisor