View Issue Details

IDProjectCategoryView StatusLast Update
0022762CommunityOCCT:Visualizationpublic2012-03-29 17:26
Reporterszy Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.2 
Target Version6.5.3Fixed in Version6.5.3 
Summary0022762: Bug in Graphic3d_Vector::IsParallel
DescriptionContribution 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; "

Additional information
and documentation updates
Method Graphic3d_Vector::IsParallel() now works correctly.
TagsNo tags attached.
Test case numberchl 934 R4

Attached Files

  • patch.txt (658 bytes)
  • R4 (802 bytes)

Activities

szy

2011-10-14 12:19

manager  

patch.txt (658 bytes)

dln

2012-01-26 10:22

developer   ~0019270

Last edited: 2012-01-27 10:19

The code(original change) integrated to branch http://svn/svn/occt/branches/OCC22762
Please review and test.

san

2012-02-01 15:14

developer   ~0019332

The branch reviewed without remarks.

apn

2012-02-07 16:21

administrator   ~0019440

Last edited: 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

apn

2012-02-08 16:08

administrator  

R4 (802 bytes)

bugmaster

2012-02-10 14:22

administrator   ~0019506

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

Related Changesets

occt: master ef8ca55b

2012-02-10 10:04:08

dln


Committer: bugmaster Details Diff
0022762: Bug in Graphic3d_Vector::IsParallel Affected Issues
0022762
mod - src/Graphic3d/Graphic3d_Vector.cxx Diff File
mod - src/QAOCC/QAOCC.cxx Diff File

Issue History

Date Modified Username Field Change
2011-10-14 12:19 szy New Issue
2011-10-14 12:19 szy Assigned To => san
2011-10-14 12:19 szy File Added: patch.txt
2011-11-07 11:39 san Assigned To san => dln
2011-11-07 11:39 san Status new => assigned
2011-12-01 11:51 szy Description Updated
2012-01-20 13:17 dln Additional Information Updated
2012-01-20 13:17 dln Assigned To dln => san
2012-01-20 13:17 dln Status assigned => resolved
2012-01-20 13:25 dln Additional Information Updated
2012-01-20 13:33 dln Additional Information Updated
2012-01-26 10:22 dln Note Added: 0019270
2012-01-27 10:18 dln Note Edited: 0019270
2012-01-27 10:19 dln Note Edited: 0019270
2012-02-01 15:14 san Note Added: 0019332
2012-02-01 15:14 san Assigned To san => bugmaster
2012-02-01 15:14 san Status resolved => reviewed
2012-02-07 16:21 apn Note Added: 0019440
2012-02-07 16:21 apn Note Edited: 0019440
2012-02-07 16:23 apn Test case number => Test case is not required
2012-02-07 16:23 apn Status reviewed => tested
2012-02-07 16:32 apn Test case number Test case is not required =>
2012-02-07 16:32 apn Note Edited: 0019440
2012-02-07 16:58 abv Assigned To bugmaster => san
2012-02-07 16:58 abv Status tested => feedback
2012-02-07 17:54 abv Status feedback => reviewed
2012-02-07 17:56 abv Status reviewed => tested
2012-02-07 17:56 abv Assigned To san => bugmaster
2012-02-08 08:56 apn Note Edited: 0019440
2012-02-08 08:56 apn Note Edited: 0019440
2012-02-08 08:56 apn Test case number => chl 934 R4
2012-02-08 16:07 apn Note Edited: 0019440
2012-02-08 16:08 apn File Added: R4
2012-02-10 14:22 bugmaster Note Added: 0019506
2012-02-10 14:22 bugmaster Status tested => verified
2012-02-10 14:22 bugmaster Resolution open => fixed
2012-02-10 14:22 bugmaster Assigned To bugmaster => dln
2012-03-29 17:26 bugmaster Changeset attached => occt master ef8ca55b