View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025635 | Open CASCADE | OCCT:Modeling Algorithms | public | 2014-12-22 10:18 | 2015-05-14 15:32 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Target Version | 6.9.0 | Fixed in Version | 6.9.0 | ||
Summary | 0025635: Wrong result of 2D-extrema between two ellipsis | ||||
Description | Two ellipsis are tangent each other. Therefore, extrema must be 2d-Point. However, we have another result (see SCRIPT # 1). More over, case with 2D-point processed wrong by 2d-extrema command (see SCRIPT # 2). It is a bug of DRAW-command only (extremas are computed properly). | ||||
Steps To Reproduce | SCRIPT # 1 Draw[]> ellipse c1 0 0 2 1 Draw[]> ellipse c2 4 0 2 1 Draw[]> 2dextr c1 c2 #dist 1: 0.32979086888313447 #ext_1 Draw[]> dump ext_1 #Result is wrong ############################################ SCRIPT # 2 Draw[]> circle c1 0 0 2 Draw[]> circle c2 4 0 2 Draw[]> 2dextr c1 c2 #dist 1: 4 #ext_1 dist 2: 0 #dist 3: 8 #ext_3 dist 4: 4 #ext_4 Draw[]> dump ext_2 #Empty result. However, ext_2 exists. It is marked only (in the picture of 2D-viewer). Draw[]> v2d Draw[]> 2dfit | ||||
Tags | No tags attached. | ||||
Test case number | bugs fclasses(002) bug25635_1, bug25635_2 | ||||
|
Branch CR25635 has been created by aml. SHA-1: d12276424a04ad41d6b87b0bdbbbd6d33aed4f09 Detailed log of new commits: Author: aml Date: Mon Dec 22 14:48:58 2014 +0300 0025635: Wrong result of 2D-extrema between two ellipsis Fixed Lipschitz constant evaluation in case co-parametrized objects. Fixed 2dextrema output. Testcase update to new behaviour. |
|
Dear abv, Please check current state of branch CR25635. |
|
Minor remarks on performance and robustness in math_GlobOptMin::computeInitialValues(): - there seem to be no protection against situation if myA == myB, in that case aStep would become 0 and it still serves as divisor - aPrevVal is not reset before second cycle, should not it be? - second cycle is not symmetric w.r.t. the order of variables, should not it be? - division by aStep seems to be not really necessary in cycles, this may be done once at the end - Value (myB - myA) / (aPntNb - 1) could be calculated once and then reused in each cycle. It seems that '- 1' is not needed here, and that value should be consistent with how aStep is calculated. - arguments calculated in condition of "if"s in "for" cycles at lines 317 and 332 are used in their bodies; it is better to calculate the value once. For both performance and clarity it might be better to write something like aLipConst = Max (aLipConst, Abs(aCurrVal - aPrevVal)) instead of "if" (operator "?" works faster than "if" from my experience) |
|
Branch CR25635 has been updated forcibly by aml. SHA-1: b0af211a85aa57732e9aa5b94768d85320c70a15 |
|
Dear abv, "second cycle is not symmetric w.r.t. the order of variables, should not it be?" Yes, cycle is not symmetric and it is correct. Another remarks are fixed. Please check updated branch CR25635. |
|
Alexander, please explain the formula used to calculate aCurrPnt: for(i = 1; i <= aPntNb; i++) { aCurrPnt = myA + (myB - myA) * i / (aPntNb - 1); ... } At the last iteration i = aPntNb and aCurrPnt is NOT equal to myB, while it should be, if my understanding is correct. See relevant point in my previous comment. |
|
Branch CR25635 has been updated forcibly by aml. SHA-1: 77e280a6b5a674476c92944d7d4c526b92201e07 |
|
Branch CR25635 has been updated forcibly by aml. SHA-1: 97b74f1fede13f654ce4c61c6a64eafbf80296ea |
|
Dear abv, I forgot to add this part of fix. As we discussed "(myB - myA) / aPntNb" computation moved out of cycle. Please check branch CR25635. |
|
Reviewed, please test. P.S. Though, "aStep = aParamStep.Norm();" :) |
|
Dear BugMaster, Branch CR25635 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode. SHA-1: 97b74f1fede13f654ce4c61c6a64eafbf80296ea Number of compiler warnings: occt component : Linux: 18 (18 on master) Windows: 0 (0 on master) products component : Linux: 11 (11 on master) Windows: 1 (1 on master) Regressions/Differences: No regressions/differences Testing cases: http://occt-tests.nnov.opencascade.com/CR25635-master-occt/Windows-32-VC10/bugs/fclasses/bug25635_1.html bugs fclasses(002) bug25635_1: OK http://occt-tests.nnov.opencascade.com/CR25635-master-occt/Windows-32-VC10/bugs/fclasses/bug25635_2.html bugs fclasses(002) bug25635_2: OK Testing on Linux: occt component : Total MEMORY difference: 367337528 / 367924740 Total CPU difference: 50018.94999999995 / 51486.81000000016 products component : Total MEMORY difference: 113173680 / 113199648 Total CPU difference: 16686.53999999996 / 17027.049999999977 Testing on Windows: occt component : Total MEMORY difference: 277698124 / 277270364 Total CPU difference: 38541.03125 / 37471.9842007 products component : Total MEMORY difference: 72394772 / 71382268 Total CPU difference: 10750.578125 / 10342.656534399997 There are no differences in images found by testdiff. |
|
Branch CR25635 has been updated by mkv. SHA-1: 2519596b1bc737b3d394a899ae4c9c2790359436 Detailed log of new commits: Author: mkv Date: Tue Dec 30 17:43:46 2014 +0300 Test cases for issue CR25635 |
|
Dear aml, could you please review test case bugs/fclasses(002)/bug25635_1 and bugs/fclasses(002)/bug25635_2 |
|
Dear mkv, bug25635_1 Please follow nbv comments. bug25635_2 Second test should check output order: master: "dist 1: 4 ext_1 dist 2: 0 dist 3: 8 ext_3 dist 4: 4 ext_4" after fix: "dist 1: 4 ext_1 dist 2: 0 ext_2 dist 3: 8 ext_3 dist 4: 4 ext_4" ext_2 added to output and "dist i / ext_i" now on one line. 1) Check existence of each ext_i in "2dextrema" command output. |
|
Branch CR25635 has been updated by mkv. SHA-1: 955c25d41bbc555874d18b4e3ced1484cc014437 Detailed log of new commits: Author: mkv Date: Wed Feb 4 17:08:26 2015 +0300 Correction of test cases for issue CR25635 |
|
Dear aml, could you please review test case bugs/fclasses(002)/bug25635_1 and bugs/fclasses(002)/bug25635_2 http://occt-tests/CR25635-master-occt/Windows-32-VC10/bugs/fclasses/bug25635_1.html http://occt-tests/CR25635-master-occt/Windows-32-VC10/bugs/fclasses/bug25635_2.html |
|
Dear mkv, I First test case is OK. II In the second test case distance value strictly associated with extrema. It's not good since output order may change from time to time. For example if swap first and second extrema in output, testcase will fail: "dist 1: 0 ext_1 dist 2: 4 ext_2 dist 3: 8 ext_3 dist 4: 4 ext_4" It is better to make regular expressions which check existence of each ext_i. For example: if { [regexp {ext_1}} ${info}] } { puts "OK: Good ext_1" } else { puts "Error: Wrong ext_1" } This will be enough. |
|
Branch CR25635 has been updated by mkv. SHA-1: 8208da0c97aa5a6c8c3de048e1d1c1c8ccf2447c Detailed log of new commits: Author: mkv Date: Thu Feb 5 14:28:01 2015 +0300 Correction of test case for issueCR25635 |
|
Branch CR25635 is TESTED. |
|
Branch CR25635 has been deleted by inv. SHA-1: 8208da0c97aa5a6c8c3de048e1d1c1c8ccf2447c |
occt: master e8746a26 2015-02-05 13:13:39
Committer: bugmaster Details Diff |
0025635: Wrong result of 2D-extrema between two ellipsis Fixed Lipschitz constant evaluation in case co-parametrized objects. Fixed 2dextrema output. Testcase update to new behavior. Test cases for issue CR25635 Correction of test cases for issue CR25635 |
Affected Issues 0025635 |
|
mod - src/GeomliteTest/GeomliteTest_API2dCommands.cxx | Diff File | ||
mod - src/math/math_GlobOptMin.cxx | Diff File | ||
add - tests/bugs/fclasses/bug25635_1 | Diff File | ||
add - tests/bugs/fclasses/bug25635_2 | Diff File | ||
mod - tests/bugs/moddata_1/buc60890 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-22 10:18 |
|
New Issue | |
2014-12-22 10:18 |
|
Assigned To | => aml |
2014-12-22 10:24 |
|
Description Updated | |
2014-12-22 10:31 |
|
Relationship added | related to 0025593 |
2014-12-22 14:49 | git | Note Added: 0035554 | |
2014-12-22 14:50 |
|
Note Added: 0035555 | |
2014-12-22 14:50 |
|
Assigned To | aml => abv |
2014-12-22 14:50 |
|
Status | new => resolved |
2014-12-24 00:22 |
|
Note Added: 0035638 | |
2014-12-24 00:22 |
|
Assigned To | abv => aml |
2014-12-24 00:22 |
|
Status | resolved => assigned |
2014-12-24 09:55 | git | Note Added: 0035648 | |
2014-12-24 10:06 |
|
Note Added: 0035649 | |
2014-12-24 10:06 |
|
Assigned To | aml => abv |
2014-12-24 10:06 |
|
Status | assigned => resolved |
2014-12-24 21:24 |
|
Note Added: 0035691 | |
2014-12-24 21:24 |
|
Assigned To | abv => aml |
2014-12-24 21:24 |
|
Status | resolved => feedback |
2014-12-25 08:00 | git | Note Added: 0035693 | |
2014-12-25 09:31 | git | Note Added: 0035696 | |
2014-12-25 10:06 |
|
Note Added: 0035704 | |
2014-12-25 10:06 |
|
Assigned To | aml => abv |
2014-12-25 10:06 |
|
Status | feedback => resolved |
2014-12-25 15:14 |
|
Note Added: 0035722 | |
2014-12-25 15:14 |
|
Assigned To | abv => bugmaster |
2014-12-25 15:14 |
|
Status | resolved => reviewed |
2014-12-25 15:53 |
|
Assigned To | bugmaster => mkv |
2014-12-30 17:45 |
|
Note Added: 0035909 | |
2014-12-30 17:45 | git | Note Added: 0035910 | |
2014-12-30 17:46 |
|
Note Added: 0035911 | |
2014-12-30 17:46 |
|
Assigned To | mkv => aml |
2014-12-30 17:46 |
|
Status | reviewed => feedback |
2014-12-30 17:46 |
|
Test case number | => bugs fclasses(002) bug25635_1, bug25635_2 |
2014-12-30 17:53 |
|
Assigned To | aml => nbv |
2014-12-30 17:54 |
|
Assigned To | nbv => mkv |
2014-12-30 18:05 |
|
Assigned To | mkv => aml |
2015-01-12 08:35 |
|
Note Added: 0035937 | |
2015-01-12 08:35 |
|
Assigned To | aml => mkv |
2015-02-04 17:11 | git | Note Added: 0037082 | |
2015-02-04 17:12 |
|
Note Added: 0037083 | |
2015-02-04 17:13 |
|
Assigned To | mkv => aml |
2015-02-05 11:59 |
|
Assigned To | aml => mkv |
2015-02-05 12:00 |
|
Note Added: 0037103 | |
2015-02-05 13:42 |
|
Assigned To | mkv => bugmaster |
2015-02-05 13:42 |
|
Status | feedback => tested |
2015-02-05 14:28 | git | Note Added: 0037118 | |
2015-02-05 14:29 |
|
Note Added: 0037119 | |
2015-02-06 15:38 | bugmaster | Changeset attached | => occt master e8746a26 |
2015-02-06 15:38 | bugmaster | Status | tested => verified |
2015-02-06 15:38 | bugmaster | Resolution | open => fixed |
2015-03-18 13:34 | git | Note Added: 0038536 | |
2015-05-14 15:29 |
|
Status | verified => closed |
2015-05-14 15:32 |
|
Fixed in Version | => 6.9.0 |