Add method for getting tangent by parameter on curve

This commit is contained in:
gka 2006-04-24 07:55:49 +00:00
parent 7640175a01
commit aa800f73f1
2 changed files with 34 additions and 0 deletions

View 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);
}
//=============================================================================
/*!

View 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);