MantisBT - Open CASCADE
View Issue Details
0030082Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2018-08-23 14:572018-09-09 13:05
nbv 
bugmaster 
normalminor 
closedfixed 
 
[OCCT] 7.4.0[OCCT] 7.4.0 
bugs/modalg_7/bug30082_1 bugs/modalg_7/bug30082_2
0030082: Intersection algorithm returns curve with big tolerance value
Intersection algorithm returns curve with big tolerance value.

The intersection curve has a bend and it must be bended indeed (see IntCurve.PNG attached picture). Please use "intersect" DRAW-command with not trimmed surfaces to understand such strange behavior. I.e. this bend is happened in the start place where the curve turns.

Please note, that there are no any tangent zones at the end of the curve.

Nevertheless, the intersection algorithm generates points of WLine, which almost uniform distributed in this place. And it is correct behavior of the algorithm because several these points are in the line (in fact).

However, approximation algorithm tries to satisfy the condition with given tangent at the ends of the intersection curve. And in the considered case, this tangent is really directed almost perpendicular to the curve itself (see again the intersection result between two not trimmed surfaces). This is true reason of the bend.

To fix the problem, intersection algorithm must generate of WLine at the end of the curve.
brestore [locate_data_file bug27928_b1.brep] b1
brestore [locate_data_file bug27928_b2.brep] b2
explode b1 f
explode b2 f
don b1_1 b2_2
bopcurves b1_1 b2_2 -2d
#Tolerance Reached=0.0010828835451753697
# 1 curve(s) found.

axo; fit
No tags attached.
child of 0027928closed bugmaster BOP common produces empty compound 
png IntCurve.PNG (11,030) 2018-08-23 14:57
https://tracker.dev.opencascade.org/
Issue History
2018-08-23 14:57nbvNew Issue
2018-08-23 14:57nbvAssigned To => msv
2018-08-23 14:57nbvFile Added: IntCurve.PNG
2018-08-23 15:09nbvNote Added: 0078739
2018-08-23 15:35nbvRelationship addedchild of 0027928
2018-08-23 16:42nbvAssigned Tomsv => nbv
2018-08-23 16:42nbvStatusnew => assigned
2018-08-23 16:55gitNote Added: 0078746
2018-08-24 10:40gitNote Added: 0078753
2018-08-24 12:24gitNote Added: 0078756
2018-08-24 15:20nbvNote Added: 0078758
2018-08-24 15:20nbvAssigned Tonbv => emv
2018-08-24 15:20nbvStatusassigned => resolved
2018-08-27 11:54gitNote Added: 0078795
2018-08-27 16:00nbvNote Edited: 0078758bug_revision_view_page.php?bugnote_id=78758#r19788
2018-08-28 08:33emvNote Added: 0078805
2018-08-28 08:33emvAssigned Toemv => nbv
2018-08-28 08:33emvStatusresolved => assigned
2018-08-28 12:17gitNote Added: 0078810
2018-08-28 14:37nbvNote Added: 0078813
2018-08-28 14:37nbvAssigned Tonbv => emv
2018-08-28 14:37nbvStatusassigned => resolved
2018-08-28 15:34nbvNote Added: 0078814
2018-08-28 15:37gitNote Added: 0078815
2018-08-28 15:43emvNote Added: 0078816
2018-08-28 15:43emvAssigned Toemv => bugmaster
2018-08-28 15:43emvStatusresolved => reviewed
2018-08-31 17:20bugmasterTest case number => bugs/modalg_7/bug30082_1 bugs/modalg_7/bug30082_2
2018-08-31 17:23bugmasterNote Added: 0078902
2018-08-31 17:23bugmasterStatusreviewed => tested
2018-09-09 11:52bugmasterChangeset attached => occt master 7eb3580b
2018-09-09 11:52bugmasterStatustested => verified
2018-09-09 11:52bugmasterResolutionopen => fixed
2018-09-09 13:05gitNote Added: 0079051
2018-09-09 13:05gitNote Added: 0079053

Notes
(0078739)
nbv   
2018-08-23 15:09   
Here, we intersect two analytical surfaces (Cylinder-Cylinder). Therefore, Purger is disabled. But in general cases, all additionally generated points most likely will be rejected by Purger. As far as I know, Purger cannot process such cases, too.
(0078746)
git   
2018-08-23 16:55   
Branch CR30082 has been created by nbv.

SHA-1: 5d2dd87fa8162a8a754c017ee61d720b3d764e29


