MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026894Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2015-11-18 11:172016-12-09 16:40
Reporternbv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0026894: Intersection algorithm between two infinite cylinders is hanging
DescriptionMethod IntPatch_Intersection::GeomGeomPerfom(...) returns "Not Done". Consequently, method IntPatch_Intersection::ParamParamPerfom(...) is called. It works very slow.
Steps To ReproduceShapes are as same as attached to the bug #26884.

restore [locate_data_file Bug26884-f1.brep] f1
restore [locate_data_file Bug26884-f2.brep] f2

mksurface ss1 f1
mksurface ss2 f2

dchrono cr reset

dchrono cr start
puts [intersect res ss1 ss2]
dchrono cr stop

puts [dchrono cr show]
TagsNo tags attached.
Test case numberbugs modalg_6 bug26894
Attached Files? file icon bug26894 (1,627 bytes) 2016-04-13 14:20
png file icon Capture.PNG (36,080 bytes) 2016-09-14 13:47
png file icon Curves23178.PNG (7,108 bytes) 2016-09-14 13:47

- Relationships
related to 0023178closedapn Community Intersection of cylinders fails to produce results 

-  Notes
(0057771)
bugmaster (administrator)
2016-09-14 12:52

Dear NBV,

You think that :

Elapsed time: 0 Hours 0 Minutes 6.3723911111 Seconds
CPU user time: 6.15625 seconds
CPU system time: 0.0625 seconds

it is very slow till now.
(0057775)
nbv (developer)
2016-09-14 13:47
edited on: 2016-09-14 13:48

Dear MSV,

I think, we can apply result 6 second. This is not ideal but...

However, there is another problem. On the MASTER, the intersection result is obtained by bi-parametric intersector (IntPatch_PrmPrmIntersection) despite both surfaces being analytical. PrmPrm-intersector works very slow with these surfaces (6 second on the current MASTER). And the intersection result is many small curves in limited region (i.e. in some part of space in spite of both cylinders being infinite).

At present, we have the fix for issue 0023178 (which will be integrated soon, I hope). Behavior of this test is different in this fix (see attached log - Capture.pNG).

New algorithm creates three continuous curves (see Curves23178.PNG attached picture). And these curves are prolonged in full space region. Start point of one curve is point with coordinates (3.13e-5, 8.06e+11, 2.83e+11) (i.e. almost infinite point on infinite cylinders). As result, this point cannot be projected to the cylinder by using OCCT-algorithm. What shall we do in this case?

P.S.

Performance of new algorithm is 0.23 sec (much more better than on the current MASTER).

(0057777)
nbv (developer)
2016-09-14 13:55

I think, the most optimal solution in this case is to obtain analytical intersection result (e.g. two parallel lines). However, we should correct corresponding condition for it.
(0057791)
msv (developer)
2016-09-14 16:19

To my mind, we should return fail status from intersector if the result should be an infinite curve of non-analytical type. It is not good to return two parallel lines, because they definitely will deviate from the target solution.
I think we should evaluate the extent of the result curve, and if the extent exceeds the number that can provide a reliable computations with cylinders of the given radius, we should consider the result infinite. I propose to define the limit for the extent as the radius divided by 1e+2 and multiplied by 1e+7. Thus, taking into account the number of valuable digits (15), we provide reliable computations with an error not exceeding R/100.

So, if the user wants to get an intersection of two almost parallel cylinders he must trim them before intersection.
(0058248)
git (administrator)
2016-09-28 13:29

Branch CR26894 has been created by nbv.

SHA-1: 926b469a6b6948a0a187765283f0d7b2c78a4ba7


Detailed log of new commits:

Author: nbv
Date: Wed Sep 28 11:06:49 2016 +0300

    0026894: Intersection algorithm between two infinite cylinders is hanging
    
(0058250)
nbv (developer)
2016-09-28 13:31

Dear Mikhail (MSV),

Please review CR26894 (for OCCT) and CR26894_prod (for OCCT-products) branches.

Ask to pay attention to the fact that they are rebased on the fix for issue 0023178. Therefore, there is no point in integrating (and testing) the current fix before the fix for issue 0023178.
(0058271)
msv (developer)
2016-09-28 16:05

I think intersector must return status NotDone in this case.
(0058294)
git (administrator)
2016-09-29 11:42

Branch CR26894_1 has been created by nbv.

SHA-1: 76539bfe4594caeecc9d4e9ce2b46f6697b6d829


Detailed log of new commits:

Author: nbv
Date: Wed Sep 28 11:06:49 2016 +0300

    0026894: Intersection algorithm between two infinite cylinders is hanging
    
