-// Copyright (C) 2007-2013 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
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{}
virtual void Execute()
{
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
- if ( !app ) return;
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !study ) return;
-
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
- GEOM_Displayer( study ).Display( io, myUpdateViewer );
+ GEOM_Displayer().Display( io, myUpdateViewer );
}
};
{}
virtual void Execute()
{
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
- if ( !app ) return;
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !study ) return;
-
Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
- GEOM_Displayer( study ).Erase( io, true, myUpdateViewer );
+ GEOM_Displayer().Erase( io, true, myUpdateViewer );
}
};
{}
virtual void Execute()
{
- SUIT_Application* app = SUIT_Session::session()->activeApplication();
- if ( !app ) return;
-
- SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if ( !study ) return;
-
- GEOM_Displayer( study ).UpdateViewer();
+ GEOM_Displayer().UpdateViewer();
}
};
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aMainShape ) && !CORBA::is_nil( aSubShape ) ) {
// get shapes operations interface
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
- aGeomGen->GetIShapesOperations( aMainShape->GetStudyID() );
+ aGeomGen->GetIShapesOperations();
if ( !CORBA::is_nil( anIShapesOperations ) )
index = anIShapesOperations->GetTopologyIndex( aMainShape, aSubShape );
}
if ( !CORBA::is_nil( aGeomGen ) && !CORBA::is_nil( aShape ) ) {
// get shapes operations interface
GEOM::GEOM_IShapesOperations_var anIShapesOperations =
- aGeomGen->GetIShapesOperations( aShape->GetStudyID() );
+ aGeomGen->GetIShapesOperations();
if ( !CORBA::is_nil( anIShapesOperations ) )
aTypeName = anIShapesOperations->GetShapeTypeString( aShape );
}
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
if ( !study ) return;
- GEOM_Displayer displayer( study );
+ GEOM_Displayer displayer;
SALOME_View* window = displayer.GetActiveView();
if ( !window ) return;
study->setObjectProperty( mgrId, myEntry, myProperty, myValue );
- Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toLatin1().data(), "GEOM" );
+ Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.toUtf8().data(), "GEOM" );
if ( window->isVisible( io ) ) displayer.Redisplay( io, myUpdateViewer );
}
theOn, theUpdateViewer ) );
}
+/*!
+ \brief Show / hide vertices for the presentation
+ \param theEntry geometry object's entry
+ \param theOn \c true to show vertices or \c false otherwise
+ \param theUpdateViewer \c true to update active view's contents
+*/
+void GEOM_Swig::setVerticesMode( const char* theEntry, bool theOn, bool theUpdateViewer )
+{
+ ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::Vertices ),
+ theOn, theUpdateViewer ) );
+}
+
+/*!
+ \brief Show / hide name of shape for the presentation
+ \param theEntry geometry object's entry
+ \param theOn \c true to show name or \c false otherwise
+ \param theUpdateViewer \c true to update active view's contents
+*/
+void GEOM_Swig::setNameMode( const char* theEntry, bool theOn, bool theUpdateViewer )
+{
+ ProcessVoidEvent( new TSetPropertyEvent( theEntry, GEOM::propertyName( GEOM::ShowName ),
+ theOn, theUpdateViewer ) );
+}
+
/*!
\brief Change color of the presentation
\param theEntry geometry object's entry
/*!
\brief Set number of iso-lines to the presentation
\param theEntry geometry object's entry
- \param theNbU number of iso-lines along U axis (interger value >= 0)
- \param theNbV number of iso-lines along V axis (interger value >= 0)
+ \param theNbU number of iso-lines along U axis (integer value >= 0)
+ \param theNbV number of iso-lines along V axis (integer value >= 0)
\param theUpdateViewer \c true to update active view's contents
*/
void GEOM_Swig::setIsos( const char* theEntry, int theNbU, int theNbV, bool theUpdateViewer )
/*!
\brief Initialize GEOM module's engine
- \return \c true if initialization succeedes or \c false otherwise
+ \return \c true if initialization succeeds or \c false otherwise
*/
bool GEOM_Swig::initGeomGen()
{