Salome HOME
Rewrite local function ModifySurface of BlockFix_SphereSpaceModifier
[modules/geom.git] / src / STEPPlugin / STEPPlugin_IOperations_i.cc
index fba3ce031e4fd7c2a2ea5d0cf282d4dde8df3daa..e3c153588dd24cb7909baedd082242cc7e03667a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -119,11 +119,16 @@ void STEPPlugin_IOperations_i::ExportSTEP(GEOM::GEOM_Object_ptr theOriginal,
  *  \param theIsIgnoreUnits If True, file length units will be ignored (set to 'meter')
  *                          and result model will be scaled, if its units are not meters.
  *                          If False (default), file length units will be taken into account.
+ *  \param IsCreateAssemblies If True, for each assembly compound is created
+ *                          in the result. If False Compounds that contain a
+ *                          single shape are eliminated from the result.
  *  \return List of GEOM_Objects, containing the created shape and propagation groups.
  */
 //=============================================================================
-GEOM::ListOfGO* STEPPlugin_IOperations_i::ImportSTEP( const char* theFileName,
-                                                     const bool  theIsIgnoreUnits = false )
+GEOM::ListOfGO* STEPPlugin_IOperations_i::ImportSTEP
+                          (const char *theFileName,
+                           const bool  theIsIgnoreUnits,
+                           const bool  IsCreateAssemblies)
 {
   GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
 
@@ -131,7 +136,8 @@ GEOM::ListOfGO* STEPPlugin_IOperations_i::ImportSTEP( const char* theFileName,
   GetOperations()->SetNotDone();
 
   //Import the shape from the file
-  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportSTEP( theFileName, theIsIgnoreUnits );
+  Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->ImportSTEP
+    (theFileName, theIsIgnoreUnits, IsCreateAssemblies);
 
   if( !GetOperations()->IsDone() || aHSeq.IsNull() )
     return aSeq._retn();