(0058297)
nbv (developer)
2016-09-29 11:47

Dear Mikhail (MSV),

Please review CR26894_1 (for OCCT) and CR26894_prod (for OCCT-products) branches.

Ask to pay attention to the fact that they are rebased on the fix for issue 0023178. Therefore, there is no point in integrating (and testing) the current fix before the fix for issue 0023178.
(0058309)
msv (developer)
2016-09-29 12:45

Please make modifications so that not to touch other code calling Imp-Imp intersector. I.e., leave IsDone() returning boolean, and add a new method GetStatus().
(0058318)
git (administrator)
2016-09-29 14:41

Branch CR26894_2 has been created by nbv.

SHA-1: 0e330ed0366ee20bc9320d84240b4b6775b30f93


Detailed log of new commits:

Author: nbv
Date: Wed Sep 28 11:06:49 2016 +0300

    0026894: Intersection algorithm between two infinite cylinders is hanging
    
(0058319)
nbv (developer)
2016-09-29 14:43

Dear Mikhail (MSV),

Please review CR26894_2 (for OCCT) and CR26894_prod (for OCCT-products) branches.

Ask to pay attention to the fact that they are rebased on the fix for issue 0023178. Therefore, there is no point in integrating (and testing) the current fix before the fix for issue 0023178.
(0058336)
msv (developer)
2016-09-30 12:14

Reviewed.
(0058340)
git (administrator)
2016-09-30 12:27

Branch CR26894_2 has been updated forcibly by nbv.

SHA-1: 666f5549d1e30377a0ac110a23536fd8d13f75a8
(0058341)
nbv (developer)
2016-09-30 12:27

Commit message has been corrected only.
(0058363)
git (administrator)
2016-10-03 15:16

Branch CR26894_2 has been updated forcibly by apv.

SHA-1: 918f607ac32a17f678d03d83ebd6484e6b7fcc85
(0058367)
apv (tester)
2016-10-03 15:27

Branches CR26894_2 (from occt git-reository) and CR26894_prod (from products git-repository) have been rebased to the current masters
(0058382)
git (administrator)
2016-10-04 11:29

Branch CR26894_2 has been updated by apv.

SHA-1: e6c19a24b9863f4d345410b5ec146fe6439e022b


Detailed log of new commits:

Author: apv
Date: Tue Oct 4 11:29:07 2016 +0300

    Tuning of test case bugs modalg_6/bug26894

(0058388)
apv (tester)
2016-10-04 13:03

Dear BugMaster,

Branch CR26894_2 from occt git-repository (and CR26894_prod from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 918f607ac32a17f678d03d83ebd6484e6b7fcc85
SHA-1: 6c8b33e6430ad06d277f09f47303ba472ad36687

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1149

Regressions/Differences:
Not detected

Testing cases:
bugs modalg_6 bug26894 - OK
http://occt-tests/CR26894_2-CR26894_prod-OCCT/Debian70-64/bugs/modalg_6/bug26894.html [^]
http://occt-tests/CR26894_2-CR26894_prod-OCCT/Windows-64-VC10/bugs/modalg_6/bug26894.html [^]

Testing on Linux:
occt component:
Total MEMORY difference: 90844839 / 90537262 [+0.34%]
Total CPU difference: 19533.460000000032 / 19276.66999999978 [+1.33%]
products component:
Total MEMORY difference: 29940852 / 29950231 [-0.03%]
Total CPU difference: 5212.079999999975 / 5152.119999999983 [+1.16%]

Testing on Windows:
occt component:
Total MEMORY difference: 57231219 / 57236340 [-0.01%]
Total CPU difference: 18020.127912898668 / 18116.099728098634 [-0.53%]
products component:
Total MEMORY difference: 21278133 / 21238613 [+0.19%]
Total CPU difference: 4997.398434399947 / 4976.229098699953 [+0.43%]
(0059435)
git (administrator)
2016-10-28 21:41

Branch CR26894 has been deleted by kgv.

SHA-1: 926b469a6b6948a0a187765283f0d7b2c78a4ba7
(0059436)
git (administrator)
2016-10-28 21:41

Branch CR26894_1 has been deleted by kgv.

SHA-1: 76539bfe4594caeecc9d4e9ce2b46f6697b6d829
(0059437)
git (administrator)
2016-10-28 21:41

Branch CR26894_2 has been deleted by kgv.

SHA-1: e6c19a24b9863f4d345410b5ec146fe6439e022b

- Related Changesets
occt: master e146ef9a
Timestamp: 2016-10-06 09:57:25
Author: nbv
Committer: apn
Details ] Diff ]
0026894: Intersection algorithm between two infinite cylinders is hanging

