View Issue Details

IDProjectCategoryView StatusLast Update
0026894Open CASCADEOCCT:Modeling Algorithmspublic2016-12-09 16:40
ReporternbvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.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

  • bug26894 (1,627 bytes)
  • Capture.PNG (36,080 bytes)
  • Curves23178.PNG (7,108 bytes)

Relationships

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

Activities

nbv

2016-04-13 14:20

developer  

bug26894 (1,627 bytes)

bugmaster

2016-09-14 12:52

administrator   ~0057771

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.

nbv

2016-09-14 13:47

developer   ~0057775

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

nbv

2016-09-14 13:47

developer  

Capture.PNG (36,080 bytes)

nbv

2016-09-14 13:47

developer  

Curves23178.PNG (7,108 bytes)

nbv

2016-09-14 13:55

developer   ~0057777

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.

msv

2016-09-14 16:19

developer   ~0057791

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.

git

2016-09-28 13:29

administrator   ~0058248

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
    

nbv

2016-09-28 13:31

developer   ~0058250

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.

msv

2016-09-28 16:05

developer   ~0058271

I think intersector must return status NotDone in this case.

git

2016-09-29 11:42

administrator   ~0058294

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
    

nbv

2016-09-29 11:47

developer   ~0058297

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.

msv

2016-09-29 12:45

developer   ~0058309

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().

git

2016-09-29 14:41

administrator   ~0058318

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
    

nbv

2016-09-29 14:43

developer   ~0058319

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.

msv

2016-09-30 12:14

developer   ~0058336

Reviewed.

git

2016-09-30 12:27

administrator   ~0058340

Branch CR26894_2 has been updated forcibly by nbv.

SHA-1: 666f5549d1e30377a0ac110a23536fd8d13f75a8

nbv

2016-09-30 12:27

developer   ~0058341

Commit message has been corrected only.

git

2016-10-03 15:16

administrator   ~0058363

Branch CR26894_2 has been updated forcibly by apv.

SHA-1: 918f607ac32a17f678d03d83ebd6484e6b7fcc85

apv

2016-10-03 15:27

tester   ~0058367

Branches CR26894_2 (from occt git-reository) and CR26894_prod (from products git-repository) have been rebased to the current masters

git

2016-10-04 11:29

administrator   ~0058382

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

apv

2016-10-04 13:03

tester   ~0058388

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%]

git

2016-10-28 21:41

administrator   ~0059435

Branch CR26894 has been deleted by kgv.

SHA-1: 926b469a6b6948a0a187765283f0d7b2c78a4ba7

git

2016-10-28 21:41

administrator   ~0059436

Branch CR26894_1 has been deleted by kgv.

SHA-1: 76539bfe4594caeecc9d4e9ce2b46f6697b6d829

git

2016-10-28 21:41

administrator   ~0059437

Branch CR26894_2 has been deleted by kgv.

SHA-1: e6c19a24b9863f4d345410b5ec146fe6439e022b

Related Changesets

occt: master e146ef9a

2016-10-06 09:57:25

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
Affected Issues
0026894
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: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
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 aiv Status verified => closed
2016-12-09 16:40 aiv Fixed in Version => 7.1.0