View Issue Details

IDProjectCategoryView StatusLast Update
0028793Open CASCADEOCCT:Visualizationpublic2017-09-29 16:25
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028793: Visualization, TKV3d - make BVH_Builder::Build() const for propagating builder by value
DescriptionCurrent BVH_Builder implementation store some temporary context for building a tree, and for that reason BVH_Builder::Build() is declared as non-const method.

It is proposed to modify implementations to NOT store temporary context BVH_Builder::Build() as class field(s), so that single BVH_Builder instance can be safely shared for building many trees (e.g. like passing NCollection_BaseAllocator objects).
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0028789 closedbugmaster Visualization, TKV3d - extend API for accessing and assigning BVH builders 

Activities

git

2017-05-26 19:05

administrator   ~0066674

Branch CR28793 has been created by kgv.

SHA-1: 84c5fefa4f0bc3e5f412c42bd8efd86f0c556158


Detailed log of new commits:

Author: kgv
Date: Fri May 26 19:03:03 2017 +0300

    0028793: Visualization, TKV3d - make BVH_Builder::Build() const for propagating builder by value
    
    Added const for method BVH_Builder::Build().
    Added missing Standard_OVERRIDE to overridden methods.
    Merged code from .lxx in BVH package directly into .hxx headers.

kgv

2017-05-26 19:06

developer   ~0066675

Patch is ready for review.

san

2017-05-27 13:39

developer   ~0066679

Branch CR28793 reviewed without remarks, ready for testing.

mkv

2017-05-29 16:51

tester   ~0066818

Dear BugMaster,
Branch CR28793 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms on Release mode.
SHA-1: 84c5fefa4f0bc3e5f412c42bd8efd86f0c556158

There are compilation warning on Linux platform:
http://jenkins-test-07.nnov.opencascade.com:8080/view/CR28793-master/job/CR28793-master-OCCT-Debian70-64-opt-compile/1/parsed_console/
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:95:9: error: 'BoxMinMax' is not a member of 'BVH'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:95:25: error: expected primary-expression before ',' token
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:95:29: error: '::CwiseMin' has not been declared
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:96:9: error: 'BoxMinMax' is not a member of 'BVH'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:96:25: error: expected primary-expression before ',' token
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:96:29: error: '::CwiseMax' has not been declared
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx: In member function 'T BVH_Box<T, N>::Area() const':
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:115:64: error: 'SurfaceCalculator' is not a member of 'BVH'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:115:88: error: expected primary-expression before ',' token
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:115:92: error: '::Area' has not been declared
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx: In member function 'T BVH_Box<T, N>::Center(Standard_Integer) const':
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:124:60: error: 'CenterAxis' is not a member of 'BVH'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:124:77: error: expected primary-expression before ',' token
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Box.hxx:124:81: error: '::Center' has not been declared
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Set.hxx:38:22: error: pure-specifier on function-definition
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Properties.hxx:60:5: error: 'MatrixOp' is not a member of 'BVH'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Properties.hxx:60:20: error: expected primary-expression before ',' token
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Properties.hxx:60:24: error: '::Inverse' has not been declared
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_Object.hxx:36:25: error: pure-specifier on function-definition
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_ObjectSet.hxx:46:10: error: need 'typename' before 'BVH_ObjectSet<T, N>::BVH_ObjectList:: Iterator' because 'BVH_ObjectSet<T, N>::BVH_ObjectList' is a dependent scope
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_ObjectSet.hxx:46:35: error: expected ';' before 'anObjectIter'
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_ObjectSet.hxx:46:61: error: 'anObjectIter' was not declared in this scope
/dn54/builds/CR28793-master/Debian70-64-opt/OCCT/src/BVH/BVH_QueueBuilder.hxx:47:31: error: pure-specifier on function-definition

http://jenkins-test-07.nnov.opencascade.com:8080/view/CR28793-master/job/CR28793-master-OCCT-MacOS-opt-compile/1/parsed_console/
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:95:14: error: no member named 'BoxMinMax' in namespace 'BVH'
        BVH::BoxMinMax<T, N>::CwiseMin (myMinPoint, theBox.myMinPoint);
        ~~~~~^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:95:24: error: 'T' does not refer to a value
        BVH::BoxMinMax<T, N>::CwiseMin (myMinPoint, theBox.myMinPoint);
                       ^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:27:16: note: declared here
