DiscussionsIssue archiveOCCT:Foundation Classes

Archived issue #0030416

Incorrect implementation of the method Bnd_OBB::SquareExtent

Open CASCADEOCCT:Foundation Classesclosed7 public notes

Search issues

Description

Implementation of the method Bnd_OBB::SquareExtent is the following:
  //! Returns square diagonal of this box
  Standard_Real SquareExtent() const
  {
    return (4.0*myHDims[0] * myHDims[0] + 
            myHDims[1] * myHDims[1] +
            myHDims[1] * myHDims[1]);
  }

It must be as this:
  //! Returns square diagonal of this box
  Standard_Real SquareExtent() const
  {
    return 4.0 * (myHDims[0] * myHDims[0] + 
                  myHDims[1] * myHDims[1] +
                  myHDims[2] * myHDims[2]);
  }

Steps to reproduce

N/A

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Commenter 1
This method has not been used yet anywhere in OCCT.
02Commenter 1
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Dec 17 15:16:55 2018 +0300

    0030416: Incorrect implementation of the method Bnd_OBB::SquareExtent
    
    The method Bnd_OBB::SquareExtent has been corrected.
03Commenter 3
04Commenter 4
Please review.
05Commenter 5
Reviewed.
06Commenter 2
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 16356.83000000011 / 16383.840000000093 [-0.16%]
Products
Total CPU difference: 7158.5100000000375 / 7155.460000000033 [+0.04%]
Windows-64-VC14:
OCCT
Total CPU difference: 17769.03125 / 17743.1875 [+0.15%]
Products
Total CPU difference: 8580.78125 / 8599.515625 [-0.22%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
07Commenter 1
Branch [archived branch] has been deleted by Participant.

[revision removed]