X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSTLPlugin%2FSTLPlugin_ExportDriver.cxx;h=609fca612c5f64e081f63de31ee50150d76c60f5;hb=2736f682fe0d63fbaf9dff49c46b4fa6c23d72ce;hp=625d77436d65e5fe4f52529bee842cec7230092c;hpb=8370b4a1c488f6ef18d8944869d6a8cd3a2d18d2;p=modules%2Fgeom.git diff --git a/src/STLPlugin/STLPlugin_ExportDriver.cxx b/src/STLPlugin/STLPlugin_ExportDriver.cxx index 625d77436..609fca612 100644 --- a/src/STLPlugin/STLPlugin_ExportDriver.cxx +++ b/src/STLPlugin/STLPlugin_ExportDriver.cxx @@ -24,7 +24,6 @@ // KERNEL includes #include #include -#include // GEOM includes #include "GEOM_Function.hxx" @@ -63,7 +62,7 @@ STLPlugin_ExportDriver::STLPlugin_ExportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer STLPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const +Standard_Integer STLPlugin_ExportDriver::Execute(Handle(TFunction_Logbook)& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -97,7 +96,6 @@ Standard_Integer STLPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const TopoDS_Shape aCopyShape = aCopy.Shape(); // ASCII mode aWriter.ASCIIMode() = anIsASCII; -#if OCC_VERSION_LARGE > 0x06080000 if ( anIsRelative ) { Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; Bnd_Box bndBox; @@ -108,34 +106,17 @@ Standard_Integer STLPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const //Compute triangulation BRepTools::Clean( aCopyShape ); BRepMesh_IncrementalMesh aMesh( aCopyShape, aDeflection ); -#else - // set relative mode on false for using custom deflection coefficient - aWriter.RelativeMode( ) = anIsRelative; - if( anIsRelative ) - aWriter.SetCoefficient( aDeflection ); - else - aWriter.SetDeflection( aDeflection ); -#endif aWriter.Write( aCopyShape, aFileName.ToCString() ); - log.SetTouched( Label() ); + log->SetTouched(Label()); return 1; } catch( Standard_Failure ) { - //THROW_SALOME_CORBA_EXCEPTION("Exception catched in ExportSTL", SALOME::BAD_PARAM); + //THROW_SALOME_CORBA_EXCEPTION("Exception caught in ExportSTL", SALOME::BAD_PARAM); } return 0; } -//======================================================================= -//function : MustExecute -//purpose : -//======================================================================= -Standard_Boolean STLPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const -{ - return Standard_True; -} - //================================================================================ /*! * \brief Returns a name of creation operation and names and values of creation parameters @@ -148,5 +129,4 @@ GetCreationInformation( std::string& theOperationName, return false; } -IMPLEMENT_STANDARD_HANDLE( STLPlugin_ExportDriver,GEOM_BaseDriver ); IMPLEMENT_STANDARD_RTTIEXT( STLPlugin_ExportDriver,GEOM_BaseDriver );