DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0026750

Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian)

Open CASCADEOCCT:Modeling Algorithmsclosed11 public notes

Search issues

Description

Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian).

See Steps to reproduce.

Steps to reproduce

gp_Vec2d aVec1(1.0, 0.0);
gp_Vec2d aVec2(0.0, -1.0);

aVec1.IsNormal(aVec2, Precision::Angular());
//Returns FALSE


-------------------------
Test case for this issue has been created.

Public activity

11 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 5 10:30:50 2015 +0300

    0026750: Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian)
    
    The bug has been fixed.
    Test case for this issue has been created.
02Commenter 2
Dear Mikhail,

Please review CR26750 branch.
03Commenter 3
Remarks:

src\gp\gp_Vec2d.hxx

1) Why did you changed description? Your modifications have no sense, as you say the same by other words. I propose to leave original description.

2) The word Standard_EXPORT is extra when the method is inline.

3) Why did you move the definition of inline method from .lxx file to .hxx? If to move then it is needed to move all methods and remove the file .lxx at all. But I suggest leaving definition of the method IsNormal in .lxx file.

src\gp\gp_Vec2d.lxx

4) The only change is needed in the line 78:

78: Ang = M_PI / 2.0 - Angle(Other);

to change it to

78: Ang = M_PI / 2.0 - Ang;

No need to rewrite the whole method.


src\gp\gp_Dir2d.hxx
src\gp\gp_Dir2d.lxx

5) No need to modify gp_Dir2d as it contains no error.
04Commenter 4
Dear Nikolay, please do as less modifications as possible to resolve a bug in the future.
05Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 5 10:30:50 2015 +0300

    0026750: Method IsNormal(...) for gp_Vec2d returns FALSE if the angle between two vectors is equal to -90 degree (-M_PI/2 radian)
    
    The bug has been fixed.
    Test case for this issue has been created.
06Commenter 6
Dear Mikhail,

Please review CR26750_1 branch.
07Commenter 2
Branch [archived branch] has been updated by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 5 14:54:31 2015 +0300

    Correct alignment.

08Commenter 8
Reviewed.
09Commenter 9
Dear Commenter 1,

Branch CR26750_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 13 (13 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 39 (39 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
bugs modalg_6 bug26750 - OK
http://occt-tests/CR26750-1-master-occt-64/Debian70-64/bugs/modalg_6/bug26750.html
http://occt-tests/CR26750-1-master-occt-64/Windows-64-VC10/bugs/modalg_6/bug26750.html

Testing on Linux:
Total MEMORY difference: 91891182 / 92324358 [-0.47%]
Total CPU difference: 19748.59999999947 / 19582.12999999974 [+0.85%]

Testing on Windows:
Total MEMORY difference: 58079091 / 58090988 [-0.02%]
Total CPU difference: 18082.387911998776 / 18228.91965129895 [-0.80%]
10Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
11Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records