MantisBT - Open CASCADE
View Issue Details
0028833Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2017-06-09 12:452019-08-12 19:04
emv 
 
highminor 
assignedopen 
[OCCT] 7.1.0 
[OCCT] Unscheduled 
0028833: Unstable result of intersection of the faces
The result of intersection of two faces is unstable:
1. The intersection gives different results on Linux and Windows platforms (deviation about 0.001);
2. Different order of the faces also gives different intersection results (deviation is also about 0.001);
3. Variations of the UV sampling of the surfaces also gives very different results:
a) for the 15x15 sampling the intersection gives 7 curves for direct order and only 5 curves for reverse order of faces;
b) for the 100x100 sampling the intersection gives only 4 curves for direct order and also 4 curves for the reverse order of faces, but these 4 curves are different (the gaps are in the different places).

The case has been detected during fixing the issue 0028599 in the test case bugs modalg_6 bug26938_*.
The intersection difference with the 15x15 sampling can be reproduced in the git branch CR28599.
brestore [locate_data_file bug26938.brep] a
explode a
explode a_1 f; copy a_1_1 f1
explode a_2 f; copy a_2_1 f2
don f1 f2

# master
bopcurves f1 f2 -2d
# Tolerance Reached=8.7721154144228939e-005
# 7 curve(s) found.

bopcurves f2 f1 -2d
# Tolerance Reached=1.1061046409178104e-006
# 7 curve(s) found.

No tags attached.
related to 0028599closed apn Open CASCADE Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm 
related to 0028802closed bugmaster Open CASCADE The tolerance reached by approximator is used in creation of an edge, it is incorrect 
related to 0026463assigned nbv Open CASCADE The result of intersection between two faces depends on the order of arguments 
child of 0029133closed bugmaster Open CASCADE Unstable test cases 
Issue History
2017-06-09 12:45emvNew Issue
2017-06-09 12:45emvAssigned To => msv
2017-06-09 12:45emvRelationship addedrelated to 0026938
2017-06-09 12:45emvRelationship addedrelated to 0028599
2017-06-09 14:52msvAssigned Tomsv => nbv
2017-06-09 14:52msvStatusnew => assigned
2017-06-09 17:36jgvRelationship addedrelated to 0028802
2017-07-21 11:04msvTarget Version7.2.0 => 7.3.0
2017-10-19 11:56kgvRelationship addedchild of 0029133
2017-11-22 15:59emvRelationship addedrelated to 0029126
2017-11-22 16:01emvRelationship addedrelated to 0029179
2017-11-22 16:02emvRelationship addedrelated to 0029180
2017-11-22 16:15emvPrioritynormal => high
2017-11-30 16:39gitNote Added: 0072624
2017-12-01 10:55gitNote Added: 0072638
2017-12-01 11:17nbvRelationship addedrelated to 0029359
2017-12-01 14:52nbvNote Added: 0072652
2017-12-01 14:54nbvNote Added: 0072653
2017-12-01 14:54nbvAssigned Tonbv => emv
2017-12-01 14:54nbvStatusassigned => feedback
2017-12-01 15:17emvAssigned Toemv => nbv
2017-12-01 15:18emvNote Added: 0072655
2017-12-01 15:20nbvNote Added: 0072656
2017-12-01 15:22nbvNote Edited: 0072656bug_revision_view_page.php?bugnote_id=72656#r18284
2017-12-04 17:50nbvNote Added: 0072694
2017-12-08 10:22nbvRelationship addedrelated to 0026463
2017-12-08 11:26nbvRelationship addedrelated to 0026510
2018-01-16 09:31nbvStatusfeedback => assigned
2018-02-19 11:58nbvNote Added: 0074036
2018-02-19 11:58nbvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18641#r18641
2018-03-02 10:56msvTarget Version7.3.0 => 7.4.0*
2019-08-12 19:04msvAssigned Tonbv =>
2019-08-12 19:04msvTarget Version7.4.0* => Unscheduled

Notes
(0072624)
git   
2017-11-30 16:39   
Branch CR28833 has been created by nbv.

SHA-1: ecc293ae57fe48db2843f59fec9a4454ab0f8bb7


Detailed log of new commits:

Author: nbv
Date: Thu Nov 30 13:44:48 2017 +0300

    0028833: Unstable result of intersection of the faces
    
    Wrong distance computation in case of Approx_ChordLength approximation type has been corrected.
(0072638)
git   
2017-12-01 10:55   
Branch CR28833 has been deleted by nbv.

SHA-1: ecc293ae57fe48db2843f59fec9a4454ab0f8bb7
(0072652)
nbv   
2017-12-01 14:52   
After the fix for issue #29359, the intersection result is following

     Debian 7 64bit:

bopcurves f1 f2 -2d
# Tolerance Reached=1.9424317963481932e-06
# 7 curve(s) found.

bopcurves f2 f1 -2d
# Tolerance Reached=3.4328334306385459e-06
# 7 curve(s) found.

     Windows, VC12, 64 bit:

bopcurves f1 f2 -2d
# Tolerance Reached=4.8853446536539142e-006
# 7 curve(s) found.

bopcurves f2 f1 -2d
# Tolerance Reached=1.1061046409178104e-006
# 7 curve(s) found.
(0072653)
nbv   
2017-12-01 14:54   
Dear Eugeny,

Please make conclusion about stability of this result.
(0072655)
emv   
2017-12-01 15:18   
It is necessary to perform very careful analysis of these results before making such conclusion. But, since the results of Boolean SECTION operation on these faces is different on Windows and Linux, I think it is necessary to further improve the stability of intersection algorithm.
(0072656)
nbv   
2017-12-01 15:20   
(edited on: 2017-12-01 15:22)
After discussion, this bug has been decided to keep in "open"-status until children bugs on Boolean operation (#29126, #29179 and #29180) will be fixed (they are not fixed by the patch #29359). All problems with intersector (if they still exists) must be automatically related to this issue.

(0072694)
nbv   
2017-12-04 17:50   
Result of intersection with start points (after the fix #29359):

     Linux:

bopcurves a_1_1 a_2_1 -2d -p +1.57079632680779823772 -1260.00000000000000000000 +1.57079632680779823772 -914.00000000000000000000 -p +4.71238898039756382019 -1978.00000000000000000000 +4.71238898039756382019 -196.00000000000000000000
# Tolerance Reached=3.4190183427392574e-06
# 6 curve(s) found.

bopcurves a_2_1 a_1_1 -2d -p +4.71238898039756382019 -196.00000000000000000000 +4.71238898039756382019 -1978.00000000000000000000 -p +1.57079632680779823772 -914.00000000000000000000 +1.57079632680779823772 -1260.00000000000000000000
# Tolerance Reached=1.7251058336056498e-06
# 6 curve(s) found.

     Windows:

bopcurves a_1_1 a_2_1 -2d -p +1.57079632680779820000 -1260.00000000000000000000 +1.57079632680779820000 -914.00000000000000000000 -p +4.71238900762224590000 -1978.00000000000000000000 +4.71238900762224590000 -196.00000000000011000000
# Tolerance Reached=8.7721154144228939e-005
# 6 curve(s) found.

bopcurves a_2_1 a_1_1 -2d -p +4.71238900762224590000 -196.00000000000011000000 +4.71238900762224590000 -1978.00000000000000000000 -p +1.57079632680779820000 -914.00000000000000000000 +1.57079632680779820000 -1260.00000000000000000000
# Tolerance Reached=1.3952065448782561e-006
# 6 curve(s) found.


---------------------------

I.e. the intersection result on Linux is much more resistant to reversing of arguments than on Windows. Nevertheless, the result of Boolean operation (section, cut) on Windows is much more stable than on Linux (see issue #29179).
(0074036)
nbv   
2018-02-19 11:58   
Steps To Reproduce have been updated according to the situation on IR-2018-02-16.