Salome HOME
0022757: [EDF] Vertex on Edge
[modules/geom.git] / src / GEOM_I / GEOM_IHealingOperations_i.cc
index 36687558835bb740271fb3e0651990cc970e7349..cd04c762692feed87d0704c8683ed8465e8c75d8 100644 (file)
@@ -431,6 +431,40 @@ GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::DivideEdge (GEOM::GEOM_Object_p
   return GetObject(aNewObject);
 }
 
+//=============================================================================
+/*!
+ *  DivideEdgeByPoint
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr
+GEOM_IHealingOperations_i::DivideEdgeByPoint (GEOM::GEOM_Object_ptr theObject,
+                                              CORBA::Short          theIndex,
+                                              GEOM::GEOM_Object_ptr thePoint)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  // Set a not done flag
+  GetOperations()->SetNotDone();
+
+  // Get the object itself
+  Handle(GEOM_Object) anObject = GetObjectImpl(theObject);
+  if (anObject.IsNull())
+    return aGEOMObject._retn();
+
+  // Get the point
+  Handle(GEOM_Object) aPoint = GetObjectImpl(thePoint);
+  if (aPoint.IsNull())
+    return aGEOMObject._retn();
+
+  // Perform
+  Handle(GEOM_Object) aNewObject =
+    GetOperations()->DivideEdgeByPoint( anObject, theIndex, aPoint );
+  if (!GetOperations()->IsDone() || aNewObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(aNewObject);
+}
+
 //=============================================================================
 /*!
  *  FuseCollinearEdgesWithinWire