Archived issue #0031172
Modeling Algorithms - Unexpected result of BRepTools::OuterWire()
Description
The attached face contains three wires touching each other at vertices. As a result of BRepTools::OuterWire(), the incorrect wire is returned (the tool returns one of the circles instead of the outer contour).
Steps to reproduce
The test case named bug31172
Public activity
9 archived notes
Participants are labeled by their role within this record.
In BRepTools::OuterWire(), lines 620-623, there is an 'if' statement comparing double values like follows:
if ((umin <= UMin) &&
(umax >= UMax) &&
(vmin <= VMin) &&
(vmax >= VMax)) ...
It is likely a good idea to use at least PConfusion() instead of naive equality checks which do not work for the provided test case.
if ((umin <= UMin) &&
(umax >= UMax) &&
(vmin <= VMin) &&
(vmax >= VMax)) ...
It is likely a good idea to use at least PConfusion() instead of naive equality checks which do not work for the provided test case.
Sergey (SZY), please consider this simple bug for fixing.
Incorrect treatment of upper bounds. The correct code must look like this:
if (((umin - UMin) <= Precision::PConfusion()) &&
((umax - UMax) >= -Precision::PConfusion()) &&
((vmin - VMin) <= Precision::PConfusion()) &&
((vmax - VMax) >= -Precision::PConfusion())) {
Thank you for the remark, I have applied it.
The new test results:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/job/CR31172-master-aavtamon-OCCT-Debian80-64-opt-test-compare/
The new test results:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/job/CR31172-master-aavtamon-OCCT-Debian80-64-opt-test-compare/
Too many differences in images. I see that you compared with the reference at OCCT-751dev. It is incorrect. You need to compare with the branch that is direct parent of yours.
I retested the branch:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/
For integration:
occt - CR31172
products - none
occt - CR31172
products - none
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17754.160000000134 / 17720.07000000011 [+0.19%]
Products
Total CPU difference: 12412.630000000105 / 12419.360000000095 [-0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 19336.3125 / 19330.015625 [+0.03%]
Products
Total CPU difference: 13740.03125 / 13831.828125 [-0.66%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17754.160000000134 / 17720.07000000011 [+0.19%]
Products
Total CPU difference: 12412.630000000105 / 12419.360000000095 [-0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 19336.3125 / 19330.015625 [+0.03%]
Products
Total CPU difference: 13740.03125 / 13831.828125 [-0.66%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention