Salome HOME
29470 - Point cloud on a face
[modules/geom.git] / src / GEOM_I / GEOM_IBasicOperations_i.cc
index b24857da187189aaecab5f261362e172d2fce847..4859ba64f036c34e6390538051b34ad2b87bfb10 100644 (file)
@@ -1,22 +1,25 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <Standard_Stream.hxx>
 
 #include "GEOM_IBasicOperations_i.hh"
@@ -34,8 +37,8 @@
  */
 //=============================================================================
 GEOM_IBasicOperations_i::GEOM_IBasicOperations_i (PortableServer::POA_ptr thePOA,
-                                                 GEOM::GEOM_Gen_ptr theEngine,
-                                                 ::GEOMImpl_IBasicOperations* theImpl)
+                                                  GEOM::GEOM_Gen_ptr theEngine,
+                                                  ::GEOMImpl_IBasicOperations* theImpl)
      :GEOM_IOperations_i(thePOA, theEngine, theImpl)
 {
   MESSAGE("GEOM_IBasicOperations_i::GEOM_IBasicOperations_i");
@@ -65,9 +68,8 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointXYZ
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-   //Create the point
-
-  Handle(GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
+  //Create the point
+  Handle(::GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -87,18 +89,40 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointWithReference
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if(theReference == NULL) return aGEOMObject._retn();
-
   //Get the reference point
-
-  Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
-    (theReference->GetStudyID(), theReference->GetEntry());
-  if (aRefernce.IsNull()) return aGEOMObject._retn();
+  Handle(::GEOM_Object) aReference = GetObjectImpl(theReference);
+  if (aReference.IsNull()) return aGEOMObject._retn();
 
   //Create the point
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakePointWithReference(aReference, theX, theY, theZ);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakePointOnLinesIntersection
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnLinesIntersection
+                  (GEOM::GEOM_Object_ptr theLine1,  GEOM::GEOM_Object_ptr theLine2)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
 
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakePointWithReference(aRefernce, theX, theY, theZ);
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference Lines
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(theLine1);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(theLine2);
+  if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakePointOnLinesIntersection(aRef1, aRef2);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -111,31 +135,200 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointWithReference
  */
 //=============================================================================
 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
-                  (GEOM::GEOM_Object_ptr theCurve,  CORBA::Double theParameter)
+                  (GEOM::GEOM_Object_ptr theCurve,
+                   CORBA::Double         theParameter,
+                   CORBA::Boolean        takeOrientationIntoAccount)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (theCurve == NULL) return aGEOMObject._retn();
+  //Get the reference curve
+  Handle(::GEOM_Object) aReference = GetObjectImpl(theCurve);
+  if (aReference.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject = GetOperations()->MakePointOnCurve
+        (aReference, theParameter, takeOrientationIntoAccount);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakePointOnCurveByLength
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurveByLength
+                  (GEOM::GEOM_Object_ptr theCurve,  
+                  CORBA::Double         theLength,
+                  GEOM::GEOM_Object_ptr theStartPoint)
+{
+  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();
 
-  Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
-    (theCurve->GetStudyID(), theCurve->GetEntry());
-  if (aRefernce.IsNull()) return aGEOMObject._retn();
+  //Get the reference point (can be NULL)
+  Handle(::GEOM_Object) aRefPoint;
+  if (!CORBA::is_nil(theStartPoint)) {
+    aRefPoint = GetObjectImpl(theStartPoint);
+  }
 
   //Create the point
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakePointOnCurveByLength(aReference, theLength, aRefPoint);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  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();
 
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakePointOnCurve(aRefernce, theParameter);
+  //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
+ */
+//=============================================================================
+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();
+
+  //Get the reference surface
+  Handle(::GEOM_Object) aReference = GetObjectImpl(theSurface);
+  if (aReference.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakePointOnSurface(aReference, theUParameter, theVParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  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);
+}
+
+//=============================================================================
+/*!
+ *  MakePointOnFace
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnFace (GEOM::GEOM_Object_ptr theFace,
+                                                                CORBA::Long           theNumberOfPnts)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference face
+  Handle(::GEOM_Object) aReference = GetObjectImpl(theFace);
+  if (aReference.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject = GetOperations()->MakePointOnFace(aReference, theNumberOfPnts);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeTangentOnCurve
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentOnCurve
+                  (GEOM::GEOM_Object_ptr theCurve,  CORBA::Double theParameter)
+{
+  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 vector
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakeTangentOnCurve(aReference, theParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
 
 //=============================================================================
 /*!
@@ -152,7 +345,7 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorDXDYDZ
 
   //Create the Vector
 
-  Handle(GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -172,20 +365,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorTwoPnt
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
-
   //Get the reference points
-
-  Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
-    (thePnt1->GetStudyID(), thePnt1->GetEntry());
-  Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
-    (thePnt2->GetStudyID(), thePnt2->GetEntry());
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
 
   //Create the vector
-
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeVectorTwoPnt(aRef1, aRef2);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -206,20 +392,13 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLine
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (thePnt == NULL || theDir == NULL) return aGEOMObject._retn();
-
   //Get the reference objects
-
-  Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
-    (thePnt->GetStudyID(), thePnt->GetEntry());
-  Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
-    (theDir->GetStudyID(), theDir->GetEntry());
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(theDir);
   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
 
   //Create the Line
-
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakeLine(aRef1, aRef2);
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeLine(aRef1, aRef2);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -239,20 +418,40 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn();
-
   //Get the reference points
-
-  Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
-    (thePnt1->GetStudyID(), thePnt1->GetEntry());
-  Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
-    (thePnt2->GetStudyID(), thePnt2->GetEntry());
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
 
   //Create the Line
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeLineTwoFaces
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoFaces
+                 (GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
 
-  Handle(GEOM_Object) anObject =
-    GetOperations()->MakeLineTwoPnt(aRef1, aRef2);
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference points
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(theFace1);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(theFace2);
+  if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
+
+  //Create the Line
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakeLineTwoFaces(aRef1, aRef2);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
@@ -267,26 +466,20 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt
 //=============================================================================
 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec
                  (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec,
-                 CORBA::Double theTrimSize)
+                  CORBA::Double theTrimSize)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn();
-
   //Get the references
-
-  Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject
-    (thePnt->GetStudyID(), thePnt->GetEntry());
-  Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
-    (theVec->GetStudyID(), theVec->GetEntry());
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(theVec);
   if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn();
 
   //Create the plane
-
-  Handle(GEOM_Object) anObject =
+  Handle(::GEOM_Object) anObject =
     GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
@@ -301,30 +494,22 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec
 //=============================================================================
 GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneThreePnt
                  (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2,
-                 GEOM::GEOM_Object_ptr thePnt3, CORBA::Double theTrimSize)
+                  GEOM::GEOM_Object_ptr thePnt3, CORBA::Double theTrimSize)
 {
   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) aRef1 = GetOperations()->GetEngine()->GetObject
-    (thePnt1->GetStudyID(), thePnt1->GetEntry());
-  Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject
-    (thePnt2->GetStudyID(), thePnt2->GetEntry());
-  Handle(GEOM_Object) aRef3 = GetOperations()->GetEngine()->GetObject
-    (thePnt3->GetStudyID(), thePnt3->GetEntry());
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(thePnt1);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(thePnt2);
+  Handle(::GEOM_Object) aRef3 = GetObjectImpl(thePnt3);
   if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull())
     return aGEOMObject._retn();
 
   //Create the plane
-
-  Handle(GEOM_Object) anObject =
+  Handle(::GEOM_Object) anObject =
     GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
@@ -345,17 +530,12 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace
   //Set a not done flag
   GetOperations()->SetNotDone();
 
-  if (theFace == NULL) return aGEOMObject._retn();
-
   //Get the reference face
-
-  Handle(GEOM_Object) aRef = GetOperations()->GetEngine()->GetObject
-    (theFace->GetStudyID(), theFace->GetEntry());
+  Handle(::GEOM_Object) aRef = GetObjectImpl(theFace);
   if (aRef.IsNull()) return aGEOMObject._retn();
 
   //Create the plane
-
-  Handle(GEOM_Object) anObject =
+  Handle(::GEOM_Object) anObject =
     GetOperations()->MakePlaneFace(aRef, theTrimSize);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
@@ -363,6 +543,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);
+}
 
 //=============================================================================
 /*!
@@ -380,9 +613,95 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker
   GetOperations()->SetNotDone();
 
   //Create the point
-  Handle(GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
-                                                            theXDX, theXDY, theXDZ,
-                                                            theYDX, theYDY, theYDZ);
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ,
+                                                             theXDX, theXDY, theXDZ,
+                                                             theYDX, theYDY, theYDZ);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeMarkerFromShape
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerFromShape
+                                              (GEOM::GEOM_Object_ptr theShape)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the referenced object
+  Handle(::GEOM_Object) aRef = GetObjectImpl(theShape);
+  if (aRef.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeMarkerFromShape(aRef);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeMarkerPntTwoVec
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarkerPntTwoVec
+                                              (GEOM::GEOM_Object_ptr theOrigin,
+                                               GEOM::GEOM_Object_ptr theXVec,
+                                               GEOM::GEOM_Object_ptr theYVec)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the referenced objects
+  Handle(::GEOM_Object) aRef1 = GetObjectImpl(theOrigin);
+  Handle(::GEOM_Object) aRef2 = GetObjectImpl(theXVec);
+  Handle(::GEOM_Object) aRef3 = GetObjectImpl(theYVec);
+  if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+  Handle(::GEOM_Object) anObject = GetOperations()->MakeMarkerPntTwoVec(aRef1,
+                                                                      aRef2,
+                                                                     aRef3);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ *  MakeTangentPlaneOnFace
+ */
+//=============================================================================
+
+GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeTangentPlaneOnFace
+                     (GEOM::GEOM_Object_ptr theFace,
+                      CORBA::Double theParameterU,
+                      CORBA::Double theParameterV,
+                      CORBA::Double theTrimSize)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  //Get the reference face
+  Handle(::GEOM_Object) aRef = GetObjectImpl(theFace);
+  if (aRef.IsNull()) return aGEOMObject._retn();
+
+  //Create the plane
+  Handle(::GEOM_Object) anObject =
+    GetOperations()->MakeTangentPlaneOnFace(aRef, theParameterU,theParameterV,theTrimSize);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();