Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / src / GEOM_I / GEOM_ICurvesOperations_i.cc
index d0c097ed463756859ceef01766c1bdf16846d517..3a15afb1b22a13b134b2db3fca8cd71ee8dae219 100644 (file)
@@ -119,6 +119,40 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeCircleCenter2Pnt
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleCenter2Pnt
+                      (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
+                      GEOM::GEOM_Object_ptr thePnt3)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
+
+  //Get the reference points
+  Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
+    (thePnt1->GetStudyID(), thePnt1->GetEntry());
+  Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
+    (thePnt2->GetStudyID(), thePnt2->GetEntry());
+  Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
+    (thePnt3->GetStudyID(), thePnt3->GetEntry());
+
+  if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
+
+  // Make Circle
+  Handle(GEOM_Object) anObject = GetOperations()->MakeCircleCenter2Pnt(aPnt1, aPnt2, aPnt3);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  MakeEllipse
@@ -188,6 +222,43 @@ GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArc
   return GetObject(anObject);
 }
 
+
+//=============================================================================
+/*!
+ *  MakeArcCenter
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArcCenter
+    (GEOM::GEOM_Object_ptr thePnt1,
+     GEOM::GEOM_Object_ptr thePnt2,
+     GEOM::GEOM_Object_ptr thePnt3,
+     CORBA::Boolean theSense)
+
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn();
+
+  //Get the reference points
+  Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject
+      (thePnt1->GetStudyID(), thePnt1->GetEntry());
+  Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject
+      (thePnt2->GetStudyID(), thePnt2->GetEntry());
+  Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject
+      (thePnt3->GetStudyID(), thePnt3->GetEntry());
+
+  if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn();
+
+  // Make ArcCenter
+  Handle(GEOM_Object) anObject =
+      GetOperations()->MakeArcCenter(aPnt1, aPnt2, aPnt3,theSense);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
 //=============================================================================
 /*!
  *  MakePolyline