X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOM_I_Superv%2FGEOM_Superv_i.cc;h=426aebb561fb12f229ff91b7b8650164175563a0;hb=693e5f65fe0f4868fe2e0f2923aef6a3afb20d67;hp=449a3c6b8ae3c8a325ed2c5459ccc3952ffbdee1;hpb=8851ec8d8f69aedca05141791a6f81239cb192b0;p=modules%2Fgeom.git diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 449a3c6b8..426aebb56 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -1,4 +1,4 @@ -// 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 @@ -22,6 +22,7 @@ #include "GEOM_Superv_i.hh" #include "SALOME_LifeCycleCORBA.hxx" +#include "Utils_CorbaException.hxx" #include CORBA_SERVER_HEADER(SALOME_Session) #include "SALOMEDSClient_ClientFactory.hxx" @@ -483,6 +484,7 @@ void GEOM_Superv_i::getXAOPluginOp() } } +#ifdef WITH_VTK //============================================================================= // getVTKPluginOp: //============================================================================= @@ -498,6 +500,7 @@ void GEOM_Superv_i::getVTKPluginOp() myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine")); } } +#endif //============================================================================= // GetServant: @@ -2061,7 +2064,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObjec beginService( " GEOM_Superv_i::OffsetShape" ); MESSAGE("GEOM_Superv_i::OffsetShape"); getTransfOp(); - GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset); + GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShape(theObject, theOffset, true); endService( " GEOM_Superv_i::OffsetShape" ); return anObj; } @@ -2075,7 +2078,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theO beginService( " GEOM_Superv_i::OffsetShapeCopy" ); MESSAGE("GEOM_Superv_i::OffsetShapeCopy"); getTransfOp(); - GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset); + GEOM::GEOM_Object_ptr anObj = myTransfOp->OffsetShapeCopy(theObject, theOffset, true); endService( " GEOM_Superv_i::OffsetShapeCopy" ); return anObj; } @@ -3563,7 +3566,10 @@ void GEOM_Superv_i::ExportSTEP( GEOM::GEOM_Object_ptr theObject, beginService( " GEOM_Superv_i::ExportSTEP" ); MESSAGE("GEOM_Superv_i::ExportSTEP"); getSTEPPluginOp(); - mySTEPOp->ExportSTEP( theObject, theFileName ); + + const GEOM::length_unit aUnit = GEOM::LU_METER; + + mySTEPOp->ExportSTEP( theObject, theFileName, aUnit ); endService( " GEOM_Superv_i::ExportSTEP" ); } @@ -3576,7 +3582,7 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportSTEP( const char* theFileName, beginService( " GEOM_Superv_i::ImportSTEP" ); MESSAGE("GEOM_Superv_i::ImportSTEP"); getSTEPPluginOp(); - GEOM::ListOfGO* aSeq = mySTEPOp->ImportSTEP(theFileName, theIsIgnoreUnits ); + GEOM::ListOfGO* aSeq = mySTEPOp->ImportSTEP(theFileName, theIsIgnoreUnits, false ); GEOM::GEOM_Object_ptr anObj; if (aSeq->length() > 0) { @@ -3627,12 +3633,14 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::ImportIGES( const char* theFileName, CORBA::Boolean GEOM_Superv_i::ExportXAO( GEOM::GEOM_Object_ptr shape, const GEOM::ListOfGO& groups, const GEOM::ListOfFields& fields, - const char* author, const char* fileName ) + const char* author, + const char* fileName, + const char* shapeFileName ) { beginService( " GEOM_Superv_i::ExportXAO" ); MESSAGE("GEOM_Superv_i::ExportXAO"); getXAOPluginOp(); - CORBA::Boolean isGood = myXAOOp->ExportXAO( shape, groups, fields, author, fileName ); + CORBA::Boolean isGood = myXAOOp->ExportXAO( shape, groups, fields, author, fileName, shapeFileName ); endService( " GEOM_Superv_i::ExportXAO" ); return isGood; } @@ -3649,6 +3657,7 @@ CORBA::Boolean GEOM_Superv_i::ImportXAO( const char* fileName, return false; } + //============================================================================= // Export VTK //============================================================================= @@ -3656,11 +3665,16 @@ void GEOM_Superv_i::ExportVTK( GEOM::GEOM_Object_ptr theObject, const char* theFileName, CORBA::Double theDeflection ) { + #ifdef WITH_VTK beginService( " GEOM_Superv_i::ExportVTK" ); MESSAGE("GEOM_Superv_i::ExportVTK"); getVTKPluginOp(); myVTKOp->ExportVTK( theObject, theFileName, theDeflection ); endService( " GEOM_Superv_i::ExportVTK" ); +#else + std::string message("GEOM_Superv_i::ExportVTK functionality is unavailable"); + THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR); +#endif } //=============================== Advanced Operations =============================