Salome HOME
0022057: EDF 2510 GEOM : Bug with extrusion along a path
[modules/geom.git] / src / GEOM_I / GEOM_IHealingOperations_i.cc
index 195b4a3a0384d92c6feedc55166ecb841ed16938..af7cb5cd4be92d00fff4e67b6fc3960db452f426 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -91,12 +91,9 @@ Handle(TColStd_HArray1OfExtendedString) GEOM_IHealingOperations_i::Convert
   if ( n <= 0 )
     return anOutArray;
   anOutArray = new TColStd_HArray1OfExtendedString( 1, n );
-  char* str;
   for ( int i = 0; i < n; i++ )
-  {
-    str = CORBA::string_dup( theInArray[i] );
-    anOutArray->SetValue( i+1, TCollection_ExtendedString( str ) );
-  }
+    anOutArray->SetValue( i+1, TCollection_ExtendedString( theInArray[i].in() ) );
+
   return anOutArray;
 }
 
@@ -394,6 +391,31 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::SewAllowNonManifold (GEOM::GEOM
   return GetObject(aNewObject);
 }
 
+//=============================================================================
+/*!
+ *  RemoveInternalFaces
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::RemoveInternalFaces (GEOM::GEOM_Object_ptr theCompound)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  // Set a not done flag
+  GetOperations()->SetNotDone();
+
+  // Get the object
+  Handle(GEOM_Object) anObject = GetObjectImpl(theCompound);
+  if (anObject.IsNull())
+    return aGEOMObject._retn();
+
+  // Perform
+  Handle(GEOM_Object) aNewObject = GetOperations()->RemoveInternalFaces(anObject);
+  if (!GetOperations()->IsDone() || aNewObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(aNewObject);
+}
+
 //=============================================================================
 /*!
  *  DivideEdge