-// 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 "GEOM_Superv_i.hh"
#include "SALOME_LifeCycleCORBA.hxx"
+#include "Utils_CorbaException.hxx"
#include CORBA_SERVER_HEADER(SALOME_Session)
#include "SALOMEDSClient_ClientFactory.hxx"
}
}
+#ifdef WITH_VTK
//=============================================================================
// getVTKPluginOp:
//=============================================================================
myVTKOp = GEOM::IVTKOperations::_narrow(myGeomEngine->GetPluginOperations(myStudyID, "VTKPluginEngine"));
}
}
+#endif
//=============================================================================
// GetServant:
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;
}
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;
}
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" );
}
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) {
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;
}
return false;
}
+
//=============================================================================
// Export VTK
//=============================================================================
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 =============================