|Anonymous | Login||2020-09-18 16:19 MSK|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031323||Open CASCADE||[OCCT] OCCT:Application Framework||public||2020-01-28 11:18||2020-09-15 11:50|
|Target Version||[OCCT] 7.5.0||Fixed in Version|
|Summary||0031323: OCAF, TObj - TObj_OcafObjectIterator does not go recursively to children if type argument is used|
|Description||If 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 Reproduce||bugs caf bug31323|
|Tags||No tags attached.|
|Test case number|
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?
|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.|
Branch CR31323 has been created by mpv.
Detailed log of new commits:
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.
Resolved in CR31323. Flag theAllSubChildren is added to the iterator constructor.
|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|