MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029038Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2017-08-22 19:062018-06-29 21:19
Reporterabv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.3.0Fixed in Version[OCCT] 7.3.0 
Summary0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve
DescriptionThe issue is diagnosed on a case initially reported in #26528: during creation of offset on surface with degenerated corner, the procedure hangs in function IntTools_EdgeEdge::FindParameters().

The cause is that input curve (generated as boundary of offset surface at degeneration point) is poorly defined; it has very high estimated maximum derivative, and hence very low resolution. Method IntTools_EdgeEdge::FindParameters() iterates along the curve by steps defined by resolution, so it takes incredibly long for it to go along the curve (my estimate was 10 min, but it did not finish in ~ 30 min in Release mode). In practice, this means that procedure hangs.
Steps To Reproducerestore [locate_data_file bug29038_bfuse_hang.brep] a
explode a
bfuse r a_1 a_2
TagsNo tags attached.
Test case numberbugs modalg_7 bug29038
Attached Files? file icon bug29038_bfuse_hang.brep (57,413 bytes) 2017-08-22 19:10

- Relationships
related to 0029080newmsv Open CASCADE bopcheck work very slow. 
related to 0025081assignedmsv Community bopcheck does not return 

-  Notes
(0069777)
git (administrator)
2017-08-23 12:50

Branch CR29038 has been created by abv.

SHA-1: 0a67b41da501174fdce490c21253036679b17f28


Detailed log of new commits:

Author: abv
Date: Wed Aug 23 12:49:38 2017 +0300

    0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve
    
    Avoid using global resolution of curve when computing step for iterating along it; length of derivative at the current point is used instead.
(0069807)
git (administrator)
2017-08-24 08:24

Branch CR29038 has been updated by abv.

SHA-1: 25afa22379e0dc1638284c2cbfecf81202f9cdc8


Detailed log of new commits:

Author: abv
Date: Thu Aug 24 08:24:33 2017 +0300

    Step is reduced ten times to avoid regressions

(0069809)
abv (manager)
2017-08-24 08:30

The first version of the fix caused regressions on 58 cases. To avoid this, I have reduced step by 10 times. Most of regressions have gone, however some remained:

bugs modalg_5 bug24981 (hanged -- killed by CPU limit)
bugs modalg_6 bug26938_1 bug26938_2 bug26938_3 bug27021
bugs modalg_7 bug28892_1

Apparently we need to have more sophisticated approach to choice of the iteration step. It can be reasonable to have some standard and reusable tools for that. Such tools can be naturally put into package CPntts which already implements similar (but different) algorithms.
(0070164)
git (administrator)
2017-09-04 14:37

Branch CR29038_1 has been created by msv.

SHA-1: a9f18cf1bd284dac8d9f7e224553634142ab8fde


Detailed log of new commits:

Author: msv
Date: Fri Sep 1 09:10:36 2017 +0300

    0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve
    
    Make possibility to dramatically increase the step when iteration on the curve if the global resolution of the curve is too small.
    Correct the functions FindParameters, FindBestSolution, FindDistPC.
(0070165)
msv (developer)
2017-09-04 14:38

The branch CR29038_1 contains alternative and more safe solution.
(0070169)
git (administrator)
2017-09-04 16:42

Branch CR29038_1 has been updated forcibly by msv.

SHA-1: ef012c8d68f4c004488e21901cfe14b657d4e164
(0070218)
git (administrator)
2017-09-04 18:30

Branch CR29038_1 has been updated forcibly by msv.

SHA-1: 76f46c4dbfc8f42de2f55f8055fe843d1fa49976
(0070232)
git (administrator)
2017-09-05 11:59

Branch CR29038_1 has been updated forcibly by msv.

SHA-1: 396671dc4365b06096b99c66bdadfe07c431caa4
(0070241)
msv (developer)
2017-09-05 15:06

Dear Eugeny, please review the branch CR29038_1.
Jenkins job CR29038-master-MSV showed no regressions.
(0070244)
git (administrator)
2017-09-05 15:29

