MantisBT - Open CASCADE
View Issue Details
0026509Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2015-07-31 13:312018-10-28 16:13
nbv 
apn 
normalminor 
verifiedfixed 
[OCCT] 7.0.0 
[OCCT] 7.4.0* 
bugs modalg_7 bug26509_1, bug26509_2, bug26509_3, bug26509_4, bug26509_5, bug26509_6
0026509: Intersection algorithm produces set of curves providing closed contour in 3D-space and not closed contour in 2D-space
Intersection algorithm produces set of curves providing closed contour in 3D-space and not closed contour in 2D-space.

The reason of this fact is in incorrect adjusting of some segment (part of full intersection result) going completely along the boundary to the opposite boundary shifted by period.

In other words, the segment must go (in 2D-space) along the U-isoline U=0 but intersector returns this segment along the the U-isoline U=2*PI.

See the attached file Shifted 2D-curve.PNG
circle c1 0 0 0 0 -1 0 75
circle c2 0 0 0 0 -1 0 65
mkedge c1 c1
mkedge c2 c2
wire c1 c1
wire c2 c2
orientation c2 R
mkplane f1 c1 1
add c2 f1
prism p1 f1 0 1000 0
trotate p1 0 0 0 0 0 1 180
circle c3 50 500 -2000 0 0 1 50
mkedge c3 c3
wire c3 c3
mkplane f2 c3 1
prism p2 f2 0 0 4000
explode p1 f
explode p2 f
trotate p2_1 0 500 0 1 0 0 -77
trotate p2_1 0 0 0 0 0 1 180

bopcurves p1_2 p2_1 -2d
No tags attached.
child of 0024905verified apn Boolean cut produced invalid result 
png Shifted 2D-curve.PNG (28,703) 2018-10-24 11:30
https://tracker.dev.opencascade.org/
png Correct Splitting p-curve.PNG (17,139) 2018-10-25 11:46
https://tracker.dev.opencascade.org/
Issue History
2015-07-31 13:31pkvNew Issue
2015-07-31 13:31pkvAssigned To => msv
2015-07-31 13:31pkvFile Added: figure01.jpg
2015-07-31 13:32pkvFile Added: fb1_2
2015-07-31 13:32pkvFile Added: fb2_1
2015-07-31 13:33pkvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11138#r11138
2015-07-31 13:33pkvRelationship addedchild of 0024905
2015-07-31 13:34pkvStatusnew => assigned
2015-07-31 14:37msvAssigned Tomsv => nbv
2015-10-28 11:22msvTarget Version7.0.0 => 7.1.0
2016-10-25 17:18nbvNote Added: 0059113
2016-10-25 17:44msvTarget Version7.1.0 => 7.2.0
2017-07-24 09:33msvTarget Version7.2.0 => 7.3.0
2017-12-05 17:08msvTarget Version7.3.0 => 7.4.0*
2018-10-22 15:19nbvNote Added: 0080194
2018-10-22 15:19nbvAssigned Tonbv => msv
2018-10-22 15:19nbvStatusassigned => feedback
2018-10-22 16:00msvNote Added: 0080197
2018-10-22 16:00msvAssigned Tomsv => nbv
2018-10-22 16:00msvStatusfeedback => assigned
2018-10-23 18:32gitNote Added: 0080240
2018-10-24 09:55gitNote Added: 0080250
2018-10-24 11:30nbvReporterpkv => nbv
2018-10-24 11:30nbvSummaryWrong intersection curve(s) obtained for pair of faces. => Intersection algorithm produces set of curves providing closed contour in 3D-space and not closed contour in 2D-space
2018-10-24 11:30nbvDescription Updatedbug_revision_view_page.php?rev_id=20184#r20184
2018-10-24 11:30nbvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20185#r20185
2018-10-24 11:30nbvFile Added: Shifted 2D-curve.PNG
2018-10-24 11:30nbvFile Deleted: figure01.jpg
2018-10-24 11:31nbvFile Deleted: fb1_2
2018-10-24 11:31nbvFile Deleted: fb2_1
2018-10-24 11:32nbvNote Added: 0080256
2018-10-24 11:34gitNote Added: 0080257
2018-10-25 11:46nbvFile Added: Correct Splitting p-curve.PNG
2018-10-25 11:46nbvNote Added: 0080300
2018-10-25 12:01gitNote Added: 0080301
2018-10-25 14:25nbvNote Edited: 0080300bug_revision_view_page.php?bugnote_id=80300#r20195
2018-10-25 14:28nbvNote Edited: 0080300bug_revision_view_page.php?bugnote_id=80300#r20196
2018-10-25 14:30nbvNote Edited: 0080300bug_revision_view_page.php?bugnote_id=80300#r20197
2018-10-25 15:36nbvNote Added: 0080317
2018-10-25 15:36nbvAssigned Tonbv => msv
2018-10-25 15:36nbvStatusassigned => resolved
2018-10-25 15:40msvNote Added: 0080319
2018-10-25 15:40msvAssigned Tomsv => bugmaster
2018-10-25 15:40msvStatusresolved => reviewed
2018-10-25 17:15apnTest case number => bugs modalg_7 bug26509_1, bug26509_2, bug26509_3, bug26509_4, bug26509_5, bug26509_6
2018-10-25 17:15apnNote Added: 0080331
2018-10-25 17:15apnStatusreviewed => tested
2018-10-28 13:20apnChangeset attached => occt master cdcf6fc2
2018-10-28 13:20apnAssigned Tobugmaster => apn
2018-10-28 13:20apnStatustested => verified
2018-10-28 13:20apnResolutionopen => fixed
2018-10-28 16:13gitNote Added: 0080406

Notes
(0059113)
nbv   
2016-10-25 17:18   
The bug is still reproduced on the current MASTER.

The result depends on the input tolerance heavily. E.g.

mksurf ss1 b1
mksurf ss2 b2
intersect ii ss1 ss2
# The result seems to be OK.

intersect ii ss1 ss2 2.0e-7
# WRONG
(0080194)
nbv   
2018-10-22 15:19   
Dear Mikhail,

The result seems to be OK on the current MASTER.
(0080197)
msv   
2018-10-22 16:00   
Please create test case.
(0080240)
git   
2018-10-23 18:32   
Branch CR26509 has been created by nbv.

SHA-1: 191d8fbe0f915ce2a21a2004ea1b46cf0133b86d


Detailed log of new commits:

Author: nbv
Date: Tue Oct 23 16:58:59 2018 +0300

    0026509: Wrong intersection curve(s) obtained for pair of faces.
    
    Algorithm of processing cases when the intersection curve has a segment along U-boundary of the surface has been improved.
(0080250)
git   
2018-10-24 09:55   
Branch CR26509 has been updated forcibly by nbv.

SHA-1: 6c558f8e5e4d28efb1a323c7f81918ffca49e821
(0080256)
nbv   
2018-10-24 11:32   
Description has been updated according to the behavior on the current MASTER.
(0080257)
git   
2018-10-24 11:34   
Branch CR26509 has been updated forcibly by nbv.

SHA-1: 68b73dada1dee04764b1612ba24ee3366f809dac
(0080300)
nbv   
2018-10-25 11:46   
(edited on: 2018-10-25 14:30)
Since the integration of the fix 0024905, the described problem has not to lead to any problems in high-level OCCT-algorithms.

The intersection algorithm between two cylindrical faces (since integration the fix #24915, the logic of Cylinder-Cylinder intersector significantly differs from the logic of intersector between other quadrics) checks the derivative (it can be said without going into detail) of 2D-intersection curve, which starts in the seam. In case shown in the attached picture "Shifted 2D-curve.PNG" this derivative is directed left (out of the boundary U=0; however, the angle between it and the vector {0,1} is about 1.0e-8; i.e. quite small but does not equal to 0). I.e. the algorithm "thinks" that this curve will be out of the face's boundary (U=0) in case if it will be continued. Therefore, it moves the curve to opposite boundary (U=2*PI). In my point of view, this behavior is good and is not needed to be changed.

Moreover, in the next case, 2D-curve is divided on two separated parts properly (see "Correct Splitting p-curve.PNG" attached picture):

    pcylinder cy1 100 500
    pcylinder cy2 20 500
    trotate cy2 0 0 250 0 1 0 90
    ttranslate cy2 200 0 0
    explode cy1 f
    explode cy2 f
    don cy1_1 cy2_1
    av2d; fit

    bopcurves cy1_1 cy2_1 -2d

    2dclear
    disp c2d1_*
    2dfit
    pcurve cy1_1


(0080301)
git   
2018-10-25 12:01   
Branch CR26509 has been updated forcibly by nbv.

SHA-1: c0b814951d7f43bd189dee0c846b14d7bdcdd6a9
(0080317)
nbv   
2018-10-25 15:36   
Dear Mikhail,

Please review the current state of the branch CR26509. New test cases have been created only.

Test results are here: http://jenkins-test-12.nnov.opencascade.com/view/CR26509-master-NBV/ [^]
(0080319)
msv   
2018-10-25 15:40   
Reviewed.
(0080331)
apn   
2018-10-25 17:15   
bugs modalg_7 bug26509_1 - OK
bugs modalg_7 bug26509_2 - OK
bugs modalg_7 bug26509_3 - OK
bugs modalg_7 bug26509_4 - OK
bugs modalg_7 bug26509_5 - OK
bugs modalg_7 bug26509_6 - OK
(0080406)
git   
2018-10-28 16:13   
Branch CR26509 has been deleted by inv.

SHA-1: c0b814951d7f43bd189dee0c846b14d7bdcdd6a9