Archived issue #0029356
Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
Description
GCPnts_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).
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.
Public activity
29 archived notes
Participants are labeled by their role within this record.
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:
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:
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
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.
But more correct way is to debug hatcher algorithm.
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):
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;
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.
Also, it may be necessary to skip this filter for a surface periodic in this direction.
BTW, hatcher may be not the cause of the problem, because incorrect parameters can be passed to it from upper level algo.
Dear Natalia, please investigate why such incorrect parameters are passed to the hatcher.
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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: Commenter 3
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.
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
Dear msv,
could you please put the attached file in test data base repository.
Thank you in advance
could you please put the attached file in test data base repository.
Thank you in advance
Done.
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Jan 31 13:09:28 2018 +0300
0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
#script input file is renamed to Attachment 1 (IGS)
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Jan 31 13:09:28 2018 +0300
0029356: Modeling Algorithms - GCPnts_TangentialDeflection hangs on specific curve
#script input file is renamed to Attachment 1 (IGS)
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
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.
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.
Please consider verbal remarks.
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
Please, review modifications
http://jenkins-test-10.nnov.opencascade.com:8080/view/CR29356_2-master-NDS
http://jenkins-test-10.nnov.opencascade.com:8080/view/CR29356_2-master-NDS
The code looks ugly:
It should be changed so:
The test bugs/modalg_7/bug29356_1 seems to repeat the new script v3d/face/G2. Please remove duplicate.
+ 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.
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 10:11:32 2018 +0300
# correcting by the issue remarks: simplify code conditions, remove duplicated test case
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 10:11:32 2018 +0300
# correcting by the issue remarks: simplify code conditions, remove duplicated test case
Branch [archived branch] has been created by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
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.
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 14:38:05 2018 +0300
# correcting test case to dump result without automatic fit view
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 14:38:05 2018 +0300
# correcting test case to dump result without automatic fit view
Branch [archived branch] has been updated by Commenter 3.
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 15:02:23 2018 +0300
# correcting test case to dump result without automatic fit view
[revision removed]
Detailed log of new commits:
Author: Commenter 3
Date: Wed Mar 7 15:02:23 2018 +0300
# correcting test case to dump result without automatic fit view
Reviewed.
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]