1 // Created on: 1992-10-13
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <Extrema_POnCurv2d.hxx>
19 Standard_Real IntCurve_ProjPCurGen::FindParameter
22 const Standard_Real LowParameter,
23 const Standard_Real HighParameter,
26 Standard_Real theparam,defaultparam;
27 Standard_Integer NbPts = TheCurveTool::NbSamples(C);
28 Standard_Real theEpsX = TheCurveTool::EpsX(C);
29 Extrema_POnCurv2d POnC;
31 IntCurve_TheCurveLocator::Locate(P,C,NbPts,LowParameter,HighParameter,POnC);
32 defaultparam = POnC.Parameter();
33 IntCurve_TheLocateExtPC Loc(P,C,defaultparam,theEpsX);
35 if(Loc.IsDone() == Standard_False) {
36 //-- cout<<"\n Erreur dans LocateExtPC "<<endl;
37 theparam = defaultparam;
40 if(Loc.IsMin() == Standard_False) {
41 //-- cout<<"\n Erreur dans LocateExtPC (Maximum trouve) "<<endl;
42 theparam = defaultparam;
45 theparam = Loc.Point().Parameter();
52 Standard_Real IntCurve_ProjPCurGen::FindParameter
55 const Standard_Real Tol)
58 Standard_Real theParam;
59 theParam = FindParameter( C
61 ,TheCurveTool::FirstParameter(C)
62 ,TheCurveTool::LastParameter(C)