DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0031172

Modeling Algorithms - Unexpected result of BRepTools::OuterWire()

Open CASCADEOCCT:Modeling Algorithmsclosed9 public notes

Search issues

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.

01Commenter 1
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.
02Commenter 2
Sergey (SZY), please consider this simple bug for fixing.
03Commenter 3
04Commenter 4
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())) {
05Commenter 5
06Commenter 6
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.
07Commenter 7
08Commenter 8
For integration:
occt - CR31172
products - none
09Commenter 1
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