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 <GeomAbs_CurveType.hxx>
20 #include <StdFail_NotDone.hxx>
21 #include <Extrema_POnCurv2d.hxx>
22 #include <Precision.hxx>
24 #include <Adaptor2d_Curve2d.hxx>
25 #include <Extrema_Curve2dTool.hxx>
26 #include <Extrema_LocECC2d.hxx>
29 //=======================================================================
30 //function : Extrema_LocateExtCC2d
32 //=======================================================================
34 Extrema_LocateExtCC2d::Extrema_LocateExtCC2d (const Adaptor2d_Curve2d& C1,
35 const Adaptor2d_Curve2d& C2,
36 const Standard_Real U0,
37 const Standard_Real V0)
38 : mySqDist(RealLast())
40 Standard_Real TolU = Extrema_Curve2dTool::Resolution(C1, Precision::Confusion());
41 Standard_Real TolV = Extrema_Curve2dTool::Resolution(C2, Precision::Confusion());
42 Extrema_POnCurv2d P1, P2;
44 // Non implemente pour l instant: l appel a Geom2dExtrema_ExtCC.
47 Extrema_LocECC2d Xtrem(C1, C2, U0, V0, TolU, TolV);
50 myDone = Xtrem.IsDone();
52 mySqDist = Xtrem.SquareDistance();
63 //=======================================================================
66 //=======================================================================
68 Standard_Boolean Extrema_LocateExtCC2d::IsDone () const {
74 //=======================================================================
77 //=======================================================================
79 Standard_Real Extrema_LocateExtCC2d::SquareDistance() const {
83 throw StdFail_NotDone();
90 //=======================================================================
93 //=======================================================================
95 void Extrema_LocateExtCC2d::Point (Extrema_POnCurv2d& P1,
96 Extrema_POnCurv2d& P2) const
100 throw StdFail_NotDone();