Salome HOME
Merge from V5_1_4_BR 07/05/2010
[modules/geom.git] / src / GEOM_I / GEOM_ILocalOperations_i.cc
index 5b3289eecb53d697df31f906b66ec531d9438441..5a174094f24083d0aaaa2ae72bd37cf500851680 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  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
@@ -18,6 +18,7 @@
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include <Standard_Stream.hxx>
 
@@ -95,7 +96,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges
   //Get the reference edges
   int ind = 0;
   int aLen = theEdges.length();
-  list<int> anEdges;
+  std::list<int> anEdges;
   for (; ind < aLen; ind++) {
     anEdges.push_back(theEdges[ind]);
   }
@@ -127,7 +128,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdgesR1R2
   //Get the reference edges
   int ind = 0;
   int aLen = theEdges.length();
-  list<int> anEdges;
+  std::list<int> anEdges;
   for (; ind < aLen; ind++) {
     anEdges.push_back(theEdges[ind]);
   }
@@ -159,7 +160,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces
   //Get the reference faces
   int ind = 0;
   int aLen = theFaces.length();
-  list<int> aFaces;
+  std::list<int> aFaces;
   for (; ind < aLen; ind++) {
     aFaces.push_back(theFaces[ind]);
   }
@@ -191,7 +192,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFacesR1R2
   //Get the reference faces
   int ind = 0;
   int aLen = theFaces.length();
-  list<int> aFaces;
+  std::list<int> aFaces;
   for (; ind < aLen; ind++) {
     aFaces.push_back(theFaces[ind]);
   }
@@ -223,7 +224,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet2D
   //Get the reference vertex
   int ind = 0;
   int aLen = theVertexes.length();
-  list<int> aVertexes;
+  std::list<int> aVertexes;
   for (; ind < aLen; ind++) {
     aVertexes.push_back(theVertexes[ind]);
   }
@@ -237,6 +238,38 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet2D
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeFillet1D
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFillet1D
+                      (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR,
+                       const GEOM::ListOfLong& theVertexes)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Get the reference shape (wire)
+  Handle(GEOM_Object) aShapeRef = GetObjectImpl(theShape);
+  if (aShapeRef.IsNull()) return aGEOMObject._retn();
+
+  //Get the reference vertex
+  int ind = 0;
+  int aLen = theVertexes.length();
+  std::list<int> aVertexes;
+  for (; ind < aLen; ind++) {
+    aVertexes.push_back(theVertexes[ind]);
+  }
+
+  //Create the Fillet
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakeFillet1D(aShapeRef, theR, aVertexes);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  MakeChamferAll
@@ -328,7 +361,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces
   //Get the reference faces
   int ind = 0;
   int aLen = theFaces.length();
-  list<int> aFaces;
+  std::list<int> aFaces;
   for (; ind < aLen; ind++) {
     aFaces.push_back(theFaces[ind]);
   }
@@ -360,7 +393,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFacesAD
   //Get the reference faces
   int ind = 0;
   int aLen = theFaces.length();
-  list<int> aFaces;
+  std::list<int> aFaces;
   for (; ind < aLen; ind++) {
     aFaces.push_back(theFaces[ind]);
   }
@@ -393,7 +426,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdges
   //Get the reference edges
   int ind = 0;
   int aLen = theEdges.length();
-  list<int> aEdges;
+  std::list<int> aEdges;
   for (; ind < aLen; ind++) {
     aEdges.push_back(theEdges[ind]);
   }
@@ -426,7 +459,7 @@ GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdgesAD
   //Get the reference edges
   int ind = 0;
   int aLen = theEdges.length();
-  list<int> aEdges;
+  std::list<int> aEdges;
   for (; ind < aLen; ind++) {
     aEdges.push_back(theEdges[ind]);
   }