template<class T, int N>
               ^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:95:31: error: no member named 'CwiseMin' in the global namespace
        BVH::BoxMinMax<T, N>::CwiseMin (myMinPoint, theBox.myMinPoint);
                            ~~^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:96:14: error: no member named 'BoxMinMax' in namespace 'BVH'
        BVH::BoxMinMax<T, N>::CwiseMax (myMaxPoint, theBox.myMaxPoint);
        ~~~~~^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:96:24: error: 'T' does not refer to a value
        BVH::BoxMinMax<T, N>::CwiseMax (myMaxPoint, theBox.myMaxPoint);
                       ^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:27:16: note: declared here
template<class T, int N>
               ^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:96:31: error: no member named 'CwiseMax' in the global namespace[ 7%]
        BVH::BoxMinMax<T, N>::CwiseMax (myMaxPoint, theBox.myMaxPoint);
                            ~~^
Building CXX object src/TKLCAF/CMakeFiles/TKLCAF.dir/__/TDataStd/TDataStd_RealList.cxx.o
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:115:69: error: no member named 'SurfaceCalculator' in namespace 'BVH'
  T Area() const { return !myIsInited ? static_cast<T> (0.0) : BVH::SurfaceCalculator<T, N>::Area (myMaxPoint - myMinPoint); }
                                                               ~~~~~^
/Users/mnt/builds/CR28793-master/MacOS-opt/OCCT/src/BVH/BVH_Box.hxx:115:87: error: 'T' does not refer to a value
  T Area() const { return !myIsInited ? static_cast<T> (0.0) : BVH::SurfaceCalculator<T, N>::Area (myMaxPoint - myMinPoint); }

git

2017-05-29 17:48

administrator   ~0066823

Branch CR28793 has been updated by kgv.

SHA-1: 6eaf4d5713c144117804d8e774acba400510c00c


Detailed log of new commits:

Author: kgv
Date: Mon May 29 17:47:57 2017 +0300

    // fix gcc compilation errors

git

2017-05-29 18:01

administrator   ~0066827

Branch CR28793_1 has been created by kgv.

SHA-1: 117d9a74910d71800badfc06f403923c5b3a5137


Detailed log of new commits:

Author: kgv
Date: Fri May 26 19:03:03 2017 +0300

    0028793: Visualization, TKV3d - make BVH_Builder::Build() const for propagating builder by value
    
    Added const for method BVH_Builder::Build().
    Added missing Standard_OVERRIDE to overridden methods.
    Merged code from .lxx in BVH package directly into .hxx headers.

kgv

2017-05-29 18:05

developer   ~0066828

Please check updated patch.

mkv

2017-05-30 16:00

tester   ~0066882

Dear BugMaster,
Branch CR28793_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 117d9a74910d71800badfc06f403923c5b3a5137

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1205

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 91952862 / 91807487 [+0.16%]
Total CPU difference: 18924.56000000035 / 19346.7000000001 [-2.18%]
products component :
Total MEMORY difference: 31246090 / 31352485 [-0.34%]
Total CPU difference: 5410.280000000002 / 5393.529999999966 [+0.31%]
Testing on Windows:
occt component :
Total MEMORY difference: 58489982 / 58497831 [-0.01%]
Total CPU difference: 17437.79177999858 / 17520.28510879866 [-0.47%]
products component :
Total MEMORY difference: 22725130 / 22688363 [+0.16%]
Total CPU difference: 5404.233442299978 / 5357.885545199975 [+0.87%]

There are no differences in images found by testdiff.

mkv

2017-05-30 16:00

tester   ~0066883

Dear BugMaster,
Branch CR28793_1 is TESTED.

git

2017-06-02 10:45

administrator   ~0066989

Branch CR28793_1 has been deleted by inv.

SHA-1: 117d9a74910d71800badfc06f403923c5b3a5137

git

2017-06-02 10:45

administrator   ~0066990

Branch CR28793 has been deleted by inv.

SHA-1: 6eaf4d5713c144117804d8e774acba400510c00c

Related Changesets

occt: master e28f12b3

2017-05-26 16:03:03

kgv


Committer: bugmaster Details Diff
0028793: Visualization, TKV3d - make BVH_Builder::Build() const for propagating builder by value