Branch CR29038_1 has been updated forcibly by msv.

SHA-1: 5281bd40e1dcb34c2317a1543e99474a0cc5c4c3
(0070245)
emv (developer)
2017-09-05 15:48

Reviewed.
(0070248)
bugmaster (administrator)
2017-09-05 19:48

Combination -
OCCT branch : CR29038_1 SHA-1: 5281bd40e1dcb34c2317a1543e99474a0cc5c4c3
Products branch : master
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

http://jenkins-test-10.nnov.opencascade.com/view/CR29038-master-MSV/ [^]

Number of compiler warnings:

OCCT :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

Products :
Linux: 4 (4 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:

Windows:
OCCT
CPU bugs moddata_3 bug24886: 0.3744024 / 4.5552292 [-91.78%]
..
CPU bugs modalg_7 bug27160: 1.6536106 / 2624.2176218 [-99.94%]
...
CPU bugs modalg_7: 221.67742100000004 / 2840.7470098000026 [-92.20%]
...
Total CPU difference: 18289.838041798714 / 20591.476795798557 [-11.18%]

Producst
Total CPU difference: 7688.758886599963 / 7720.302288799964 [-0.41%]

Linux:
OCCT
...
CPU bugs moddata_3 bug24886: 0.42 / 3.34 [-87.43%]
...
CPU bugs modalg_7 bug27160: 1.79 / 1883.2 [-99.90%]
...
CPU bugs modalg_7: 231.38000000000008 / 2112.4499999999985 [-89.05%]
....
Total CPU difference: 20424.210000000145 / 22080.990000000125 [-7.50%]

Products
Total CPU difference: 7703.40000000009 / 7725.120000000072 [-0.28%]

Please confirm performance improving !!!!

Image differences :
A lot of difference in images in OCCT on Linux and Windows platforms, especially on location of vertex during intersection of 2 curves

http://occt-tests/CR29038-master-MSV-OCCT/Debian70-64/diff-Debian70-64-image.html [^]

http://occt-tests/CR29038-master-MSV-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]

Please confirm !!!

Memory differences :
No differences that require special attention
(0070256)
msv (developer)
2017-09-06 09:33

I confirm performance improvement. It is the main purpose of the fix. I have wrote about it in commit message.

A side effect (positive one) of the fix is more precise calculation of the zone of intersection of two edges and the exact intersection point. So, it is expected that some vertices can have slightly changed positions. But this must not impact the quality of the result shapes. If there are suspicious cases they must be thoroughly checked. Please tell me the names of test cases where you think can be incorrect change of the picture.
(0070258)
bugmaster (administrator)
2017-09-06 10:35

Differences in performance and images have been confirmed by developer
(0071013)
git (administrator)
2017-09-29 17:11

Branch CR29038 has been deleted by kgv.

SHA-1: 25afa22379e0dc1638284c2cbfecf81202f9cdc8
(0071014)
git (administrator)
2017-09-29 17:11

Branch CR29038_1 has been deleted by kgv.

SHA-1: 5281bd40e1dcb34c2317a1543e99474a0cc5c4c3

- Related Changesets
occt: master d89c7d60
Timestamp: 2017-09-01 06:10:36
Author: msv
Committer: bugmaster
Details ] Diff ]
0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve

Make possibility to dramatically increase the step during iteration on the curve when the global resolution of the curve is too small.
Correct the functions FindParameters, FindBestSolution, FindDistPC.

The change caused improvement of the test case "boolean bfuse_complex E4", so the bug #27697 has been fixed.

The change caused dramatic improvement of the performance of the test "bugs modalg_7 bug27160", and the bug 0029080 has been fixed.
mod - src/BOPTools/BOPTools_AlgoTools.cxx Diff ] File ]
mod - src/IntTools/IntTools_EdgeEdge.cxx Diff ] File ]
mod - src/IntTools/IntTools_EdgeEdge.hxx Diff ] File ]
mod - tests/boolean/bfuse_complex/E4 Diff ] File ]
add - tests/bugs/modalg_7/bug29038 Diff ] File ]
occt: master 28c08a7d
Timestamp: 2017-09-01 06:10:36
Author: msv
Committer: bugmaster
Details ] Diff ]
0029038: Modeling - IntTools_EdgeEdge::FindParameters() hangs on bad curve