1. VRange of intersection curve has been limited. As result, too oblong intersection curve(s) will be never returned.
2. Now, purger algorithm is not called for lines obtained by Geom-Geom intersection method.
3. New statuses are entered in IntPatch_ImpImpIntersection class. It makes intersection algorithm more informative and flexible for using.
4. Method IntPatch_ImpImpIntersection::GetStatus() has been created.

Tuning of test case bugs modalg_6/bug26894
mod - src/IntPatch/IntPatch_ImpImpIntersection.hxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpImpIntersection.lxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpImpIntersection_1.gxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpImpIntersection_2.gxx Diff ] File ]
mod - src/IntPatch/IntPatch_ImpImpIntersection_4.gxx Diff ] File ]
mod - src/IntPatch/IntPatch_Intersection.cxx Diff ] File ]
add - tests/bugs/modalg_6/bug26894 Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-11-18 11:17 nbv New Issue
2015-11-18 11:17 nbv Assigned To => msv
2015-11-18 11:17 nbv Relationship added related to 0026884
2015-11-18 11:21 nbv Relationship added related to 0023178
2016-04-13 14:20 nbv File Added: bug26894
2016-09-13 18:16 bugmaster Assigned To msv => bugmaster
2016-09-13 18:16 bugmaster Status new => feedback
2016-09-14 12:51 bugmaster Assigned To bugmaster => nbv
2016-09-14 12:52 bugmaster Note Added: 0057771
2016-09-14 13:47 nbv Note Added: 0057775
2016-09-14 13:47 nbv File Added: Capture.PNG
2016-09-14 13:47 nbv File Added: Curves23178.PNG
2016-09-14 13:48 nbv Note Edited: 0057775 View Revisions
2016-09-14 13:49 nbv Assigned To nbv => msv
2016-09-14 13:55 nbv Note Added: 0057777
2016-09-14 16:19 msv Note Added: 0057791
2016-09-14 16:19 msv Assigned To msv => nbv
2016-09-14 16:19 msv Status feedback => assigned
2016-09-28 13:29 git Note Added: 0058248
2016-09-28 13:31 nbv Note Added: 0058250
2016-09-28 13:31 nbv Assigned To nbv => msv
2016-09-28 13:31 nbv Status assigned => resolved
2016-09-28 16:05 msv Note Added: 0058271
2016-09-28 16:05 msv Assigned To msv => nbv
2016-09-28 16:05 msv Status resolved => assigned
2016-09-29 11:42 git Note Added: 0058294
2016-09-29 11:47 nbv Note Added: 0058297
2016-09-29 11:47 nbv Assigned To nbv => msv
2016-09-29 11:47 nbv Status assigned => resolved
2016-09-29 12:45 msv Note Added: 0058309
2016-09-29 12:45 msv Assigned To msv => nbv
2016-09-29 12:45 msv Status resolved => assigned
2016-09-29 14:41 git Note Added: 0058318
2016-09-29 14:43 nbv Note Added: 0058319
2016-09-29 14:43 nbv Assigned To nbv => msv
2016-09-29 14:43 nbv Status assigned => resolved
2016-09-30 12:14 msv Note Added: 0058336
2016-09-30 12:14 msv Assigned To msv => bugmaster
2016-09-30 12:14 msv Status resolved => reviewed
2016-09-30 12:27 git Note Added: 0058340
2016-09-30 12:27 nbv Note Added: 0058341
2016-10-03 12:35 mkv Assigned To bugmaster => apv
2016-10-03 15:16 git Note Added: 0058363
2016-10-03 15:27 apv Note Added: 0058367
2016-10-04 11:29 git Note Added: 0058382
2016-10-04 12:59 apv Test case number => bugs modalg_6 bug26894
2016-10-04 13:03 apv Note Added: 0058388
2016-10-04 13:03 apv Assigned To apv => bugmaster
2016-10-04 13:03 apv Status reviewed => tested
2016-10-07 16:09 apn Changeset attached => occt master e146ef9a
2016-10-07 16:09 apn Assigned To bugmaster => apn
2016-10-07 16:09 apn Status tested => verified
2016-10-07 16:09 apn Resolution open => fixed
2016-10-28 21:41 git Note Added: 0059435
2016-10-28 21:41 git Note Added: 0059436
2016-10-28 21:41 git Note Added: 0059437
2016-12-09 16:29 user533 Status verified => closed
2016-12-09 16:40 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker