View Issue Details

IDProjectCategoryView StatusLast Update
0029356CommunityOCCT:Modeling Algorithmspublic2018-06-29 21:21
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version7.0.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
DescriptionGCPnts_TangentialDeflection hangs while computing Wireframe presentation for attached shape imported from IGES:
https://www.opencascade.com/content/surface-display-crash

There is no issue making a Shaded presentation.
The bug appeared in OCCT 7.0.0 (problem is not reproducible on OCCT 6.9.1).
Steps To Reproduce
pload VISUALIZATION XDE
cpulimit 100
testreadiges problemmodel.igs a
#checkshape a a
vclear
vinit View1
vdisplay -dispMode 0 a
vfit
meminfo

Result: KO, viewer hangs.
TagsNo tags attached.
Test case numberv3d face G1, v3d face G2, v3d face G3, v3d face G4

Attached Files

  • bug29356.igs (24,108 bytes)

Activities

msv

2017-11-30 10:49

developer   ~0072607

I looked at the stack under debugger and found out that the problem is in generation of iso-lines using Hatch_Hatcher algorithm. See the file StdPrs_Isolines.cxx line 509:
      Standard_Real anIsoParam = aHatcher.Coordinate (anI);

The parameter returned by hatcher for this case is equal to 968675.43832409300. The surface U range is [1437351.814,1437358.332]. So, the parameter of computed iso-line is far out of range. Dump of such iso-line looks very ugly:
*********** Dump of i *************
BSplineCurve
  Degree 5, 6 Poles, 2  Knots
Poles :

   1 : 1.1505003582441e+018, -8.83973126067367e+018, -7.07625357548475e+018
   2 : 1.34293124256749e+018, -6.34107467375981e+018, -6.1920120716081e+018
   3 : -1.9246641904371e+018, -7.30241823771635e+018, -5.2885669053654e+018
   4 : -1.54002657325621e+018, -7.49484846321211e+018, -4.51969838728099e+018
   5 : -2.69320055903921e+018, -7.11061392318922e+018, -3.96229371150243e+018
   6 : -1.34744884480842e+018, -4.61190301472812e+018, -2.86667369629048e+018
Knots :

   1 :  0 6
   2 :  13.06506657 6

msv

2017-11-30 10:56

developer   ~0072609

The simple workaround is to skip drawing iso-line if it is out of surface domain.
But more correct way is to debug hatcher algorithm.

kgv

2017-12-26 21:53

developer   ~0073159

Dear Mikhail,

does it makes sense adding this (or maybe corrected) workaround to StdPrs_Isolines?

> Hereunder are the lines added to the StdPrs_Isolines.cxx file
> in the function addOnSurface line 512 (ver. 7.2.0):
> if (anIsoParam <  theSurface->FirstUParameter()
> || anIsoParam >  theSurface->LastUParameter())
>    continue;

msv

2017-12-27 09:30

developer   ~0073161

Yes, it makes sense. But you need to use *UParameter or *VParameter according to isIsoU flag.
Also, it may be necessary to skip this filter for a surface periodic in this direction.

msv

2017-12-27 09:32

developer   ~0073162

BTW, hatcher may be not the cause of the problem, because incorrect parameters can be passed to it from upper level algo.

msv

2017-12-27 10:02

developer   ~0073163

Dear Natalia, please investigate why such incorrect parameters are passed to the hatcher.

git

2018-01-29 11:27

administrator   ~0073641

Branch CR29356 has been created by nds.

SHA-1: c13fdd74562c8099f482d30218f09e7d3492c9af


Detailed log of new commits:

Author: nds
Date: Mon Jan 29 11:27:45 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    Additional check in StdPrs_Isolines for a case when minimum and maximum values of UV Face parameters are out of UVLimit. In such case, the class does not collect these parameter values.

Author: nds
Date: Mon Jan 29 11:19:36 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    Additional check in StdPrs_Isolines for a case when minimum and maximum values of UV Face parameters are out of UVLimit. In such case, the class does not collect these parameter values.

git

2018-01-29 12:33

administrator   ~0073644

Branch CR29356 has been updated by nds.

SHA-1: 3c5e069df0d9d3794247b7464dc287cc8a6ab82a


Detailed log of new commits:

Author: nds
Date: Mon Jan 29 12:33:27 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    Additional check in StdPrs_Isolines for a case when minimum and maximum values of UV Face parameters are out of UVLimit. In such case, the class does not collect these parameter values.

nds

2018-01-29 12:36

developer   ~0073646

Dear msv,

could you please put the attached file in test data base repository.

Thank you in advance

msv

2018-01-29 12:58

developer   ~0073648

Done.

git

2018-01-31 13:09

administrator   ~0073694

Branch CR29356 has been updated by nds.

SHA-1: e5fcecef98a02686b1af3e89f68df00748b690f7


Detailed log of new commits:

Author: nds
Date: Wed Jan 31 13:09:28 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    #script input file is renamed to bug29356.igs

git

2018-01-31 13:24

administrator   ~0073695

Branch CR29356_1 has been created by nds.

SHA-1: ede4b01ea880530ea2af096ab75003746db4ead5


Detailed log of new commits:

Author: nds
Date: Mon Jan 29 11:19:36 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    While UV Iso parameters are obtained in StdPrs_Isolines, UV limits should be applied only if face bounds has infinite values.
    In the issue case, the UV values are greater than UVLimits and not infinite. This fix makes possible to have correct Iso lines in presentation without modification of UV limits beforehead.

nds

2018-01-31 13:25

developer  

bug29356.igs (24,108 bytes)

nds

2018-01-31 13:26

developer   ~0073697

Dear msv,

could you please review the issue.

Build on jenkins is: http://jenkins-test-10.nnov.opencascade.com/view/CR29356-master-NDS/

Thank you in advance.

msv

2018-01-31 17:25

developer   ~0073705

Please consider verbal remarks.

git

2018-03-05 10:29

administrator   ~0074244

Branch CR29356_1 has been updated by nds.

SHA-1: 1aba1c08c0d54d82ada83488ecfea040da316217


Detailed log of new commits:

Author: nds
Date: Mon Mar 5 10:29:13 2018 +0300

    # correcting condition to process each limit independently
    
    # providing additional v3d test cases for visos command and setMaxParamValue parameter of vaspects command.

git

2018-03-05 10:39

administrator   ~0074245

Branch CR29356_2 has been created by nds.

SHA-1: 0460b2cdb1712968635c4c6b4938bbea1a4a0798


Detailed log of new commits:

Author: nds
Date: Mon Jan 29 11:19:36 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    While UV Iso parameters are obtained in StdPrs_Isolines, UV limits should be applied only if face bounds has infinite values.
    In the issue case, the UV values are greater than UVLimits and not infinite. This fix makes possible to have correct Iso lines in presentation without modification of UV limits beforehead.

nds

2018-03-05 15:41

developer   ~0074254

Please, review modifications

http://jenkins-test-10.nnov.opencascade.com:8080/view/CR29356_2-master-NDS

msv

2018-03-07 09:50

developer   ~0074337

The code looks ugly:
+  if (Precision::IsInfinite (aUmin))
+    aUmin = Max (aUmin, -theUVLimit);

It should be changed so:
+  if (Precision::IsInfinite (aUmin))
+    aUmin = -theUVLimit;


The test bugs/modalg_7/bug29356_1 seems to repeat the new script v3d/face/G2. Please remove duplicate.

git

2018-03-07 10:11

administrator   ~0074339

Branch CR29356_2 has been updated by nds.

SHA-1: 1fc79a99562eb7ef7032d9bad2e1f79809ca2e41


Detailed log of new commits:

Author: nds
Date: Wed Mar 7 10:11:32 2018 +0300

    # correcting by the issue remarks: simplify code conditions, remove duplicated test case

git

2018-03-07 10:16

administrator   ~0074340

Branch CR29356_3 has been created by nds.

SHA-1: 3f56107bfe9e0c23a6c1e37ebf144b64da3776c4


Detailed log of new commits:

Author: nds
Date: Mon Jan 29 11:19:36 2018 +0300

    0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
    
    While UV Iso parameters are obtained in StdPrs_Isolines, UV limits should be applied only if face bounds has infinite values.
    In the issue case, the UV values are greater than UVLimits and not infinite. This fix makes possible to have correct Iso lines in presentation without modification of UV limits beforehead.

git

2018-03-07 14:38

administrator   ~0074350

Branch CR29356_3 has been updated by nds.

SHA-1: e612867e5579b35ffd493eec49779c3b9ce5020a


Detailed log of new commits:

Author: nds
Date: Wed Mar 7 14:38:05 2018 +0300

    # correcting test case to dump result without automatic fit view

git

2018-03-07 15:02

administrator   ~0074351

Branch CR29356_3 has been updated by nds.

SHA-1: ed5ec94e00aa605a9d350f9b9f3d524cdfdaf026


Detailed log of new commits:

Author: nds
Date: Wed Mar 7 15:02:23 2018 +0300

    # correcting test case to dump result without automatic fit view

nds

2018-03-07 15:14

developer   ~0074352

Please, review modifications

http://jenkins-test-10.nnov.opencascade.com/view/CR29356_3-master-NDS/

msv

2018-03-07 15:47

developer   ~0074356

Reviewed.

bugmaster

2018-03-07 16:24

administrator   ~0074358

