// File: IntCurveSurface_QuadricCurveFunc.gxx // Created: Thu Aug 19 10:55:26 1993 // Author: Laurent BUCHARD // //-Copyright: Matra Datavision 1993 #include //================================================================================ IntCurveSurface_QuadricCurveFunc::IntCurveSurface_QuadricCurveFunc(const TheQuadric& Q, const TheCurve& C) : myQuadric(Q), myCurve(C) { } //================================================================================ Standard_Boolean IntCurveSurface_QuadricCurveFunc::Value(const Standard_Real Param, Standard_Real& F) { F = myQuadric.Distance(TheCurveTool::Value(myCurve,Param)); return(Standard_True); } Standard_Boolean IntCurveSurface_QuadricCurveFunc::Derivative(const Standard_Real Param, Standard_Real& D) { gp_Pnt P; gp_Vec T; TheCurveTool::D1(myCurve,Param,P,T); D = T.Dot(myQuadric.Gradient(P)); return(Standard_True); } Standard_Boolean IntCurveSurface_QuadricCurveFunc::Values(const Standard_Real Param, Standard_Real& F, Standard_Real& D) { gp_Pnt P; gp_Vec T,Grad; TheCurveTool::D1(myCurve,Param,P,T); myQuadric.ValAndGrad(P,F,Grad); D = T.Dot(Grad); return(Standard_True); }