MantisBT - Open CASCADE
View Issue Details
0027780Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2016-08-16 12:222016-12-09 16:38
msv 
bugmaster 
normalminor 
closedfixed 
[OCCT] 7.0.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs modalg_6 bug27780
0027780: Face-face intersection produces 2D curve that has reversed derivative at its end
Face-Face intersection produces 2D curve that has reversed derivative at its end. In addition, the reached tolerance is too big and has the value 0.00116.

The faces are given from the test "bugs modalg_1 buc60532".
restore [locate_data_file buc60532a.brep] p
restore [locate_data_file buc60532b.brep] t1
explode t1 f

bopcurves p t1_2 -2d -p 6.2406621764215551 0.23999999463558200 0.00034444887595448459 -5.0019657458625186

pcurve p
trim c c2d1_1 0 1
2dcvalue c 0 u0 v0
2dcvalue c 1 u1 v1 du dv
dset u01 u1-u0
dset v01 v1-v0
dset dot u01*du+v01*dv

if {[dval dot] < 0} {
  puts "Error: p-curve has inversed direction at its end"
} else {
  puts "OK: p-curve has correct direction at its end"
}

view 1 -2D- 728 450 400 400
don p_* c
2dfit
No tags attached.
png pcurve-reversed-at-end.PNG (5,487) 2016-08-16 12:22
https://tracker.dev.opencascade.org/
Issue History
2016-08-16 12:22msvNew Issue
2016-08-16 12:22msvAssigned To => msv
2016-08-16 12:22msvFile Added: pcurve-reversed-at-end.PNG
2016-08-16 12:26msvNote Added: 0056742
2016-08-16 12:40gitNote Added: 0056743
2016-08-16 15:11msvNote Added: 0056753
2016-08-16 15:11msvAssigned Tomsv => nbv
2016-08-16 15:11msvStatusnew => assigned
2016-08-16 15:19msvAssigned Tonbv => msv
2016-08-16 15:19msvStatusassigned => resolved
2016-08-16 15:20msvAssigned Tomsv => nbv
2016-08-16 17:21nbvNote Added: 0056760
2016-08-16 17:21nbvAssigned Tonbv => msv
2016-08-16 17:21nbvStatusresolved => assigned
2016-08-16 17:22nbvNote Edited: 0056760bug_revision_view_page.php?bugnote_id=56760#r14412
2016-08-16 17:38gitNote Added: 0056763
2016-08-16 17:39msvNote Added: 0056764
2016-08-16 17:39msvAssigned Tomsv => nbv
2016-08-16 17:39msvStatusassigned => resolved
2016-08-16 18:04nbvNote Added: 0056767
2016-08-16 18:04nbvAssigned Tonbv => bugmaster
2016-08-16 18:04nbvStatusresolved => reviewed
2016-08-16 18:14mkvAssigned Tobugmaster => mkv
2016-08-17 13:28mkvNote Added: 0056787
2016-08-17 13:28mkvNote Added: 0056788
2016-08-17 13:28mkvAssigned Tomkv => bugmaster
2016-08-17 13:28mkvStatusreviewed => tested
2016-08-17 13:28mkvTest case number => bugs modalg_6 bug27780
2016-08-19 10:09bugmasterNote Added: 0056851
2016-08-19 10:09bugmasterStatustested => verified
2016-08-19 10:09bugmasterResolutionopen => fixed
2016-08-23 10:38bugmasterStatusverified => assigned
2016-08-23 10:38bugmasterAssigned Tobugmaster => msv
2016-08-23 10:38bugmasterStatusassigned => resolved
2016-08-23 10:38bugmasterAssigned Tomsv => bugmaster
2016-08-23 10:38bugmasterStatusresolved => reviewed
2016-08-23 10:38bugmasterNote Deleted: 0056851
2016-08-23 10:39bugmasterStatusreviewed => tested
2016-08-26 11:53bugmasterChangeset attached => occt master 5185b161
2016-08-26 11:53bugmasterStatustested => verified
2016-08-26 16:22gitNote Added: 0057133
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0

Notes
(0056742)
msv   
2016-08-16 12:26   
Note that the intersector (bopcurves command) is called with a starting point (option -p). If it is called without starting point the result is well. The starting point is generated inside Boolean operation algorithm during edge-face intersection stage.
(0056743)
git   
2016-08-16 12:40   
Branch CR27780 has been created by msv.

SHA-1: 07f6682640dfac2bc44d354bc1121021442a84b8


Detailed log of new commits:

Author: msv
Date: Tue Aug 16 12:41:23 2016 +0300

    0027780: Face-face intersection produces 2D curve that has reversed derivative at its end
    
    The matter was that with starting point paased into intersector the walking line goes one point outside of the surface domain. Then during purging this extra point is removed from the line but its geometry is used for the last vertex. This makes a set of points invalid for approximation, and as a result we obtain the curve with reversed tangent direction at the end.
    
    The API of the method IntPatch_WLineTool::ComputePurgedWLine has been changed to insert a new Boolean parameter RestrictLine. If this parameter is false than the step of removing of outside points is skipped, and the result line is not distorted. This flag is determined inside IntTools_FaceFace to tell the intersector if it is needed to limit intersection line by surface domain.
    
    Test case has been added.
(0056753)
msv   
2016-08-16 15:11   
Dear Nikolay, please review.
(0056760)
nbv   
2016-08-16 17:21   
(edited on: 2016-08-16 17:22)
Dear MSV,

Please use RestrictLine variable (instead of constant Standard_True) in the first IntPatch_Intersection::Perform(...) method (see lines 949 and 915, file IntPatch_Intersection.cxx).

(0056763)
git   
2016-08-16 17:38   
Branch CR27780 has been updated by msv.

SHA-1: 3ca53e52690b68864ad608d7c02220af5c3f2e4b


Detailed log of new commits:

Author: msv
Date: Tue Aug 16 17:39:03 2016 +0300

    // Remark is considered.

(0056764)
msv   
2016-08-16 17:39   
Please review again.
(0056767)
nbv   
2016-08-16 18:04   
Reviewed!
(0056787)
mkv   
2016-08-17 13:28   
Dear BugMaster,
Branch CR27780 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 3ca53e52690b68864ad608d7c02220af5c3f2e4b

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1118

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27780-master-OCCT/Debian70-64/bugs/modalg_6/bug27780.html [^]
http://occt-tests/CR27780-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27780.html [^]
bugs modalg_6 bug27780: OK

Testing on Linux:
occt component :
Total MEMORY difference: 90243967 / 90469621 [-0.25%]
Total CPU difference: 19415.30000000002 / 19471.340000000095 [-0.29%]
products component :
Total MEMORY difference: 30025187 / 29987775 [+0.12%]
Total CPU difference: 5104.639999999967 / 5057.419999999975 [+0.93%]

Testing on Windows:
occt component :
Total MEMORY difference: 57154025 / 57162645 [-0.02%]
Total CPU difference: 18236.67290099886 / 17970.971997798883 [+1.48%]
products component :
Total MEMORY difference: 21271303 / 21236075 [+0.17%]
Total CPU difference: 4902.003822899952 / 4814.253260399945 [+1.82%]

There are no differences in images found by testdiff.
(0056788)
mkv   
2016-08-17 13:28   
Dear BugMaster,
Branch CR27780 is TESTED.
(0057133)
git   
2016-08-26 16:22   
Branch CR27780 has been deleted by inv.

SHA-1: 3ca53e52690b68864ad608d7c02220af5c3f2e4b