b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
15 | #include <StdFail_UndefinedDerivative.hxx> |
16 | |
7fd59977 |
17 | #include <gp_Pnt.hxx> |
7fd59977 |
18 | #include <gp_Dir2d.hxx> |
7fd59977 |
19 | #include <gp_Dir.hxx> |
7fd59977 |
20 | |
21 | inline Standard_Real IntImp_ZerParFunc::Root() const { |
22 | |
23 | return f[0]*f[0]+f[1]*f[1]+f[2]*f[2]; |
24 | } |
25 | |
26 | |
27 | inline gp_Pnt IntImp_ZerParFunc::Point() const { |
28 | return gp_Pnt((pntsol1.XYZ()+ pntsol2.XYZ())/2.); |
29 | } |
30 | |
31 | inline gp_Dir IntImp_ZerParFunc::Direction() const { |
9775fa61 |
32 | if (tangent ) throw StdFail_UndefinedDerivative(); |
7fd59977 |
33 | return gp_Dir(tgduv[0]*dpuv[0].XYZ() + tgduv[1]*dpuv[1].XYZ()); |
34 | } |
35 | |
36 | inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS1() const { |
9775fa61 |
37 | if (tangent ) throw StdFail_UndefinedDerivative(); |
7fd59977 |
38 | return gp_Dir2d(tgduv[0],tgduv[1]); |
39 | } |
40 | |
41 | inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS2() const { |
9775fa61 |
42 | if (tangent ) throw StdFail_UndefinedDerivative(); |
7fd59977 |
43 | return gp_Dir2d(tgduv[2],tgduv[3]); |
44 | } |
45 | |
46 | inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface1() const { |
47 | return (*((const ThePSurface * const)(surf1))); |
48 | } |
49 | |
50 | inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface2() const { |
51 | return (*((const ThePSurface * const)(surf2))); |
52 | } |
53 | |