Salome HOME
Notebook: processed creation of objects dependent on another objects.
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_i.cc
index b4c3b9f8e0e21655d8f77d1f1590293f2e443775..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);
 }
 
 //=============================================================================
@@ -422,6 +482,59 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakePlane2Vec
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlane2Vec
+                 (GEOM::GEOM_Object_ptr theVec1, GEOM::GEOM_Object_ptr theVec2,
+                  CORBA::Double theTrimSize)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the references
+  Handle(GEOM_Object) aRef1 = GetObjectImpl(theVec1);
+  Handle(GEOM_Object) aRef2 = GetObjectImpl(theVec2);
+  if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
+
+  //Create the plane
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePlane2Vec(aRef1, aRef2, theTrimSize);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakePlaneLCS
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneLCS
+                 (GEOM::GEOM_Object_ptr theLCS, CORBA::Double theTrimSize,
+                 CORBA::Double theOrientation)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the references
+  Handle(GEOM_Object) aRef1 = GetObjectImpl(theLCS);
+
+  //Create the plane
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakePlaneLCS(aRef1, theTrimSize, theOrientation);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
 
 //=============================================================================
 /*!
@@ -445,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);
 }
 
 //=============================================================================