1 // Created on: 1994-07-06
2 // Created by: Laurent PAINNOT
3 // Copyright (c) 1994-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_LocateExtCC2d.hxx>
19 #include <StdFail_NotDone.hxx>
20 #include <Extrema_POnCurv2d.hxx>
22 #include <Extrema_Curve2dTool.hxx>
23 #include <Extrema_LocECC2d.hxx>
26 //=======================================================================
27 //function : Extrema_LocateExtCC2d
29 //=======================================================================
31 Extrema_LocateExtCC2d::Extrema_LocateExtCC2d (const Adaptor2d_Curve2d& C1,
32 const Adaptor2d_Curve2d& C2,
33 const Standard_Real U0,
34 const Standard_Real V0)
35 : mySqDist(RealLast())
37 Standard_Real TolU = Extrema_Curve2dTool::Resolution(C1, Precision::Confusion());
38 Standard_Real TolV = Extrema_Curve2dTool::Resolution(C2, Precision::Confusion());
39 Extrema_POnCurv2d P1, P2;
41 // Non implemente pour l instant: l appel a Geom2dExtrema_ExtCC.
44 Extrema_LocECC2d Xtrem(C1, C2, U0, V0, TolU, TolV);
47 myDone = Xtrem.IsDone();
49 mySqDist = Xtrem.SquareDistance();
60 //=======================================================================
63 //=======================================================================
65 Standard_Boolean Extrema_LocateExtCC2d::IsDone () const {
71 //=======================================================================
74 //=======================================================================
76 Standard_Real Extrema_LocateExtCC2d::SquareDistance() const {
80 throw StdFail_NotDone();
87 //=======================================================================
90 //=======================================================================
92 void Extrema_LocateExtCC2d::Point (Extrema_POnCurv2d& P1,
93 Extrema_POnCurv2d& P2) const
97 throw StdFail_NotDone();