1// Copyright (c) 1995-1999 Matra Datavision
2// Copyright (c) 1999-2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
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
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.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#include <StdFail_UndefinedDerivative.hxx>
16
17#include <gp_Pnt.hxx>
18#include <gp_Dir2d.hxx>
19#include <gp_Dir.hxx>
20
21inline Standard_Real IntImp_ZerParFunc::Root() const {
22
23  return f[0]*f[0]+f[1]*f[1]+f[2]*f[2];
24}
25
26
27inline gp_Pnt IntImp_ZerParFunc::Point() const {
28  return  gp_Pnt((pntsol1.XYZ()+ pntsol2.XYZ())/2.);
29}
30
31inline gp_Dir IntImp_ZerParFunc::Direction() const {
32  if (tangent ) throw StdFail_UndefinedDerivative();
33  return gp_Dir(tgduv[0]*dpuv[0].XYZ() + tgduv[1]*dpuv[1].XYZ());
34}
35
36inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS1() const {
37  if (tangent ) throw StdFail_UndefinedDerivative();
38  return gp_Dir2d(tgduv[0],tgduv[1]);
39}
40
41inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS2() const {
42  if (tangent ) throw StdFail_UndefinedDerivative();
43  return gp_Dir2d(tgduv[2],tgduv[3]);
44}
45
46inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface1() const {
47  return *((const ThePSurface* )surf1);
48}
49
50inline const ThePSurface& IntImp_ZerParFunc::AuxillarSurface2() const {
51  return *((const ThePSurface* )surf2);
52}
53
54