Archived issue #0026009
Wrong result of the test blend bfuseblend B7
Description
After fixing the bug #25742 result of the test "blend bfuseblend B7" has been incorrect (good result is shown in the picture).
P.S.
1. This BAD result is NOT consequence of incorrect fixing. Intersection line between two given cylinders (which is the spine for blend-algorithm) has become better then before fix (tolreached has been decreased by approximately ten times). However, the result of blend algorithm has become FAIL. Most likely, the reason is labile blend algorithm.
2. On OCCT 6.7.1 test "blend bfuseblend B7" is fail. This problem was fixed (spontaneously) in the issue #25465 (see message [archived tracker link removed]).
P.S.
1. This BAD result is NOT consequence of incorrect fixing. Intersection line between two given cylinders (which is the spine for blend-algorithm) has become better then before fix (tolreached has been decreased by approximately ten times). However, the result of blend algorithm has become FAIL. Most likely, the reason is labile blend algorithm.
2. On OCCT 6.7.1 test "blend bfuseblend B7" is fail. This problem was fixed (spontaneously) in the issue #25465 (see message [archived tracker link removed]).
Steps to reproduce
test blend bfuseblend B7
Public activity
20 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Apr 2 11:40:42 2015 +0300
0025742: A partition of 2 shapes stresses a performance issue
1. Method Dump for Blend_Point class has been added.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Apr 2 11:40:42 2015 +0300
0025742: A partition of 2 shapes stresses a performance issue
1. Method Dump for Blend_Point class has been added.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Mon Apr 27 13:10:12 2015 +0300
0026009: Wrong result of the test blend bfuseblend B7
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Mon Apr 27 13:10:12 2015 +0300
0026009: Wrong result of the test blend bfuseblend B7
Please review the branch CR26009_1.
Remark:
It is possible algo hanging. Please provide checking for too small step value.
It is possible algo hanging. Please provide checking for too small step value.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Mon Apr 27 16:28:36 2015 +0300
Correction to avoid infinite loop
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Mon Apr 27 16:28:36 2015 +0300
Correction to avoid infinite loop
Dear Mikhail,
please review corrected branch CR26009_1.
please review corrected branch CR26009_1.
Reviewed
Look at this code:
+ hguide->D1(param, PtOnGuide, TgOnGuide);
+ //Check deflection on guide
+ Cosi = PrevTgOnGuide * TgOnGuide;
+ if (Cosi < 0.)
+ Cosi2 = 0.;
+ else
+ Cosi2 = Cosi * Cosi / PrevTgOnGuide.SquareMagnitude() / TgOnGuide.SquareMagnitude();
It may cause division by zero error if derivative is zero.
+ hguide->D1(param, PtOnGuide, TgOnGuide);
+ //Check deflection on guide
+ Cosi = PrevTgOnGuide * TgOnGuide;
+ if (Cosi < 0.)
+ Cosi2 = 0.;
+ else
+ Cosi2 = Cosi * Cosi / PrevTgOnGuide.SquareMagnitude() / TgOnGuide.SquareMagnitude();
It may cause division by zero error if derivative is zero.
I also noted this fact, but did not pay attention to it, because thought that hguide is always well defined curve having no special points.
However, if you have a doubt I do not mind to insert a protection here, especially because it is so simple:
+ Cosi = PrevTgOnGuide * TgOnGuide;
+ if (Cosi < gp::Resolution())
+ Cosi2 = 0.;
+ else
+ Cosi2 = Cosi * Cosi / PrevTgOnGuide.SquareMagnitude() / TgOnGuide.SquareMagnitude();
However, if you have a doubt I do not mind to insert a protection here, especially because it is so simple:
+ Cosi = PrevTgOnGuide * TgOnGuide;
+ if (Cosi < gp::Resolution())
+ Cosi2 = 0.;
+ else
+ Cosi2 = Cosi * Cosi / PrevTgOnGuide.SquareMagnitude() / TgOnGuide.SquareMagnitude();
Dear jgv, please make this small correction.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Tue Apr 28 14:31:10 2015 +0300
Minor correction
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Tue Apr 28 14:31:10 2015 +0300
Minor correction
Thank you, Mikhail!
Please test the branch CR26009_1.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: apv
Date: Wed Apr 29 15:07:53 2015 +0300
Update of test-case for issue #0026009
[revision removed]
Detailed log of new commits:
Author: apv
Date: Wed Apr 29 15:07:53 2015 +0300
Update of test-case for issue #0026009
Dear Commenter 1,
Branch CR26009_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 19 (18 on master)
Windows: 2 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
There are new additional warnings.
On Linux:
Blend_Walking_4.gxx:97, GNU C Compiler 4 (gcc), Priority: Normal
unused variable ‘Norme’
On Windows:
Blend_Walking_4.gxx:97, MSBuild, Priority: Normal
'Norme' : local variable is initialized but not referenced
Regressions/Differences:
Not detected
Testing cases:
blend bfuseblend(003) B7 - OK
http://occt-tests/CR26009-1-master-occt-64/Debian60-64/blend/bfuseblend/B7.html
http://occt-tests/CR26009-1-master-occt-64/Windows-64-VC10/blend/bfuseblend/B7.html
Testing on Linux:
Total MEMORY difference: 94823582 / 94606999 [+0.23%]
Total CPU difference: 51825.449999999575 / 51015.63999999946 [+1.59%]
Testing on Windows:
Total MEMORY difference: 57257797 / 57266783 [-0.02%]
Total CPU difference: 15809.000939098985 / 15810.26454719897 [-0.01%]
Branch CR26009_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 19 (18 on master)
Windows: 2 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
There are new additional warnings.
On Linux:
Blend_Walking_4.gxx:97, GNU C Compiler 4 (gcc), Priority: Normal
unused variable ‘Norme’
On Windows:
Blend_Walking_4.gxx:97, MSBuild, Priority: Normal
'Norme' : local variable is initialized but not referenced
Regressions/Differences:
Not detected
Testing cases:
blend bfuseblend(003) B7 - OK
http://occt-tests/CR26009-1-master-occt-64/Debian60-64/blend/bfuseblend/B7.html
http://occt-tests/CR26009-1-master-occt-64/Windows-64-VC10/blend/bfuseblend/B7.html
Testing on Linux:
Total MEMORY difference: 94823582 / 94606999 [+0.23%]
Total CPU difference: 51825.449999999575 / 51015.63999999946 [+1.59%]
Testing on Windows:
Total MEMORY difference: 57257797 / 57266783 [-0.02%]
Total CPU difference: 15809.000939098985 / 15810.26454719897 [-0.01%]
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Wed Apr 29 15:48:01 2015 +0300
Fix of compiler's warning
[revision removed]
Detailed log of new commits:
Author: jgv
Date: Wed Apr 29 15:48:01 2015 +0300
Fix of compiler's warning
Unused variable is deleted, compiler's warning disappeared.
Dear Commenter 1,
Branch CR26009_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
Regressions/Differences:
Not detected
Testing cases:
blend bfuseblend(003) B7 - OK
http://occt-tests/CR26009-1-master-occt-64/Debian60-64/blend/bfuseblend/B7.html
http://occt-tests/CR26009-1-master-occt-64/Windows-64-VC10/blend/bfuseblend/B7.html
Testing on Linux:
Total MEMORY difference: 94735830 / 94605273 [+0.14%]
Total CPU difference: 51686.60999999931 / 51015.509999999456 [+1.32%]
Testing on Windows:
Total MEMORY difference: 57258907 / 57267962 [-0.02%]
Total CPU difference: 15903.943147699067 / 15810.29574739897 [+0.59%]
Branch CR26009_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component:
Linux: 4 (4 on master)
Windows: 0 (0 on master)
Regressions/Differences:
Not detected
Testing cases:
blend bfuseblend(003) B7 - OK
http://occt-tests/CR26009-1-master-occt-64/Debian60-64/blend/bfuseblend/B7.html
http://occt-tests/CR26009-1-master-occt-64/Windows-64-VC10/blend/bfuseblend/B7.html
Testing on Linux:
Total MEMORY difference: 94735830 / 94605273 [+0.14%]
Total CPU difference: 51686.60999999931 / 51015.509999999456 [+1.32%]
Testing on Windows:
Total MEMORY difference: 57258907 / 57267962 [-0.02%]
Total CPU difference: 15903.943147699067 / 15810.29574739897 [+0.59%]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]