Salome HOME
Porting to CAS-6.3
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_i.cc
index fe525509c27373495937fae0c32f2ba904f62d13..613e3954e5bbde2948169780a501186c8bae63ae 100644 (file)
@@ -138,6 +138,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection
   return GetObject(anObject);
 }
 
+
 //=============================================================================
 /*!
  *  MakePointOnCurve
@@ -169,6 +170,39 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
   return GetObject(anObject);
 }
 
+
+//=============================================================================
+/*!
+ *  MakePointOnSurface
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface
+                                             (GEOM::GEOM_Object_ptr theSurface,
+                                             CORBA::Double theUParameter,
+                                             CORBA::Double theVParameter)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (theSurface == NULL) return aGEOMObject._retn();
+
+  //Get the reference surface
+  Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
+    (theSurface->GetStudyID(), theSurface->GetEntry());
+  if (aRefernce.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePointOnSurface(aRefernce, theUParameter, theVParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+
 //=============================================================================
 /*!
  *  MakeTangentOnCurve