MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031323Open CASCADE[OCCT] OCCT:Application Frameworkpublic2020-01-28 11:182020-09-15 11:50
Reporterabv 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusresolvedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
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 number
Attached Files

- Relationships

-  Notes
(0093821)
mpv (developer)
2020-09-01 15:40

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?
(0094406)
abv (manager)
2020-09-10 18:19

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.
(0094756)
git (administrator)
2020-09-14 16:46

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.
(0094807)
mpv (developer)
2020-09-15 10:38

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

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

- 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 View Revisions
2020-09-15 11:50 mpv Target Version 7.6.0* => 7.5.0


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker