View Issue Details

IDProjectCategoryView StatusLast Update
0027780Open CASCADEOCCT:Modeling Algorithmspublic2016-12-09 16:38
ReportermsvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.0.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027780: Face-face intersection produces 2D curve that has reversed derivative at its end
DescriptionFace-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".
Steps To Reproducerestore [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
TagsNo tags attached.
Test case numberbugs modalg_6 bug27780

Attached Files

  • pcurve-reversed-at-end.PNG (5,487 bytes)

Activities

msv

2016-08-16 12:22

developer  

pcurve-reversed-at-end.PNG (5,487 bytes)

msv

2016-08-16 12:26

developer   ~0056742

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.

git

2016-08-16 12:40

administrator   ~0056743

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.

msv

2016-08-16 15:11

developer   ~0056753

Dear Nikolay, please review.

nbv

2016-08-16 17:21

developer   ~0056760

Last edited: 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).

git

2016-08-16 17:38

administrator   ~0056763

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.

msv

2016-08-16 17:39

developer   ~0056764

Please review again.

nbv

2016-08-16 18:04

developer   ~0056767

Reviewed!

mkv

2016-08-17 13:28

tester   ~0056787

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.

mkv

2016-08-17 13:28

tester   ~0056788

Dear BugMaster,
Branch CR27780 is TESTED.

git

2016-08-26 16:22

administrator   ~0057133

Branch CR27780 has been deleted by inv.

SHA-1: 3ca53e52690b68864ad608d7c02220af5c3f2e4b

Related Changesets

occt: master 5185b161

2016-08-16 09:41:23

msv


Committer: bugmaster Details Diff
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.
Affected Issues
0027780
mod - src/IntPatch/IntPatch_Intersection.cxx Diff File
mod - src/IntPatch/IntPatch_WLineTool.cxx Diff File
mod - src/IntPatch/IntPatch_WLineTool.hxx Diff File
add - tests/bugs/modalg_6/bug27780 Diff File

Issue History

Date Modified Username Field Change
2016-08-16 12:22 msv New Issue
2016-08-16 12:22 msv Assigned To => msv
2016-08-16 12:22 msv File Added: pcurve-reversed-at-end.PNG
2016-08-16 12:26 msv Note Added: 0056742
2016-08-16 12:40 git Note Added: 0056743
2016-08-16 15:11 msv Note Added: 0056753
2016-08-16 15:11 msv Assigned To msv => nbv
2016-08-16 15:11 msv Status new => assigned
2016-08-16 15:19 msv Assigned To nbv => msv
2016-08-16 15:19 msv Status assigned => resolved
2016-08-16 15:20 msv Assigned To msv => nbv
2016-08-16 17:21 nbv Note Added: 0056760
2016-08-16 17:21 nbv Assigned To nbv => msv
2016-08-16 17:21 nbv Status resolved => assigned
2016-08-16 17:22 nbv Note Edited: 0056760
2016-08-16 17:38 git Note Added: 0056763
2016-08-16 17:39 msv Note Added: 0056764
2016-08-16 17:39 msv Assigned To msv => nbv
2016-08-16 17:39 msv Status assigned => resolved
2016-08-16 18:04 nbv Note Added: 0056767
2016-08-16 18:04 nbv Assigned To nbv => bugmaster
2016-08-16 18:04 nbv Status resolved => reviewed
2016-08-16 18:14 mkv Assigned To bugmaster => mkv
2016-08-17 13:28 mkv Note Added: 0056787
2016-08-17 13:28 mkv Note Added: 0056788
2016-08-17 13:28 mkv Assigned To mkv => bugmaster
2016-08-17 13:28 mkv Status reviewed => tested
2016-08-17 13:28 mkv Test case number => bugs modalg_6 bug27780
2016-08-19 10:09 bugmaster Status tested => verified
2016-08-19 10:09 bugmaster Resolution open => fixed
2016-08-23 10:38 bugmaster Status verified => assigned
2016-08-23 10:38 bugmaster Assigned To bugmaster => msv
2016-08-23 10:38 bugmaster Status assigned => resolved
2016-08-23 10:38 bugmaster Assigned To msv => bugmaster
2016-08-23 10:38 bugmaster Status resolved => reviewed
2016-08-23 10:39 bugmaster Status reviewed => tested
2016-08-26 11:53 bugmaster Changeset attached => occt master 5185b161
2016-08-26 11:53 bugmaster Status tested => verified
2016-08-26 16:22 git Note Added: 0057133
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0