Make possibility to dramatically increase the step during iteration on the curve when the global resolution of the curve is too small.
Correct the functions FindParameters, FindBestSolution, FindDistPC.

The change caused improvement of the test case "boolean bfuse_complex E4", so the bug #27697 has been fixed.

The change caused dramatic improvement of the performance of the test "bugs modalg_7 bug27160", and the bug 0029080 has been fixed.
mod - src/BOPTools/BOPTools_AlgoTools.cxx Diff ] File ]
mod - src/IntTools/IntTools_EdgeEdge.cxx Diff ] File ]
mod - src/IntTools/IntTools_EdgeEdge.hxx Diff ] File ]
mod - tests/boolean/bfuse_complex/E4 Diff ] File ]
add - tests/bugs/modalg_7/bug29038 Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-08-22 19:06 abv New Issue
2017-08-22 19:06 abv Assigned To => msv
2017-08-22 19:10 abv File Added: bug29038_bfuse_hang.brep
2017-08-22 19:11 abv Relationship added related to 0026528
2017-08-22 19:11 abv Steps to Reproduce Updated View Revisions
2017-08-22 19:11 abv Description Updated View Revisions
2017-08-23 12:50 git Note Added: 0069777
2017-08-23 16:33 abv Relationship added related to 0026587
2017-08-24 08:24 git Note Added: 0069807
2017-08-24 08:30 abv Note Added: 0069809
2017-09-04 14:37 git Note Added: 0070164
2017-09-04 14:37 msv Status new => assigned
2017-09-04 14:38 msv Note Added: 0070165
2017-09-04 16:42 git Note Added: 0070169
2017-09-04 17:23 msv Relationship added related to 0029080
2017-09-04 18:30 git Note Added: 0070218
2017-09-05 11:59 git Note Added: 0070232
2017-09-05 12:55 msv Relationship added related to 0027697
2017-09-05 15:06 msv Note Added: 0070241
2017-09-05 15:06 msv Assigned To msv => emv
2017-09-05 15:06 msv Status assigned => resolved
2017-09-05 15:29 git Note Added: 0070244
2017-09-05 15:48 emv Note Added: 0070245
2017-09-05 15:48 emv Assigned To emv => bugmaster
2017-09-05 15:48 emv Status resolved => reviewed
2017-09-05 19:48 bugmaster Note Added: 0070248
2017-09-05 19:48 bugmaster Assigned To bugmaster => msv
2017-09-05 19:48 bugmaster Status reviewed => assigned
2017-09-06 09:33 msv Note Added: 0070256
2017-09-06 09:33 msv Assigned To msv => bugmaster
2017-09-06 09:33 msv Status assigned => feedback
2017-09-06 10:35 bugmaster Note Added: 0070258
2017-09-06 10:35 bugmaster Status feedback => tested
2017-09-06 10:36 bugmaster Test case number => bugs modalg_7 bug29038
2017-09-18 13:43 bugmaster Relationship added related to 0025081
2017-09-21 19:33 bugmaster Changeset attached => occt master d89c7d60
2017-09-21 19:33 bugmaster Status tested => verified
2017-09-21 19:33 bugmaster Resolution open => fixed
2017-09-21 19:48 apn Target Version 7.4.0* => 7.2.0
2017-09-22 12:05 bugmaster Target Version 7.2.0 => 7.4.0*
2017-09-29 13:26 bugmaster Changeset attached => occt master 28c08a7d
2017-09-29 17:11 git Note Added: 0071013
2017-09-29 17:11 git Note Added: 0071014
2018-02-20 12:59 user533 Target Version 7.4.0* => 7.3.0
2018-06-29 21:15 user533 Fixed in Version => 7.3.0
2018-06-29 21:19 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker