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_NotDone.hxx> |
16 | #include <StdFail_UndefinedDerivative.hxx> |
17 | #include <Standard_DomainError.hxx> |
18 | |
19 | |
20 | inline Standard_Boolean IntImp_Int2S::IsDone()const { return done;} |
21 | |
22 | inline Standard_Boolean IntImp_Int2S::IsEmpty() const |
23 | { |
9775fa61 |
24 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsEmpty() "); |
7fd59977 |
25 | return empty; |
26 | } |
27 | |
28 | inline const IntSurf_PntOn2S& IntImp_Int2S::Point() const |
29 | { |
9775fa61 |
30 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::Point() "); |
31 | if (empty) throw Standard_DomainError(" IntImp_Int2S::Point() "); |
7fd59977 |
32 | return pint; |
33 | } |
34 | |
35 | inline Standard_Boolean IntImp_Int2S::IsTangent () const { |
36 | |
9775fa61 |
37 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsTangent () "); |
38 | if (empty) throw Standard_DomainError(" IntImp_Int2S::IsTangent () "); |
7fd59977 |
39 | return tangent; |
40 | } |
41 | |
42 | inline const gp_Dir& IntImp_Int2S::Direction () const { |
43 | |
9775fa61 |
44 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::Direction () "); |
45 | if (empty) throw Standard_DomainError(" IntImp_Int2S::Direction () "); |
46 | if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::Direction () "); |
7fd59977 |
47 | return d3d; |
48 | } |
49 | |
50 | inline const gp_Dir2d& IntImp_Int2S::DirectionOnS1 () const { |
51 | |
9775fa61 |
52 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS1 () "); |
53 | if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS1 () "); |
54 | if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS1 () "); |
7fd59977 |
55 | return d2d1; |
56 | } |
57 | |
58 | inline const gp_Dir2d& IntImp_Int2S::DirectionOnS2 () const { |
59 | |
9775fa61 |
60 | if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS2 () "); |
61 | if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS2 () "); |
62 | if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS2 () "); |
7fd59977 |
63 | return d2d2; |
64 | } |
65 | |
66 | |
67 | inline IntImp_TheFunction& IntImp_Int2S::Function() { |
68 | return myZerParFunc; |
69 | } |
70 | |
9d32c463 |
71 | inline IntSurf_PntOn2S& IntImp_Int2S::ChangePoint() |
72 | { |
73 | return pint; |
74 | } |