]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Add method for getting tangent by parameter on curve
authorgka <gka@opencascade.com>
Mon, 24 Apr 2006 07:55:49 +0000 (07:55 +0000)
committergka <gka@opencascade.com>
Mon, 24 Apr 2006 07:55:49 +0000 (07:55 +0000)
src/GEOM_I/GEOM_IBasicOperations_i.cc
src/GEOM_I/GEOM_IBasicOperations_i.hh

index b24857da187189aaecab5f261362e172d2fce847..b67314b0b7776c0e8e96733d1f2b0a3874101613 100644 (file)
@@ -136,6 +136,37 @@ GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve
   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();
+
+  if (theCurve == NULL) return aGEOMObject._retn();
+
+  //Get the reference curve
+
+  Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject
+    (theCurve->GetStudyID(), theCurve->GetEntry());
+  if (aRefernce.IsNull()) return aGEOMObject._retn();
+
+  //Create the point
+
+  Handle(GEOM_Object) anObject =
+    GetOperations()->MakeTangentOnCurve(aRefernce, theParameter);
+  if (!GetOperations()->IsDone() || anObject.IsNull())
+    return aGEOMObject._retn();
+
+  return GetObject(anObject);
+}
+
 
 //=============================================================================
 /*!
index e46f50431072a5c8441b2b6bc48484401f2c6629..8cee133b5381753efb399f132fb19e04105cf545 100644 (file)
@@ -52,6 +52,9 @@ class GEOM_IBasicOperations_i :
    GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theCurve,
                                           CORBA::Double theParameter);
 
+   GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
+                                            CORBA::Double theParameter);
+
    GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
                                           CORBA::Double theDY,
                                           CORBA::Double theDZ);