DiscussionsIssue archiveOCCT:Visualization

Archived issue #0028244

Visualization - AIS_AngleDimension throws exception for 180 degree

CommunityOCCT:Visualizationclosed14 public notes

Search issues

Description

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++

Steps to reproduce

v3d dimensions angle

Public activity

14 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Please provide a test case, not just a call stack.
02Commenter 1
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.

03Author
Anyway, it should not throw in constructor otherwise there is no way to SetCustomPlane()
04Author
An alter solution is to add an optional argument gp_Pln in constructor to specify the custom plane.
05Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


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
06Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
07Commenter 7
Dear Kirill,
please review the branch CR28244.
08Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
09Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
10Commenter 1
Please test the patch.
11Commenter 11
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.
[revision removed]

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.
12Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

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

    Small correction of test case for issue CR28244

13Commenter 13
Dear BugMaster,
Branch CR28244 is TESTED.
14Commenter 2
Branch [archived branch] has been deleted by Commenter 1.

[revision removed]