X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSTEPPlugin%2FSTEPPlugin_IOperations.cxx;fp=src%2FSTEPPlugin%2FSTEPPlugin_IOperations.cxx;h=24f898aeb6d4a65fd802337a3c84d8789f16cedd;hb=9361e2c00ab6ab333b32af580352ae6e8f654401;hp=72064e8e3027fb780a0dd0518e3babec2d149d95;hpb=2a43dbcceb32d847ac6ab7b310b9a116e2c28861;p=modules%2Fgeom.git diff --git a/src/STEPPlugin/STEPPlugin_IOperations.cxx b/src/STEPPlugin/STEPPlugin_IOperations.cxx index 72064e8e3..24f898aeb 100644 --- a/src/STEPPlugin/STEPPlugin_IOperations.cxx +++ b/src/STEPPlugin/STEPPlugin_IOperations.cxx @@ -167,8 +167,9 @@ void STEPPlugin_IOperations::ExportSTEP */ //============================================================================= Handle(TColStd_HSequenceOfTransient) -STEPPlugin_IOperations::ImportSTEP( const TCollection_AsciiString& theFileName, - const bool theIsIgnoreUnits ) +STEPPlugin_IOperations::ImportSTEP(const TCollection_AsciiString& theFileName, + const bool theIsIgnoreUnits, + const bool IsCreateAssemblies) { SetErrorCode(KO); if( theFileName.IsEmpty() ) return NULL; @@ -188,6 +189,7 @@ STEPPlugin_IOperations::ImportSTEP( const TCollection_AsciiString& theFileName, STEPPlugin_IImport aCI( aFunction ); aCI.SetFileName( theFileName ); aCI.SetIsIgnoreUnits( theIsIgnoreUnits ); + aCI.SetIsCreateAssemblies( IsCreateAssemblies ); //Perform the Import Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient; @@ -211,10 +213,10 @@ STEPPlugin_IOperations::ImportSTEP( const TCollection_AsciiString& theFileName, //Make a Python command GEOM::TPythonDump pd (aFunction); - if( theIsIgnoreUnits ) - pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\", True)"; - else - pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\")"; + pd << aSeq << " = geompy.ImportSTEP(\"" << theFileName.ToCString() << "\", "; + pd << (theIsIgnoreUnits ? "True" : "False"); + pd << ", " << (IsCreateAssemblies ? "True" : "False"); + pd << ")"; SetErrorCode(OK); return aSeq;