MantisBT - Community
View Issue Details
0028244Community[OCCT] OCCT:Visualizationpublic2016-12-19 09:442017-09-29 16:31
Vico Liang 
kgv 
lowminor 
closedfixed 
[OCCT] 6.9.1 
[OCCT] 7.2.0[OCCT] 7.2.0 
v3d dimensions angle180
0028244: Visualization - AIS_AngleDimension throws exception for 180 degree
gp_Pnt aP0(-100, 0, 0);
gp_Pnt aP1(0, 0, 0);
gp_Pnt aP2(100, 0, 0);
AIS_AngleDimension myAngleDimension = new AIS_AngleDimension(aP0, aP1, aP2);

The above new operator will throw and the stack as below:

     TKernel.dll!Standard_ConstructionError::Throw() Line 10 C++
     TKernel.dll!Standard_Failure::Reraise() Line 153 C++
     TKernel.dll!Standard_Failure::Reraise(const char * const AString=0x000007fedcfe4668) Line 136 C++
     TKernel.dll!Standard_ConstructionError::Raise(const char * const AString=0x000007fedcfe4668) Line 10 C++
     TKV3d.dll!gp_Vec::Normalized() Line 234 C++
     TKV3d.dll!AIS_AngleDimension::ComputePlane() Line 516 C++
> TKV3d.dll!AIS_AngleDimension::SetMeasuredGeometry(const gp_Pnt & theFirstPoint={...}, const gp_Pnt & theSecondPoint={...}, const gp_Pnt & theThirdPoint={...}) Line 183 C++
v3d dimensions angle
No tags attached.
Issue History
2016-12-19 09:44Vico LiangNew Issue
2016-12-19 09:44Vico LiangAssigned To => kgv
2016-12-19 12:34kgvNote Added: 0061847
2016-12-19 12:34kgvAssigned Tokgv => Vico Liang
2016-12-19 12:34kgvStatusnew => feedback
2016-12-19 15:39Vico LiangAssigned ToVico Liang => kgv
2016-12-19 15:39Vico LiangDescription Updatedbug_revision_view_page.php?rev_id=15627#r15627
2016-12-19 15:39Vico LiangSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15629#r15629
2016-12-19 15:40Vico LiangStatusfeedback => assigned
2016-12-19 15:47kgvNote Added: 0061862
2016-12-19 15:47kgvNote Edited: 0061862bug_revision_view_page.php?bugnote_id=61862#r15631
2016-12-20 04:54Vico LiangNote Added: 0061888
2016-12-20 05:04Vico LiangNote Added: 0061889
2016-12-20 10:02kgvAssigned Tokgv => isk
2016-12-20 10:02kgvSummaryAIS_AngleDimension throw for 180 degree => Visualization - AIS_AngleDimension throws exception for 180 degree
2016-12-20 10:02kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15632#r15632
2016-12-21 08:59gitNote Added: 0061932
2016-12-21 09:20gitNote Added: 0061933
2016-12-21 09:21iskNote Added: 0061934
2016-12-21 09:21iskAssigned Toisk => kgv
2016-12-21 09:21iskStatusassigned => resolved
2016-12-21 09:21iskSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15648#r15648
2016-12-21 14:55gitNote Added: 0061953
2016-12-21 15:01gitNote Added: 0061954
2016-12-21 15:03kgvNote Added: 0061955
2016-12-21 15:03kgvAssigned Tokgv => bugmaster
2016-12-21 15:03kgvPrioritynormal => low
2016-12-21 15:03kgvStatusresolved => reviewed
2016-12-21 15:10mkvAssigned Tobugmaster => mkv
2016-12-22 11:20mkvNote Added: 0061989
2016-12-22 11:20gitNote Added: 0061990
2016-12-22 11:20mkvNote Added: 0061991
2016-12-22 11:20mkvAssigned Tomkv => bugmaster
2016-12-22 11:20mkvStatusreviewed => tested
2016-12-22 11:21mkvTest case number => v3d dimensions angle180
2016-12-23 12:09kgvChangeset attached => occt master 0f0f0c06
2016-12-23 12:09kgvAssigned Tobugmaster => kgv
2016-12-23 12:09kgvStatustested => verified
2016-12-23 12:09kgvResolutionopen => fixed
2017-02-08 11:32gitNote Added: 0063569
2017-09-29 16:21aivFixed in Version => 7.2.0
2017-09-29 16:31aivStatusverified => closed

