Salome HOME
[bos #29471] [EDF] (2022-T1) Advanced geometry features: iterate through holes of...
[modules/geom.git] / src / GEOM_I_Superv / GEOM_Superv_i.cc
index adb77cca48e9ac264c580082c94b01bed747a385..7c3f7299e8b507b5af5e8cd14a95fae792555ba1 100644 (file)
@@ -61,6 +61,7 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
   myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil();
   myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil();
   myLocalOp = GEOM::GEOM_ILocalOperations::_nil();
+  myMeasureOp = GEOM::GEOM_IMeasureOperations::_nil();
   myGroupOp = GEOM::GEOM_IGroupOperations::_nil();
 }
 
@@ -299,6 +300,20 @@ void GEOM_Superv_i::getLocalOp()
   }
 }
 
+//=============================================================================
+//  getMeasureOp:
+//=============================================================================
+void GEOM_Superv_i::getMeasureOp()
+{
+  if (CORBA::is_nil(myGeomEngine))
+    setGeomEngine();
+  // get GEOM_IMeasureOperations interface
+  if (CORBA::is_nil(myMeasureOp))
+  {
+    myMeasureOp = myGeomEngine->GetIMeasureOperations();
+  }
+}
+
 //=============================================================================
 //  getGroupOp:
 //=============================================================================
@@ -3743,6 +3758,21 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSmoothingSurface (GEOM::GEOM_List_ptr t
   return NULL;
 }
 
+//=============================================================================
+//  PatchFace:
+//=============================================================================
+GEOM::GEOM_List_ptr GEOM_Superv_i::PatchFace(GEOM::GEOM_Object_ptr theShape)
+{
+  beginService(" GEOM_Superv_i::PatchFace");
+  MESSAGE("GEOM_Superv_i::PatchFace");
+  getLocalOp();
+
+  GEOM::ListOfGO* aList = myMeasureOp->PatchFace(theShape);
+  GEOM_List_i<GEOM::ListOfGO>* aListPtr = new GEOM_List_i<GEOM::ListOfGO>(*(aList));
+  endService(" GEOM_Superv_i::PatchFace");
+  return aListPtr->_this();
+}
+
 /*@@ insert new functions before this line @@ do not remove this line @@*/
 
 GEOM_Superv_i_With_Session::GEOM_Superv_i_With_Session(CORBA::ORB_ptr orb,