-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "SOCC_Prs.h"
#include "SOCC_ViewWindow.h"
-#include "OCCViewer_Trihedron.h"
-
#include "SUIT_Session.h"
#include "SUIT_ResourceMgr.h"
//#include "SUIT_Application.h"
//#include CORBA_CLIENT_HEADER(SALOMEDS)
#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <Visual3d_View.hxx>
#include <SALOME_AISShape.hxx>
#include <SALOME_AISObject.hxx>
#include <SALOME_InteractiveObject.hxx>
#include <SALOME_ListIO.hxx>
-// Temporarily commented to avoid awful dependecy on SALOMEDS
-// TODO: better mechanism of storing display/erse status in a study
-// should be provided...
-//#include <Utils_ORB_INIT.hxx>
-//#include <Utils_SINGLETON.hxx>
-//#include <SALOME_ModuleCatalog_impl.hxx>
-//#include <SALOME_NamingService.hxx>
-
-//#include "SALOMEDSClient.hxx"
-//#include "SALOMEDS_StudyManager.hxx"
-
#include <AIS_TypeOfIso.hxx>
#include <Precision.hxx>
#include <algorithm>
-// in order NOT TO link with SalomeApp, here the code returns SALOMEDS_Study.
-// SalomeApp_Study::studyDS() does it as well, but -- here it is retrieved from
-// SALOMEDS::StudyManager - no linkage with SalomeApp.
-
-// Temporarily commented to avoid awful dependecy on SALOMEDS
-// TODO: better mechanism of storing display/erse status in a study
-// should be provided...
-//static _PTR(Study) getStudyDS()
-//{
-// SALOMEDSClient_Study* aStudy = NULL;
-// _PTR(StudyManager) aMgr( new SALOMEDS_StudyManager() );
-
- // get id of SUIT_Study, if it's a SalomeApp_Study, it will return
- // id of its underlying SALOMEDS::Study
-// SUIT_Application* app = SUIT_Session::session()->activeApplication();
-// if ( !app ) return _PTR(Study)(aStudy);
-// SUIT_Study* stud = app->activeStudy();
-// if ( !stud ) return _PTR(Study)(aStudy);
-// const int id = stud->id(); // virtual method, must return SALOMEDS_Study id
- // get SALOMEDS_Study with this id from StudyMgr
-// return aMgr->GetStudyByID( id );
-//}
-
/*!
Constructor
\param DisplayTrihedron - is trihedron displayed
Handle(SALOME_InteractiveObject) IO = aSh->getIO();
if ( IO->isSame( obj ) )
{
- aSh->setName( name.toLatin1().data() );
+ aSh->setName( name.toUtf8().data() );
break;
}
}
if ( !anOCCPrs || anOCCPrs->IsNull() )
return;
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
// get context
Handle (AIS_InteractiveContext) ic = getAISContext();
// Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
//if ( !anObj.IsNull() && anObj->hasEntry() )
//{
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
+ // ToolsGUI::SetVisibility( anObj->getEntry(), true, this );
//}
// Deactivate object if necessary
if ( !anOCCPrs || anOCCPrs->IsNull() )
return;
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
// get context
Handle(AIS_InteractiveContext) ic = getAISContext();
// Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
// if ( !anObj.IsNull() && anObj->hasEntry() )
// {
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
+ // ToolsGUI::SetVisibility( anObj->getEntry(), true, this );
// }
//}
}
*/
void SOCC_Viewer::EraseAll( SALOME_Displayer* d, const bool forced )
{
- // get SALOMEDS Study
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- // _PTR(Study) study(getStudyDS());
-
// get context
Handle(AIS_InteractiveContext) ic = getAISContext();
ic->DisplayedObjects( aList );
AIS_ListIteratorOfListOfInteractive anIter( aList );
for ( ; anIter.More(); anIter.Next() ) {
- if ( (isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron )) ||
- anIter.Value()->DynamicType() == STANDARD_TYPE( OCCViewer_Trihedron ))
+ if ( (isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) ) )
continue;
// erase an object
// Handle(SALOME_InteractiveObject)::DownCast( anIO->GetOwner() );
// if ( !anObj.IsNull() && anObj->hasEntry() ) {
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
+ // ToolsGUI::SetVisibility( anObj->getEntry(), true, this );
// }
//}
}