MantisBT - Open CASCADE
View Issue Details
0030831Open CASCADE[OCCT] OCCT:Shape Healingpublic2019-07-03 19:532019-09-15 10:54
agv 
abv 
normalminor 
verifiedfixed 
WindowsVC++ 201564 bit
[OCCT] 7.2.0 
[OCCT] 7.4.0 
bugs/heal/bug30831
0030831: Shape Healing - ShapeFix algorithm (creation of seam edge) takes too long time with thin faces
Attached file "faces.bin" contains two faces from a large STEP assembly obtained with the conversion of units from mm to m (everything scaled down 1000 times). As the result these cylindrical faces have the height ~2e-8, and the algorithm considers them as both U-closed and V-closed. Hence incorrect result and too long processing.
binrestore faces.bin ff
explode ff
chrono cc start
fixshape rr_1 ff_1
chrono cc show
>> CPU user time: 426.2415323 seconds
fixshape rr_2 ff_2
chrono cc show
>> CPU user time: 671.2879031 seconds
No tags attached.
? faces.bin (1,768) 2019-07-03 19:53
https://tracker.dev.opencascade.org/
? bug30831.bin (1,768) 2019-09-13 15:39
https://tracker.dev.opencascade.org/
Issue History
2019-07-03 19:53agvNew Issue
2019-07-03 19:53agvAssigned To => msv
2019-07-03 19:53agvFile Added: faces.bin
2019-07-03 19:54agvAssigned Tomsv => agv
2019-07-03 20:05msvStatusnew => assigned
2019-07-03 20:05msvCategoryOCCT:Modeling Algorithms => OCCT:Shape Healing
2019-07-03 20:06gitNote Added: 0085414
2019-07-03 20:11agvNote Added: 0085415
2019-07-03 20:12agvAssigned Toagv => gka
2019-07-03 20:12agvStatusassigned => resolved
2019-07-03 20:18kgvSummaryShapeFix algorithm (creation of seam edge) takes too long time with thin faces => Shape Healing - ShapeFix algorithm (creation of seam edge) takes too long time with thin faces
2019-07-03 20:24kgvNote Added: 0085416
2019-07-03 20:25kgvNote Edited: 0085416bug_revision_view_page.php?bugnote_id=85416#r21468
2019-07-03 20:25kgvNote Edited: 0085416bug_revision_view_page.php?bugnote_id=85416#r21469
2019-07-04 11:43gitNote Added: 0085421
2019-09-11 10:55gitNote Added: 0086998
2019-09-11 17:21gkaNote Added: 0087012
2019-09-11 17:22gkaNote Added: 0087013
2019-09-11 17:22gkaAssigned Togka => bugmaster
2019-09-11 17:22gkaStatusresolved => reviewed
2019-09-11 18:53bugmasterTest case number => Not required
2019-09-11 18:54bugmasterNote Added: 0087016
2019-09-11 18:54bugmasterStatusreviewed => tested
2019-09-13 14:34gkaNote Added: 0087060
2019-09-13 15:36gitNote Added: 0087064
2019-09-13 15:38gitNote Added: 0087066
2019-09-13 15:39gkaFile Added: bug30831.bin
2019-09-13 15:43gkaNote Added: 0087068
2019-09-14 10:56bugmasterTest case numberNot required => bugs/heal/bug30831
2019-09-15 10:51abvChangeset attached => occt master 0cdaa8a4
2019-09-15 10:51abvAssigned Tobugmaster => abv
2019-09-15 10:51abvStatustested => verified
2019-09-15 10:51abvResolutionopen => fixed
2019-09-15 10:54gitNote Added: 0087088
2019-09-15 10:54gitNote Added: 0087089

Notes
(0085414)
git   
2019-07-03 20:06   
Branch CR30831 has been created by agv.

SHA-1: 532383ee8db8f825a5d0b927ccc0a9962a73d990


Detailed log of new commits:

Author: agv
Date: Wed Jul 3 20:04:16 2019 +0300

    0030831: ShapeFix algorithm (creation of seam edge) takes too long time with thin faces
    
    In class ShapeFix_ComposeShell the U- and V-closedness of input face is taken immediately avoiding the error when the face is small in any of these dimensions.
(0085415)
agv   
2019-07-03 20:11   
With this change the result is valid shapes and the processing time is greatly reduced:

>> Elapsed time: 0 Hours 0 Minutes 0.00192222837359 Seconds
>> Elapsed time: 0 Hours 0 Minutes 0.00816187029704 Seconds
(0085416)
kgv   
2019-07-03 20:24   
(edited on: 2019-07-03 20:25)
+  // agv 2019/07/03 - avoid false detection of 'Closed' on very thin faces
+  if (theSurface->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) {

This is an obsolete (before moving OCCT to git) style, which should be avoided in new patches.
The change description should be within git commit message, authorship is deduced from git commit author field (as well as change date),
and code itself should contain only comments documenting the actual status, when needed.

(0085421)
git   
2019-07-04 11:43   
Branch CR30831 has been updated by agv.

SHA-1: 796ca537820772db2d7adf85962cce2d7ae7e6af


Detailed log of new commits:

Author: agv
Date: Thu Jul 4 11:42:11 2019 +0300

    Correction of a comment to the new code block.

(0086998)
git   
2019-09-11 10:55   
Branch CR30831_1 has been created by gka.

SHA-1: 65b020a296126b41a5bcc510085dca11ee00129d


Detailed log of new commits:

Author: agv
Date: Wed Jul 3 20:04:16 2019 +0300

    0030831: ShapeFix algorithm (creation of seam edge) takes too long time with thin faces
    
    In class ShapeFix_ComposeShell the U- and V-closedness of input face is taken immediately avoiding the error when the face is small in any of these dimensions.
    
    Correction of a comment to the new code block.
(0087012)
gka   
2019-09-11 17:21   
Results of tests :

http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30831_1-master-gka/view/COMPARE/ [^]
(0087013)
gka   
2019-09-11 17:22   
Branch CR30831_1 was reviewed
(0087016)
bugmaster   
2019-09-11 18:54   
Combination -
OCCT branch : CR30831_1
master SHA - 65b020a296126b41a5bcc510085dca11ee00129d
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : master SHA - f9d0bd5e3a29d6a97b3f5f6354ea2397253ab4f8
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: 16822.52000000005 / 16836.290000000165 [-0.08%]
Products
Total CPU difference: 10549.110000000052 / 10553.510000000031 [-0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 18281.15625 / 18300.0625 [-0.10%]
Products
Total CPU difference: 12229.015625 / 12227.453125 [+0.01%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0087060)
gka   
2019-09-13 14:34   
Time before fix:
Draw[4]> chrono t1 start; fixshape r ff 1.e-7 1.; chrono t1 stop; chrono t1 show
Elapsed time: 0 Hours 10 Minutes 6.75428409991 Seconds
CPU user time: 601.8125 seconds
CPU system time: 0.5625 seconds

Time after fix:
Draw[4]> chrono t1 start; fixshape r ff 1.e-7 1.; chrono t1 stop; chrono t1 show
Elapsed time: 0 Hours 0 Minutes 0.00241609988734 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds
(0087064)
git   
2019-09-13 15:36   
Branch CR30831 has been updated forcibly by gka.

SHA-1: 7accaf5ab51bb3b833a2899ab3e49b04be2ba516
(0087066)
git   
2019-09-13 15:38   
Branch CR30831_1 has been updated forcibly by gka.

SHA-1: 7accaf5ab51bb3b833a2899ab3e49b04be2ba516
(0087068)
gka   
2019-09-13 15:43   
Dear bugmaster.

Could you please add attached file bug30831.bin in the data base for testing.

Test case bug30381 was puched in branch CR30831_1.
(0087088)
git   
2019-09-15 10:54   
Branch CR30831 has been deleted by inv.

SHA-1: 7accaf5ab51bb3b833a2899ab3e49b04be2ba516
(0087089)
git   
2019-09-15 10:54   
Branch CR30831_1 has been deleted by inv.

SHA-1: 7accaf5ab51bb3b833a2899ab3e49b04be2ba516