MantisBT - Community
View Issue Details
0022762Community[OCCT] OCCT:Visualizationpublic2011-10-14 12:192012-03-29 17:26
szy 
bugmaster 
normalminor 
closedfixed 
ALL
[OCCT] 6.5.2 
[OCCT] 6.5.3[OCCT] 6.5.3 
chl 934 R4
0022762: Bug in Graphic3d_Vector::IsParallel
Contribution from a customer.
" In 6.3.1 I found a bug in Graphic3d_Vector::IsParallel (which is exists in 6.5.2, too ) and I can provide a patch.

Your version:
   Standard_Real Result;
    Result = (AV1.Y () * AV2.Z () - AV1.Z () * AV2.Y ())
        - (AV1.X () * AV2.Z () - AV1.Z () * AV2.X ())
        - (AV1.X () * AV2.Y () - AV1.Y () * AV2.X ());

    return (Abs (Result) <= Graphic3d_Vector_MyEpsilon);

This returns the wrong result "true" for this example
                 AV1 = 0.57735026, 0.57735026, 0.57735026
                 AV2 = -0.40824828, -0.40824828, 0.81649655

My version is:
    Standard_Real d1 = AV1.Y () * AV2.Z () - AV1.Z () * AV2.Y ();
    Standard_Real d2 = AV1.Z () * AV2.X () - AV1.X () * AV2.Z ();
    Standard_Real d3 = AV1.X () * AV2.Y () - AV1.Y () * AV2.X ();

    Standard_Boolean res = (Abs (d1) <= Graphic3d_Vector_MyEpsilon) && (Abs (d2) <= Graphic3d_Vector_MyEpsilon) && (Abs (d3) <= Graphic3d_Vector_MyEpsilon);
    return res; "

Method Graphic3d_Vector::IsParallel() now works correctly.
No tags attached.
txt patch.txt (658) 2011-10-14 12:19
https://tracker.dev.opencascade.org/
? R4 (802) 2012-02-08 16:08
https://tracker.dev.opencascade.org/
Issue History
2011-10-14 12:19szyNew Issue
2011-10-14 12:19szyAssigned To => san
2011-10-14 12:19szyFile Added: patch.txt
2011-11-07 11:39sanAssigned Tosan => dln
2011-11-07 11:39sanStatusnew => assigned
2011-12-01 11:51szyDescription Updatedbug_revision_view_page.php?rev_id=1198#r1198
2012-01-20 13:17dlnAdditional Information Updatedbug_revision_view_page.php?rev_id=3279#r3279
2012-01-20 13:17dlnAssigned Todln => san
2012-01-20 13:17dlnStatusassigned => resolved
2012-01-20 13:25dlnAdditional Information Updatedbug_revision_view_page.php?rev_id=3280#r3280
2012-01-20 13:33dlnAdditional Information Updatedbug_revision_view_page.php?rev_id=3281#r3281
2012-01-26 10:22dlnNote Added: 0019270
2012-01-27 10:18dlnNote Edited: 0019270bug_revision_view_page.php?bugnote_id=19270#r3323
2012-01-27 10:19dlnNote Edited: 0019270bug_revision_view_page.php?bugnote_id=19270#r3324
2012-02-01 15:14sanNote Added: 0019332
2012-02-01 15:14sanAssigned Tosan => bugmaster
2012-02-01 15:14sanStatusresolved => reviewed
2012-02-07 16:21apnNote Added: 0019440
2012-02-07 16:21apnNote Edited: 0019440bug_revision_view_page.php?bugnote_id=19440#r3400
2012-02-07 16:23apnTest case number => Test case is not required
2012-02-07 16:23apnStatusreviewed => tested
2012-02-07 16:32apnTest case numberTest case is not required =>
2012-02-07 16:32apnNote Edited: 0019440bug_revision_view_page.php?bugnote_id=19440#r3403
2012-02-07 16:58abvNote Added: 0019444
2012-02-07 16:58abvAssigned Tobugmaster => san
2012-02-07 16:58abvStatustested => feedback
2012-02-07 17:54abvStatusfeedback => reviewed
2012-02-07 17:54abvNote Deleted: 0019444
2012-02-07 17:56abvStatusreviewed => tested
2012-02-07 17:56abvAssigned Tosan => bugmaster
2012-02-08 08:56apnNote Edited: 0019440bug_revision_view_page.php?bugnote_id=19440#r3404
2012-02-08 08:56apnNote Edited: 0019440bug_revision_view_page.php?bugnote_id=19440#r3405
2012-02-08 08:56apnTest case number => chl 934 R4
2012-02-08 16:07apnNote Edited: 0019440bug_revision_view_page.php?bugnote_id=19440#r3414
2012-02-08 16:08apnFile Added: R4
2012-02-10 14:22bugmasterNote Added: 0019506
2012-02-10 14:22bugmasterStatustested => verified
2012-02-10 14:22bugmasterResolutionopen => fixed
2012-02-10 14:22bugmasterAssigned Tobugmaster => dln
2012-03-29 17:26bugmasterChangeset attached => occt master ef8ca55b

Notes
(0019270)
dln   
2012-01-26 10:22   
(edited on: 2012-01-27 10:19)
The code(original change) integrated to branch http://svn/svn/occt/branches/OCC22762 [^]
Please review and test.

(0019332)
san   
2012-02-01 15:14   
The branch reviewed without remarks.
(0019440)
apn   
2012-02-07 16:21   
(edited on: 2012-02-08 16:07)
Dear BugMaster,
 Workbench KAS:dev:apn-22762-occt was created from SVN branch http://svn/svn/occt/branches/OCC22762 [^]
 (and apn-22762-products from trunk) and compiled on Linux and Windows platforms.
  
 There are not regressions in apn-22762-products regarding to KAS:dev:products-20120203-opt

New Draw command "OCC22762" was created in WB apn-22762-occt in QAOCC.cxx.
QAOCC.cxx was commited.
Test case for this fix is chl 934 R4. It's OK.
Method Graphic3d_Vector::IsParallel returns right result "false" for this example
                  AV1 = 0.57735026, 0.57735026, 0.57735026
                  AV2 = -0.40824828, -0.40824828, 0.81649655
 
 See results in /QADisk/occttests/results/KAS/dev/ apn-22762-products_07022012/lin
 See reference results in /QADisk/occttests/results/KAS/dev/products-20120203-opt_03022012/lin
 See test cases in /QADisk/occttests/tests/ED

(0019506)
bugmaster   
2012-02-10 14:22   
Integrated into trunk of occt repository

Date: 2012-02-10 14:04:08 +0400 (Fri, 10 Feb 2012)
New Revision: 10409

Modified:
   trunk/src/Graphic3d/Graphic3d_Vector.cxx
   trunk/src/QAOCC/QAOCC.cxx