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_ELCC_hxx
18 #include Extrema_LocECC_hxx
19 #include <StdFail_NotDone.hxx>
20 #include <Extrema_POnCurv.hxx>
21 #include <Precision.hxx>
23 Extrema_GLocateExtCC::Extrema_GLocateExtCC (const Curve1& C1,
25 const Standard_Real U0,
26 const Standard_Real V0)
28 Standard_Real TolU = C1.Resolution(Precision::Confusion());
29 Standard_Real TolV = C2.Resolution(Precision::Confusion());
30 Extrema_POnCurv P1, P2;
32 // Non implemente pour l instant: l appel a Extrema_ELCC.
35 Extrema_LocECC Xtrem(C1, C2,
39 myDone = Xtrem.IsDone();
41 mySqDist = Xtrem.SquareDistance();
52 Standard_Boolean Extrema_GLocateExtCC::IsDone () const {
58 Standard_Real Extrema_GLocateExtCC::SquareDistance() const {
60 if (!myDone) { StdFail_NotDone::Raise(); }
66 void Extrema_GLocateExtCC::Point (Extrema_POnCurv& P1, Extrema_POnCurv& P2) const {
68 if (!myDone) { StdFail_NotDone::Raise(); }