mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
OCAF tree traversal to get the downward dependencies including 'unpublished' objects.
This commit is contained in:
parent
f084f3e3cd
commit
3acd20a785
@ -60,6 +60,8 @@
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <OSD.hxx>
|
||||
#include <TDataStd_ChildNodeIterator.hxx>
|
||||
#include <TDocStd_Owner.hxx>
|
||||
|
||||
#include <SALOMEDS_Tool.hxx>
|
||||
#include <SALOMEDS_wrap.hxx>
|
||||
@ -3149,11 +3151,30 @@ void GEOM_Gen_i::getDownwardDependency( SALOMEDS::Study_ptr theStudy,
|
||||
}
|
||||
}
|
||||
}*/
|
||||
Handle(TDocStd_Document) aDoc = GEOM_Engine::GetEngine()->GetDocument(gbo->GetStudyID());
|
||||
Handle(TDataStd_TreeNode) aNode, aRoot;
|
||||
Handle(GEOM_Function) aFunction;
|
||||
if (aDoc->Main().FindAttribute(GEOM_Function::GetFunctionTreeID(), aRoot)) {
|
||||
TDataStd_ChildNodeIterator Itr( aRoot );
|
||||
for (; Itr.More(); Itr.Next()) {
|
||||
aNode = Itr.Value();
|
||||
aFunction = GEOM_Function::GetFunction(aNode->Label());
|
||||
if (aFunction.IsNull()) {
|
||||
//MESSAGE ( "Null function !!!!" );
|
||||
continue;
|
||||
}
|
||||
TDF_Label aLabel = aFunction->GetOwnerEntry();
|
||||
if(aLabel.IsNull()) continue;
|
||||
TCollection_AsciiString anEntry;
|
||||
TDF_Tool::Entry(aLabel, anEntry);
|
||||
GEOM::GEOM_BaseObject_var geomObj = GetObject( gbo->GetStudyID(), anEntry.ToCString() );
|
||||
/*
|
||||
SALOMEDS::ChildIterator_var it = theStudy->NewChildIterator( comp );
|
||||
for ( it->InitEx( true ); it->More(); it->Next() ) {
|
||||
SALOMEDS::SObject_var child = it->Value();
|
||||
CORBA::Object_var corbaObj = child->GetObject();
|
||||
GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
|
||||
*/
|
||||
if( CORBA::is_nil( geomObj ) )
|
||||
continue;
|
||||
|
||||
@ -3191,6 +3212,7 @@ void GEOM_Gen_i::getDownwardDependency( SALOMEDS::Study_ptr theStudy,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*if ( level > 0 ) {
|
||||
aLevelMap.insert( std::pair<std::string, GEOMUtils::NodeLinks>(aGboIOR, anIORs) );
|
||||
downLevelList[level-1] = aLevelMap;
|
||||
|
Loading…
Reference in New Issue
Block a user