Combination -
OCCT branch : CR29356_3 SHA - 3f56107bfe9e0c23a6c1e37ebf144b64da3776c4
Products branch : master SHA - 4fd289ec73d35d02f23f3990c73b3acac9a60574
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18309.269999999546 / 18338.37999999957 [-0.16%]
Products
Total CPU difference: 7488.200000000005 / 7461.340000000009 [+0.36%]
Windows-64-VC10:
OCCT
Total CPU difference: 17709.264720198506 / 17653.338361698563 [+0.32%]
Products
Total CPU difference: 8014.644975599993 / 7990.761222500007 [+0.30%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2018-03-19 10:05

administrator   ~0074601

Branch CR29356 has been deleted by kgv.

SHA-1: e5fcecef98a02686b1af3e89f68df00748b690f7

git

2018-03-19 10:05

administrator   ~0074602

Branch CR29356_1 has been deleted by kgv.

SHA-1: 1aba1c08c0d54d82ada83488ecfea040da316217

git

2018-03-19 10:05

administrator   ~0074603

Branch CR29356_2 has been deleted by kgv.

SHA-1: 1fc79a99562eb7ef7032d9bad2e1f79809ca2e41

git

2018-03-19 10:05

administrator   ~0074604

Branch CR29356_3 has been deleted by kgv.

SHA-1: ed5ec94e00aa605a9d350f9b9f3d524cdfdaf026

Related Changesets

occt: master d4efee2b

2018-01-29 08:19:36

nds


Committer: bugmaster Details Diff
0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve

While UV Iso parameters are obtained in StdPrs_Isolines, UV limits should be applied only if face bounds has infinite values.
In the issue case, the UV values are greater than UVLimits and not infinite. This fix makes possible to have correct Iso lines in presentation without modification of UV limits beforehead.
Affected Issues
0029356
mod - src/StdPrs/StdPrs_Isolines.cxx Diff File
add - tests/v3d/face/G1 Diff File
add - tests/v3d/face/G2 Diff File
add - tests/v3d/face/G3 Diff File
add - tests/v3d/face/G4 Diff File

Issue History

Date Modified Username Field Change
2017-11-30 08:36 kgv New Issue
2017-11-30 08:36 kgv Assigned To => msv
2017-11-30 08:36 kgv File Added: ProblemModel.igs
2017-11-30 08:37 kgv Product Version 7.2.0 => 7.0.0
2017-11-30 08:37 kgv Description Updated
2017-11-30 10:49 msv Note Added: 0072607
2017-11-30 10:56 msv Note Added: 0072609
2017-12-26 21:53 kgv Note Added: 0073159
2017-12-27 09:30 msv Note Added: 0073161
2017-12-27 09:32 msv Note Added: 0073162
2017-12-27 10:02 msv Note Added: 0073163
2017-12-27 10:02 msv Assigned To msv => nds
2017-12-27 10:02 msv Status new => assigned
2018-01-29 11:27 git Note Added: 0073641
2018-01-29 12:33 git Note Added: 0073644
2018-01-29 12:34 nds File Deleted: ProblemModel.igs
2018-01-29 12:34 nds File Added: OCC29356.igs
2018-01-29 12:36 nds Note Added: 0073646
2018-01-29 12:58 msv Note Added: 0073648
2018-01-31 13:07 nds File Deleted: OCC29356.igs
2018-01-31 13:09 git Note Added: 0073694
2018-01-31 13:24 git Note Added: 0073695
2018-01-31 13:25 nds File Added: bug29356.igs
2018-01-31 13:26 nds Note Added: 0073697
2018-01-31 13:26 nds Assigned To nds => msv
2018-01-31 13:26 nds Status assigned => resolved
2018-01-31 17:25 msv Note Added: 0073705
2018-01-31 17:25 msv Assigned To msv => nds
2018-01-31 17:25 msv Status resolved => assigned
2018-03-05 10:29 git Note Added: 0074244
2018-03-05 10:39 git Note Added: 0074245
2018-03-05 15:41 nds Note Added: 0074254
2018-03-05 15:41 nds Assigned To nds => msv
2018-03-05 15:41 nds Status assigned => resolved
2018-03-05 15:41 nds Target Version 7.4.0 => 7.3.0
2018-03-07 09:50 msv Note Added: 0074337
2018-03-07 09:50 msv Assigned To msv => nds
2018-03-07 09:50 msv Status resolved => assigned
2018-03-07 10:11 git Note Added: 0074339
2018-03-07 10:16 git Note Added: 0074340
2018-03-07 14:38 git Note Added: 0074350
2018-03-07 15:02 git Note Added: 0074351
2018-03-07 15:14 nds Note Added: 0074352
2018-03-07 15:14 nds Assigned To nds => msv
2018-03-07 15:14 nds Status assigned => resolved
2018-03-07 15:47 msv Note Added: 0074356
2018-03-07 15:47 msv Assigned To msv => bugmaster
2018-03-07 15:47 msv Status resolved => reviewed
2018-03-07 16:21 bugmaster Test case number => v3d face G1, v3d face G2, v3d face G3, v3d face G4
2018-03-07 16:24 bugmaster Note Added: 0074358
2018-03-07 16:24 bugmaster Status reviewed => tested
2018-03-18 13:21 bugmaster Changeset attached => occt master d4efee2b
2018-03-18 13:21 bugmaster Status tested => verified
2018-03-18 13:21 bugmaster Resolution open => fixed
2018-03-19 10:05 git Note Added: 0074601
2018-03-19 10:05 git Note Added: 0074602
2018-03-19 10:05 git Note Added: 0074603
2018-03-19 10:05 git Note Added: 0074604
2018-06-29 21:16 aiv Fixed in Version => 7.3.0
2018-06-29 21:21 aiv Status verified => closed