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 | |
17 | inline void IntImp_ZerImpFunc::Set (const ThePSurface& PS) |
18 | { |
19 | surf = (Standard_Address)(&PS); |
20 | } |
21 | |
22 | inline void IntImp_ZerImpFunc::SetImplicitSurface (const TheISurface& IS) |
23 | { |
24 | func = (Standard_Address)(&IS); |
25 | } |
26 | |
27 | inline void IntImp_ZerImpFunc::Set (const Standard_Real Tol) |
28 | { |
29 | tol = Tol; |
30 | } |
31 | |
32 | inline Standard_Real IntImp_ZerImpFunc::Root() const |
33 | { |
34 | return valf; |
35 | } |
36 | |
37 | inline Standard_Real IntImp_ZerImpFunc::Tolerance() const |
38 | { |
39 | return tol; |
40 | } |
41 | |
42 | inline const gp_Pnt& IntImp_ZerImpFunc::Point() const |
43 | { |
44 | return pntsol; |
45 | } |
46 | |
47 | inline const gp_Vec& IntImp_ZerImpFunc::Direction3d() |
48 | { |
9775fa61 |
49 | if (IsTangent()) throw StdFail_UndefinedDerivative(); |
7fd59977 |
50 | return d3d; |
51 | } |
52 | |
53 | inline const gp_Dir2d& IntImp_ZerImpFunc::Direction2d() |
54 | { |
9775fa61 |
55 | if (IsTangent()) throw StdFail_UndefinedDerivative(); |
7fd59977 |
56 | return d2d; |
57 | } |
58 | |
59 | inline const ThePSurface& IntImp_ZerImpFunc::PSurface() const |
60 | { |
61 | return (*((ThePSurface *)(surf))); |
62 | } |
63 | |
64 | inline const TheISurface& IntImp_ZerImpFunc::ISurface() const |
65 | { |
66 | return (*((TheISurface *)(func))); |
67 | } |
68 | |