MantisBT - Open CASCADE
View Issue Details
0029406Open CASCADE[OCCT] OCCT:Foundation Classespublic2017-12-29 13:512018-01-22 14:08
abv 
isn 
normalminor 
assignedopen 
 
[OCCT] 7.4.0* 
0029406: Foundation Classes - gp_Ax3 fails setting direction
The following simple code fails due to stupid implementation of gp_Ax3 which does not check that newly set direction is parallel to currently set X direction, and tries to use their cross product to define new Y:

gp_Ax3 anAx;
anAx.SetDirection (gp::DX());

The same occurs with construction from gp_Ax1:

gp_Ax1 anAx1 (gp::Origin(), gp::DX());
anAx.SetAxis (anAx1);
.
No tags attached.
Issue History
2017-12-29 13:51abvNew Issue
2017-12-29 13:51abvAssigned To => abv
2018-01-09 14:36abvDescription Updatedbug_revision_view_page.php?rev_id=18428#r18428
2018-01-09 14:37abvDescription Updatedbug_revision_view_page.php?rev_id=18429#r18429
2018-01-10 16:57abvAssigned Toabv => isn
2018-01-10 16:57abvStatusnew => assigned
2018-01-11 19:03gitNote Added: 0073368
2018-01-16 14:05isnNote Added: 0073433
2018-01-16 14:05isnAssigned Toisn => msv
2018-01-16 14:05isnStatusassigned => resolved
2018-01-16 14:05isnSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18475#r18475
2018-01-16 14:05isnNote Edited: 0073433bug_revision_view_page.php?bugnote_id=73433#r18477
2018-01-17 11:42msvNote Added: 0073460
2018-01-17 11:42msvAssigned Tomsv => isn
2018-01-17 11:42msvStatusresolved => assigned
2018-01-17 12:41gitNote Added: 0073464
2018-01-17 13:00msvNote Added: 0073468
2018-01-18 17:06gitNote Added: 0073496
2018-01-18 20:50isnAssigned Toisn => msv
2018-01-18 20:50isnStatusassigned => resolved
2018-01-19 10:25msvNote Added: 0073507
2018-01-19 10:25msvAssigned Tomsv => bugmaster
2018-01-19 10:25msvStatusresolved => reviewed
2018-01-19 10:36msvNote Added: 0073508
2018-01-19 10:36msvAssigned Tobugmaster => isn
2018-01-19 10:36msvStatusreviewed => assigned
2018-01-19 10:37msvNote Edited: 0073508bug_revision_view_page.php?bugnote_id=73508#r18498
2018-01-19 10:37msvNote Edited: 0073508bug_revision_view_page.php?bugnote_id=73508#r18499
2018-01-19 14:36gitNote Added: 0073526
2018-01-19 17:29isnNote Added: 0073539
2018-01-19 17:29isnAssigned Toisn => msv
2018-01-19 17:29isnStatusassigned => resolved
2018-01-22 10:31msvNote Added: 0073551
2018-01-22 10:31msvAssigned Tomsv => isn
2018-01-22 10:31msvStatusresolved => assigned
2018-01-22 14:08gitNote Added: 0073557

Notes
(0073368)
git   
2018-01-11 19:03   
Branch CR29406 has been created by isn.

SHA-1: 7f911703334699158a648a55bb13648fe862593e


Detailed log of new commits:

Author: isn
Date: Thu Jan 11 19:03:03 2018 +0300

    0029406: Foundation Classes - gp_Ax3 fails setting direction
    
    Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction.
(0073433)
isn   
2018-01-16 14:05   
/view/CR29406-master-isn/view/COMPARE/

(0073460)
msv   
2018-01-17 11:42   
Please rebase the branch on current master and re-test. The commit must be based on master only (not on 28642 fix).
(0073464)
git   
2018-01-17 12:41   
Branch CR29406 has been updated forcibly by isn.

SHA-1: af061f95c6a6e94dbdde77558332f25b870f95b8
(0073468)
msv   
2018-01-17 13:00   
tests/bugs/fclasses/bug29406
- Add standard header into the test script.

src/gp/gp_Ax3.lxx
- 47,71: move this definition to the scope where it is used.

src/QABugs/QABugs_20.cxx
- 2803: set negative DX.
- Eliminate code duplication by defining a new function that makes needed checks and puts error in cout. No need to return 1 for the test became failure.
- Add checking of the fact that direction in the object has the value that has been just set.
(0073496)
git   
2018-01-18 17:06   
Branch CR29406 has been updated by isn.

SHA-1: 9212f218bf2a24e3f668ca5f9d2b999b029bb461


Detailed log of new commits:

Author: isn
Date: Thu Jan 18 17:06:04 2018 +0300

    corrections

(0073507)
msv   
2018-01-19 10:25   
Reviewed.
(0073508)
msv   
2018-01-19 10:36   
(edited on: 2018-01-19 10:37)
Oops, I have (thanks to EMV) another remark.

Please, remove code duplication in the methods gp_Ax3::SetAxis and gp_Ax3::SetDirection. For that, make the following implementation of the method gp_Ax3::SetAxis:

axis.SetLocation(A1.Location());
SetDirection(A1.Direction());


(0073526)
git   
2018-01-19 14:36   
Branch CR29406 has been updated by isn.

SHA-1: 360a7e4b1ab493f47fcd2feb74b8ff350219f547


Detailed log of new commits:

Author: isn
Date: Fri Jan 19 14:33:52 2018 +0300

    remark

(0073539)
isn   
2018-01-19 17:29   
/view/CR29406-master-isn/view
(0073551)
msv   
2018-01-22 10:31   
Please rebase on current master and retest.
(0073557)
git   
2018-01-22 14:08   
Branch CR29406_1 has been created by isn.

SHA-1: 7bdbef9da526f872b1798e03ab81809147d2d492


Detailed log of new commits:

Author: isn
Date: Thu Jan 11 19:03:03 2018 +0300

    0029406: Foundation Classes - gp_Ax3 fails setting direction
    
    Avoid exception in gp_Ax3::SetDirection(), SetAxis(): check if XDir of Ax3 is parallel to newly given direction.