Notes
(0061847)
kgv   
2016-12-19 12:34   
Please provide a test case, not just a call stack.
(0061862)
kgv   
2016-12-19 15:47   
Even if protection will be added to this use case, the result will be not very useful anyway - it is not possible defining a plane for placing dimension from the line.
AIS_AngleDimension::SetCustomPlane() should be used to specify desired user plane and then AIS_AngleDimension::SetMeasuredGeometry() with these three points.

(0061888)
Vico Liang   
2016-12-20 04:54   
Anyway, it should not throw in constructor otherwise there is no way to SetCustomPlane()
(0061889)
Vico Liang   
2016-12-20 05:04   
An alter solution is to add an optional argument gp_Pln in constructor to specify the custom plane.
(0061932)
git   
2016-12-21 08:59   
Branch CR28244 has been created by isk.

SHA-1: da68d06036cb952081b3a6a9aee3fbef81c67856


Detailed log of new commits:

Author: isk
Date: Wed Dec 21 08:59:49 2016 +0300

    0028244: Visualization - AIS_AngleDimension throws exception for 180 degree
(0061933)
git   
2016-12-21 09:20   
Branch CR28244 has been updated forcibly by isk.

SHA-1: fc893bca75369b9345cd62f54fe3802e2c77a6bd
(0061934)
isk   
2016-12-21 09:21   
Dear Kirill,
please review the branch CR28244.
(0061953)
git   
2016-12-21 14:55   
Branch CR28244 has been updated forcibly by isk.

SHA-1: 999be5af4984b1ad184ab44bf2bf0108ce2aa2c8
(0061954)
git   
2016-12-21 15:01   
Branch CR28244 has been updated forcibly by isk.

SHA-1: f8303aaa160d36834fe0d068801ee18050bd09a7
(0061955)
kgv   
2016-12-21 15:03   
Please test the patch.
(0061989)
mkv   
2016-12-22 11:20   
Dear BugMaster,
Branch CR28244 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: f8303aaa160d36834fe0d068801ee18050bd09a7

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1138

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28244-master-OCCT/Debian70-64/v3d/dimensions/angle180.html [^]
http://occt-tests/CR28244-master-OCCT/Windows-64-VC10/v3d/dimensions/angle180.html [^]
v3d dimensions angle180: OK

Testing on Linux:
occt component :
Total MEMORY difference: 93401468 / 92903937 [+0.54%]
Total CPU difference: 21670.370000000148 / 21640.29000000027 [+0.14%]
products component :
Total MEMORY difference: 30087279 / 30067682 [+0.07%]
Total CPU difference: 5334.169999999961 / 5288.109999999972 [+0.87%]

Testing on Windows:
occt component :
Total MEMORY difference: 58512548 / 58518712 [-0.01%]
Total CPU difference: 20092.944400098575 / 19818.897443398673 [+1.38%]
products component :
Total MEMORY difference: 20894353 / 20861060 [+0.16%]
Total CPU difference: 5297.949960999977 / 5204.302560699983 [+1.80%]

There are no differences in images found by testdiff.
(0061990)
git   
2016-12-22 11:20   
Branch CR28244 has been updated by mkv.

SHA-1: b1fe8f0a251ecf3b8fc8aa489e8164211f0508ff


Detailed log of new commits:

Author: mkv
Date: Thu Dec 22 10:49:29 2016 +0300

    Small correction of test case for issue CR28244

(0061991)
mkv   
2016-12-22 11:20   
Dear BugMaster,
Branch CR28244 is TESTED.
(0063569)
git   
2017-02-08 11:32   
Branch CR28244 has been deleted by kgv.

SHA-1: b1fe8f0a251ecf3b8fc8aa489e8164211f0508ff