Detailed log of new commits:

Author: nbv
Date: Thu Aug 23 16:37:59 2018 +0300

    0030082: Intersection algorithm returns curve with big tolerance value
    
    The fix inserts new points at the end of the WLine in case when the direction of the intersection curve is significantly changed.
(0078753)
git   
2018-08-24 10:40   
Branch CR30082 has been updated forcibly by nbv.

SHA-1: 8fd2c1b7b3e818b9ddb94b0846564d327e757a09
(0078756)
git   
2018-08-24 12:24   
Branch CR30082 has been updated forcibly by nbv.

SHA-1: d660ea968f8ff54286d401aa3a1792d72565264b
(0078758)
nbv   
2018-08-24 15:20   
(edited on: 2018-08-27 16:00)
Dear Eugeny,

Please review th branch CR30082.

Test results are here: http://jenkins-test-12.nnov.opencascade.com/view/CR30082-master_NBV/ [^]

(0078795)
git   
2018-08-27 11:54   
Branch CR30082 has been updated forcibly by nbv.

SHA-1: a383745dcc04ca4f8890d1e2bc547a849f2e175a
(0078805)
emv   
2018-08-28 08:33   
src/IntPatch/IntPatch_ImpImpIntersection_4.gxx
- Make the comment more clear, explaining that the liner positioning of the points in the end of WLine does not describe the real intersection curve and by adding the additional points you're making the WLine more precise.
- Replace while(bAdd) loop with infinite loop
- lines 3404-3408 - describe the choice of the P2 point

tests/bugs/modalg_7/bug30082_1
- If you check the number of section curves produced, check also if no curves will be produced (analyze the result of regexp);
- Make the error message more informative saying what is expected in the result.

tests/bugs/modalg_7/bug30082_2
- Why not to perform the Section operation on the faces instead of fusing the section curves? You can perform all the checks on the result of section with the same efficiency (number of edges and vertices, tolerance, presence of gaps etc) but the script will look much simpler.
(0078810)
git   
2018-08-28 12:17   
Branch CR30082_1 has been created by nbv.

SHA-1: ba9a70e01cf81bb51f1aabe237de4475019b8a3a


Detailed log of new commits:

Author: nbv
Date: Thu Aug 23 16:37:59 2018 +0300

    0030082: Intersection algorithm returns curve with big tolerance value
    
    The fix inserts new points at the end of the WLine in case when the direction of the intersection curve is significantly changed.
(0078813)
nbv   
2018-08-28 14:37   
Dear Eugeny,

Please review CR30082_1 branch.

Test results are here: http://jenkins-test-12.nnov.opencascade.com/view/CR30082-master_NBV/ [^]
(0078814)
nbv   
2018-08-28 15:34   
> - Why not to perform the Section operation on the faces ...

This test checks geometrical intersector only. I.e. intersector called from GeomInt_IntSS algorithm. Therefore, there is no point in replacing it with intersector calling from IntTools_FaceFace (otherwise, intersection algorithms can be initialized differently).
(0078815)
git   
2018-08-28 15:37   
Branch CR30082_1 has been updated by nbv.

SHA-1: 81a4f94ede4c24a356be2afc973c1a38ec634bf7


Detailed log of new commits:

Author: nbv
Date: Tue Aug 28 15:35:21 2018 +0300

    # Corrections according to remarks

(0078816)
emv   
2018-08-28 15:43   
Reviewed.
(0078902)
bugmaster   
2018-08-31 17:23   
Combination -
OCCT branch : CR30082_1 SHA - ba9a70e01cf81bb51f1aabe237de4475019b8a3a
Products branch : master SHA - fdd59e29ebc3a27575d87f779d718af159f5b37b
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: 17462.60999999975 / 17510.19999999974 [-0.27%]
Products
Total CPU difference: 7452.000000000051 / 7448.370000000074 [+0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 17417.839252098503 / 17490.31731669841 [-0.41%]
Products
Total CPU difference: 8330.983803399997 / 8296.913184999985 [+0.41%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0079051)
git   
2018-09-09 13:05   
Branch CR30082_1 has been deleted by inv.

SHA-1: 81a4f94ede4c24a356be2afc973c1a38ec634bf7
(0079053)
git   
2018-09-09 13:05   
Branch CR30082 has been deleted by inv.

SHA-1: a383745dcc04ca4f8890d1e2bc547a849f2e175a