View Issue Details

IDProjectCategoryView StatusLast Update
0031323Open CASCADEOCCT:Application Frameworkpublic2020-12-02 17:12
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used
DescriptionIf TObj_OcafObjectIterator is used on a hierarchy of objects in recursive mode with specific type of objects to be found, it does actually recursive, so children of 2nd and deeper levels cannot be found. This seems to be due to use of myIterator.NextBrother() instead of Next() in TObj_OcafObjectIterator::MakeStep() in case if current label contains an object.
Steps To Reproducebugs caf bug31323
TagsNo tags attached.
Test case numberbugs/caf/bug31323

Activities

mpv

2020-09-01 15:40

developer   ~0093821

As I understand, the described behavior correctly corresponds to the comment of method TObj_Object::GetChildren (where it is mainly used):
  //! The default implementation search for children on 1 sublevel
  //! of the children sub label

So, it searches recursively, but when the child is found, it does not get its subs. Perhaps, it is also done for performance reasons.

Do you use TObj_OcafObjectIterator separately or inside of OCCT method? May we consider to add another flag to this iterator to make search of all-levels sub-objects?

abv

2020-09-10 18:19

manager   ~0094406

I was using that class in the application code, with a purpose of iterating over all objects in the model (including nested objects). I agree that one more flag can be added, yet it should be very well documented to allow the user to understand what is the difference between two levels of recursion.

git

2020-09-14 16:46

administrator   ~0094756

Branch CR31323 has been created by mpv.

SHA-1: 6d2c6d64a5d7877bec9c1b936fc6da1877abc69c


Detailed log of new commits:

Author: mpv
Date: Mon Sep 14 16:49:38 2020 +0300

    0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used
    
    Added theAllSubChildren flag to the TObj_OcafObjectIterator to iterate all sub-children. By default it still iterates only the first level of children.

mpv

2020-09-15 10:38

developer   ~0094807

Resolved in CR31323. Flag theAllSubChildren is added to the iterator constructor.

http://jenkins-test-12.nnov.opencascade.com/view/CR31323-master-MPV/view/COMPARE/

git

2020-09-22 22:16

administrator   ~0095222

Branch CR31323 has been updated forcibly by abv.

SHA-1: 474ebf8633f07469cbfb1085611ed2ad7d28c8ac

git

2020-09-23 06:28

administrator   ~0095223

Branch CR31323 has been updated forcibly by abv.

SHA-1: 2ab3e09039f2117957f845ffeb7ca16aa3602932

abv

2020-09-23 06:31

manager   ~0095224

Reviewed with minor amendments, please integrate:
- OCCT: branch CR31323
- Products: nothing

Jenkins tests are OK, see job CR31323-master-MPV

bugmaster

2020-09-27 14:11

administrator   ~0095364

Combination -
OCCT branch : IR-2020-09-25
master SHA - d7bc5c833ec064bd103ebbff2882146ad5a7e7de
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-25 SHA - a8c0c30ba368a2503bbdf9800228ace93993dfff
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: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-27 14:29

administrator   ~0095388

Branch CR31323 has been deleted by inv.

SHA-1: 2ab3e09039f2117957f845ffeb7ca16aa3602932

Related Changesets

occt: master 689dc3b1

2020-09-14 13:49:38

mpv


Committer: bugmaster Details Diff
0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used

Added theAllSubChildren flag to the TObj_OcafObjectIterator to iterate all sub-children.
By default it still iterates only the first level of children.
Affected Issues
0031323
mod - src/TObj/TObj_OcafObjectIterator.cxx Diff File
mod - src/TObj/TObj_OcafObjectIterator.hxx Diff File
mod - src/TObjDRAW/TObjDRAW.cxx Diff File
add - tests/bugs/caf/bug31323 Diff File

Issue History

Date Modified Username Field Change
2020-01-28 11:18 abv New Issue
2020-01-28 11:18 abv Assigned To => mpv
2020-09-01 15:40 mpv Note Added: 0093821
2020-09-01 15:40 mpv Assigned To mpv => abv
2020-09-01 15:40 mpv Status new => feedback
2020-09-10 18:19 abv Note Added: 0094406
2020-09-10 18:19 abv Assigned To abv => mpv
2020-09-10 18:19 abv Status feedback => assigned
2020-09-11 15:32 utverdov Target Version 7.5.0 => 7.6.0
2020-09-14 16:46 git Note Added: 0094756
2020-09-15 10:38 mpv Note Added: 0094807
2020-09-15 10:38 mpv Assigned To mpv => abv
2020-09-15 10:38 mpv Status assigned => resolved
2020-09-15 10:38 mpv Steps to Reproduce Updated
2020-09-15 11:50 mpv Target Version 7.6.0 => 7.5.0
2020-09-22 22:16 git Note Added: 0095222
2020-09-23 06:28 git Note Added: 0095223
2020-09-23 06:31 abv Note Added: 0095224
2020-09-23 06:31 abv Assigned To abv => bugmaster
2020-09-23 06:31 abv Status resolved => reviewed
2020-09-27 12:13 bugmaster Test case number => bugs/caf/bug31323
2020-09-27 14:11 bugmaster Note Added: 0095364
2020-09-27 14:11 bugmaster Status reviewed => tested
2020-09-27 14:13 bugmaster Changeset attached => occt master 689dc3b1
2020-09-27 14:13 bugmaster Status tested => verified
2020-09-27 14:13 bugmaster Resolution open => fixed
2020-09-27 14:29 git Note Added: 0095388
2020-12-02 16:41 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed