]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM_I/GEOM_IShapesOperations_i.cc
Salome HOME
[EDF] (2023-T3) Creation of a non planar face from a list of edges and points
[modules/geom.git] / src / GEOM_I / GEOM_IShapesOperations_i.cc
index 73a42c007dc4c68693f3c27eac487b88578d343c..7526c83ed43a32c5628beaacb7f9f62543810282 100644 (file)
@@ -310,6 +310,47 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceFromSurface
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeWrappedFace
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWrappedFace
+                                  (const GEOM::ListOfGO& theEdges,
+                                   const GEOM::ListOfGO& theVertices,
+                                   const CORBA::Double theTolerance)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the edges
+  std::list<Handle(::GEOM_Object)> anEdges;
+  for( CORBA::ULong ind = 0; ind < theEdges.length(); ind++ ) {
+    Handle(::GEOM_Object) anObject = GetObjectImpl( theEdges[ind] );
+    anEdges.push_back(anObject);
+  }
+
+  //Get the vertices
+  std::list<Handle(::GEOM_Object)> aVertices;
+  for( CORBA::ULong ind = 0; ind < theVertices.length(); ind++ ) {
+    Handle(::GEOM_Object) anObject = GetObjectImpl( theVertices[ind] );
+    aVertices.push_back(anObject);
+  }
+
+  //Create the Face
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakeWrappedFace(anEdges, aVertices, theTolerance);
+
+  // enable warning status
+  if (anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+
 //=============================================================================
 /*!
  *  MakeFaceWithConstraints