Added const for method BVH_Builder::Build().
Added missing Standard_OVERRIDE to overridden methods.
Merged code from .lxx in BVH package directly into .hxx headers.
Affected Issues
0028793
mod - src/BVH/BVH_BinaryTree.hxx Diff File
rm - src/BVH/BVH_BinaryTree.lxx Diff File
mod - src/BVH/BVH_BinnedBuilder.hxx Diff File
rm - src/BVH/BVH_BinnedBuilder.lxx Diff File
mod - src/BVH/BVH_Box.hxx Diff File
rm - src/BVH/BVH_Box.lxx Diff File
mod - src/BVH/BVH_Builder.hxx Diff File
rm - src/BVH/BVH_Builder.lxx Diff File
mod - src/BVH/BVH_Geometry.hxx Diff File
rm - src/BVH/BVH_Geometry.lxx Diff File
mod - src/BVH/BVH_LinearBuilder.hxx Diff File
rm - src/BVH/BVH_LinearBuilder.lxx Diff File
mod - src/BVH/BVH_Object.hxx Diff File
rm - src/BVH/BVH_Object.lxx Diff File
mod - src/BVH/BVH_ObjectSet.hxx Diff File
rm - src/BVH/BVH_ObjectSet.lxx Diff File
mod - src/BVH/BVH_PrimitiveSet.hxx Diff File
rm - src/BVH/BVH_PrimitiveSet.lxx Diff File
mod - src/BVH/BVH_Properties.hxx Diff File
rm - src/BVH/BVH_Properties.lxx Diff File
mod - src/BVH/BVH_QuadTree.hxx Diff File
rm - src/BVH/BVH_QuadTree.lxx Diff File
mod - src/BVH/BVH_QueueBuilder.hxx Diff File
rm - src/BVH/BVH_QueueBuilder.lxx Diff File
mod - src/BVH/BVH_QuickSorter.hxx Diff File
rm - src/BVH/BVH_QuickSorter.lxx Diff File
mod - src/BVH/BVH_RadixSorter.hxx Diff File
rm - src/BVH/BVH_RadixSorter.lxx Diff File
mod - src/BVH/BVH_Set.hxx Diff File
rm - src/BVH/BVH_Set.lxx Diff File
mod - src/BVH/BVH_SpatialMedianBuilder.hxx Diff File
rm - src/BVH/BVH_SpatialMedianBuilder.lxx Diff File
mod - src/BVH/BVH_SweepPlaneBuilder.hxx Diff File
rm - src/BVH/BVH_SweepPlaneBuilder.lxx Diff File
mod - src/BVH/BVH_Tree.hxx Diff File
rm - src/BVH/BVH_Tree.lxx Diff File
mod - src/BVH/BVH_Triangulation.hxx Diff File
rm - src/BVH/BVH_Triangulation.lxx Diff File
mod - src/BVH/FILES Diff File
mod - src/OpenGl/OpenGl_BVHClipPrimitiveSet.hxx Diff File
mod - src/OpenGl/OpenGl_SceneGeometry.hxx Diff File

Issue History

Date Modified Username Field Change
2017-05-26 18:47 kgv New Issue
2017-05-26 18:47 kgv Assigned To => kgv
2017-05-26 19:05 git Note Added: 0066674
2017-05-26 19:06 kgv Note Added: 0066675
2017-05-26 19:06 kgv Assigned To kgv => san
2017-05-26 19:06 kgv Status new => resolved
2017-05-26 19:06 kgv Description Updated
2017-05-27 13:39 san Note Added: 0066679
2017-05-27 13:39 san Assigned To san => bugmaster
2017-05-27 13:39 san Status resolved => reviewed
2017-05-29 12:02 mkv Assigned To bugmaster => mkv
2017-05-29 16:51 mkv Note Added: 0066818
2017-05-29 16:52 mkv Assigned To mkv => kgv
2017-05-29 16:52 mkv Status reviewed => assigned
2017-05-29 16:52 mkv Test case number => Not needed
2017-05-29 17:48 git Note Added: 0066823
2017-05-29 18:01 git Note Added: 0066827
2017-05-29 18:05 kgv Note Added: 0066828
2017-05-29 18:05 kgv Assigned To kgv => bugmaster
2017-05-29 18:05 kgv Status assigned => resolved
2017-05-29 18:05 kgv Status resolved => reviewed
2017-05-29 18:35 mkv Assigned To bugmaster => mkv
2017-05-30 16:00 mkv Note Added: 0066882
2017-05-30 16:00 mkv Note Added: 0066883
2017-05-30 16:00 mkv Assigned To mkv => bugmaster
2017-05-30 16:00 mkv Status reviewed => tested
2017-05-30 22:16 kgv Relationship added related to 0028789
2017-06-02 10:28 bugmaster Changeset attached => occt master e28f12b3
2017-06-02 10:28 bugmaster Status tested => verified
2017-06-02 10:28 bugmaster Resolution open => fixed
2017-06-02 10:45 git Note Added: 0066989
2017-06-02 10:45 git Note Added: 0066990
2017-09-29 16:18 aiv Fixed in Version => 7.2.0
2017-09-29 16:25 aiv Status verified => closed