View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024193 | Community | OCCT:Modeling Algorithms | public | 2013-09-19 14:17 | 2013-12-19 13:58 |
Reporter | Mauro Mariotti | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2010 | ||
Product Version | 6.6.0 | ||||
Target Version | 6.7.0 | Fixed in Version | 6.7.0 | ||
Summary | 0024193: Useless iterations in IntStart_SearchOnBoundaries_1.gxx | ||||
Description | See www.opencascade.org/org/forum/thread_25313/ Please look at the following code (release 6.6.0, file ros\inc\IntStart_SearchOnBoundaries_1.gxx around line 200, function BoundedArc()). 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<=6;i++) { Standard_Real F,D; if(Func.Values(ur,F,D)) { Standard_Real lminr,lmaxr; if(D<0.0) D=-D; D*=dur+dur; if(D>maxdr) maxdr=D; lminr=F-D; lmaxr=F+D; if(lminr<minr) minr=lminr; if(lmaxr>maxr) maxr=lmaxr; if(minr<0.0 && maxr>0.0) { Rejection=Standard_False; continue; } } ur+=dur; } The intent seems just to set the Rejection variable. The others are used just locally. I suggest to replace "continue" with "break" | ||||
Steps To Reproduce | I have seen it while debugging | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
CR24193 is ready for testing Inplementation of Mariotti's proposal to avoid useless iterations |
|
CR24193 is ready for testing Inplementation of Mariotti's proposal to avoid useless iterations |
|
Dear BugMaster, Branch CR24193 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: becd6f88b55e34b3f5f7e663d806181feb4769a7 Number of compiler warnings: occt component : Linux: 370 (370 on master) Windows: 6 (6 on master) products component : Linux: 1909 (191 on master) Windows: 287 (287 on master) Regressions/Differences: No regressions/differences Testing cases: Not needed Testing on Linux: Total MEMORY difference: 353384208 / 353462608 Total CPU difference: 49098.10000000084 / 43493.85000000097 Testing on Windows: Total MEMORY difference: 406921864 / 407092388 Total CPU difference: 28907.859375 / 30173.609375 There are not differences in images found by testdiff. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-19 14:17 | Mauro Mariotti | New Issue | |
2013-09-19 14:17 | Mauro Mariotti | Assigned To | => ifv |
2013-10-17 14:11 |
|
Status | new => assigned |
2013-10-17 14:14 |
|
Note Added: 0026118 | |
2013-10-17 14:14 |
|
Status | assigned => resolved |
2013-10-17 14:15 |
|
Note Added: 0026120 | |
2013-10-17 14:15 |
|
Status | resolved => reviewed |
2013-10-17 15:12 |
|
Assigned To | ifv => mkv |
2013-10-18 11:25 |
|
Note Added: 0026132 | |
2013-10-18 11:32 |
|
Test case number | => Not needed |
2013-10-18 11:32 |
|
Assigned To | mkv => bugmaster |
2013-10-18 11:32 |
|
Status | reviewed => tested |
2013-10-22 09:53 |
|
Product Version | => 6.6.0 |
2013-10-22 09:53 |
|
Target Version | => 6.7.0 |
2013-10-25 14:42 | bugmaster | Changeset attached | => occt master 78fdb3d3 |
2013-10-25 14:42 | bugmaster | Status | tested => verified |
2013-10-25 14:42 | bugmaster | Resolution | open => fixed |
2013-12-19 13:51 | bugmaster | Status | verified => closed |
2013-12-19 13:58 | bugmaster | Fixed in Version | => 6.7.0 |