#include "GEOM_Operation.h"
#include "GEOMBase.h"
#include "GEOM_Displayer.h"
+#include "GEOM_GenericObjPtr.h"
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(VTKPlugin)
+typedef GEOM::GenericObjPtr<GEOM::IVTKOperations> VTKOpPtr;
+
//=======================================================================
// function : VTKPlugin_GUI()
// purpose : Constructor
SALOMEDS::Study_var dsStudy = GeometryGUI::ClientStudyToStudy( study->studyDS() );
GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( dsStudy->StudyId(), "VTKPluginEngine" );
- GEOM::IVTKOperations_var stlOp = GEOM::IVTKOperations::_narrow( op );
- if ( CORBA::is_nil( stlOp ) ) return false;
+ VTKOpPtr vtkOp = GEOM::IVTKOperations::_narrow( op );
+ if ( vtkOp.isNull() ) return false;
LightApp_SelectionMgr* sm = app->selectionMgr();
if ( !sm ) return false;
SUIT_OverrideCursor wc;
- GEOM_Operation transaction( app, stlOp.in() );
+ GEOM_Operation transaction( app, vtkOp.get() );
try
{
app->putInfo( tr( "GEOM_PRP_EXPORT" ).arg( fileName ) );
transaction.start();
- stlOp->ExportVTK( obj, fileName.toUtf8().constData(), deflection );
+ vtkOp->ExportVTK( obj, fileName.toUtf8().constData(), deflection );
- if ( stlOp->IsDone() )
+ if ( vtkOp->IsDone() )
{
transaction.commit();
}
transaction.abort();
SUIT_MessageBox::critical( parent,
tr( "GEOM_ERROR" ),
- tr( "GEOM_PRP_ABORT" ) + "\n" + tr( stlOp->GetErrorCode() ) );
+ tr( "GEOM_PRP_ABORT" ) + "\n" + tr( vtkOp->GetErrorCode() ) );
return false;
}
}