Salome HOME
Notebook: processed creation of objects dependent on another objects.
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_i.cc
index f79e653088fb88f716cfa528579be1c16cff8aca..d0d28dfbda463a629fb1d136871ef1470d00b049 100644 (file)
@@ -72,7 +72,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointXYZ
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
-  return GetObject(anObject);
+  return GetObject(anObject, false);
 }
 
 //=============================================================================
@@ -154,6 +154,36 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakePointOnCurveByCoord
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurveByCoord
+                  (GEOM::GEOM_Object_ptr theCurve, 
+                   CORBA::Double theXParameter,
+                   CORBA::Double theYParameter,
+                   CORBA::Double theZParameter)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference curve
+  Handle(GEOM_Object) aReference = GetObjectImpl(theCurve);
+  if (aReference.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePointOnCurveByCoord(aReference, theXParameter,
+                                             theYParameter, theZParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 //=============================================================================
 /*!
  *  MakePointOnSurface
@@ -182,6 +212,36 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurface
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakePointOnSurfaceByCoord
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnSurfaceByCoord
+                                             (GEOM::GEOM_Object_ptr theSurface,
+                                              CORBA::Double theXParameter,
+                                              CORBA::Double theYParameter,
+                                              CORBA::Double theZParameter)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference surface
+  Handle(GEOM_Object) aReference = GetObjectImpl(theSurface);
+  if (aReference.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePointOnSurfaceByCoord(aReference, theXParameter,
+                                               theYParameter, theZParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 
 //=============================================================================
 /*!
@@ -228,7 +288,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorDXDYDZ
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
-  return GetObject(anObject);
+  return GetObject(anObject, false);
 }
 
 //=============================================================================
@@ -498,7 +558,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
-  return GetObject(anObject);
+  return GetObject(anObject, false);
 }
 
 //=============================================================================