View Issue Details

IDProjectCategoryView StatusLast Update
0031172Open CASCADEOCCT:Modeling Algorithmspublic2021-01-16 14:12
ReporterssvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2013 
Product Version7.5.0 
Target Version7.6.0Fixed in Version7.6.0 
Summary0031172: Modeling Algorithms - Unexpected result of BRepTools::OuterWire()
DescriptionThe 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 ReproduceThe test case named bug31172
TagsNo tags attached.
Test case numberbugs/modalg_7/bug31172

Attached Files

  • test-face.brep (2,916 bytes)
  • outer-wire-01.png (5,214 bytes)

Activities

ssv

2019-11-17 23:19

developer  

test-face.brep (2,916 bytes)

ssv

2019-11-17 23:19

developer  

outer-wire-01.png (5,214 bytes)

ssv

2019-11-17 23:31

developer   ~0089037

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.

msv

2020-09-15 15:54

developer   ~0094852

Sergey (SZY), please consider this simple bug for fixing.

aavtamon

2021-01-14 08:07

reporter   ~0098110

Looks good.
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/

msv

2021-01-14 10:11

developer   ~0098112

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())) {

aavtamon

2021-01-14 13:27

reporter   ~0098115

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/

msv

2021-01-14 13:47

developer   ~0098116

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.

aavtamon

2021-01-14 17:09

reporter   ~0098123

I retested the branch:
http://jenkins-test-12.nnov.opencascade.com/view/CR31172-master-aavtamon/view/COMPARE/

msv

2021-01-14 17:30

developer   ~0098125

For integration:
occt - CR31172
products - none

bugmaster

2021-01-16 13:31

administrator   ~0098155

Combination -
OCCT branch : IR-2021-01-15
master SHA - 6fab0b34288ef3f29ecf4eabc0283540460dbc31
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2021-01-15 SHA - a8521c25e41405ac279e65e1fcde5de75a344b0b
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

Related Changesets

occt: master 6fab0b34

2021-01-13 09:22:58

aavtamon


Committer: bugmaster Details Diff
0031172: Unexpected result of BRepTools::OuterWire()

In BRepTools::OuterWire() compare of parameters was rewritten using Precision.
The test case bug31172 has been created
Affected Issues
0031172
mod - src/BRepTools/BRepTools.cxx Diff File
add - tests/bugs/modalg_7/bug31172 Diff File

Issue History

Date Modified Username Field Change
2019-11-17 23:19 ssv New Issue
2019-11-17 23:19 ssv Assigned To => msv
2019-11-17 23:19 ssv File Added: test-face.brep
2019-11-17 23:19 ssv File Added: outer-wire-01.png
2019-11-17 23:31 ssv Note Added: 0089037
2020-09-15 15:54 msv Note Added: 0094852
2020-09-15 15:54 msv Assigned To msv => szy
2020-09-15 15:54 msv Target Version 7.5.0 => 7.6.0
2020-12-28 14:41 szy Assigned To szy => aavtamon
2021-01-14 08:07 aavtamon Note Added: 0098110
2021-01-14 08:07 aavtamon Assigned To aavtamon => msv
2021-01-14 08:07 aavtamon Status new => resolved
2021-01-14 08:07 aavtamon Steps to Reproduce Updated
2021-01-14 10:11 msv Note Added: 0098112
2021-01-14 10:11 msv Assigned To msv => aavtamon
2021-01-14 10:11 msv Status resolved => assigned
2021-01-14 12:04 kgv Product Version => 7.5.0
2021-01-14 12:04 kgv Summary Unexpected result of BRepTools::OuterWire() => Modeling Algorithms - Unexpected result of BRepTools::OuterWire()
2021-01-14 13:27 aavtamon Note Added: 0098115
2021-01-14 13:27 aavtamon Assigned To aavtamon => msv
2021-01-14 13:27 aavtamon Status assigned => resolved
2021-01-14 13:47 msv Note Added: 0098116
2021-01-14 13:47 msv Assigned To msv => aavtamon
2021-01-14 13:47 msv Status resolved => assigned
2021-01-14 17:09 aavtamon Note Added: 0098123
2021-01-14 17:09 aavtamon Assigned To aavtamon => msv
2021-01-14 17:09 aavtamon Status assigned => resolved
2021-01-14 17:30 msv Note Added: 0098125
2021-01-14 17:30 msv Assigned To msv => bugmaster
2021-01-14 17:30 msv Status resolved => reviewed
2021-01-16 13:31 bugmaster Note Added: 0098155
2021-01-16 13:31 bugmaster Status reviewed => tested
2021-01-16 13:56 bugmaster Test case number => bugs/modalg_7/bug31172
2021-01-16 14:12 bugmaster Changeset attached => occt master 6fab0b34
2021-01-16 14:12 bugmaster Status tested => verified
2021-01-16 14:12 bugmaster Resolution open => fixed