0025737: GCPnts_TangentialDeflection does not produce points to approximate a knee
[occt.git] / src / IntImp / IntImp_Int2S.lxx
CommitLineData
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
20inline Standard_Boolean IntImp_Int2S::IsDone()const { return done;}
21
22inline Standard_Boolean IntImp_Int2S::IsEmpty() const
23{
24 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::IsEmpty() ");
25 return empty;
26}
27
28inline const IntSurf_PntOn2S& IntImp_Int2S::Point() const
29{
30 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::Point() ");
31 if (empty) Standard_DomainError::Raise(" IntImp_Int2S::Point() ");
32 return pint;
33}
34
35inline Standard_Boolean IntImp_Int2S::IsTangent () const {
36
37 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::IsTangent () ");
38 if (empty) Standard_DomainError::Raise(" IntImp_Int2S::IsTangent () ");
39 return tangent;
40}
41
42inline const gp_Dir& IntImp_Int2S::Direction () const {
43
44 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::Direction () ");
45 if (empty) Standard_DomainError::Raise(" IntImp_Int2S::Direction () ");
46 if (tangent) StdFail_UndefinedDerivative::Raise
47 (" IntImp_Int2S::Direction () ");
48 return d3d;
49}
50
51inline const gp_Dir2d& IntImp_Int2S::DirectionOnS1 () const {
52
53 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::DirectionOnS1 () ");
54 if (empty) Standard_DomainError::Raise(" IntImp_Int2S::DirectionOnS1 () ");
55 if (tangent) StdFail_UndefinedDerivative::Raise
56 (" IntImp_Int2S::DirectionOnS1 () ");
57 return d2d1;
58}
59
60inline const gp_Dir2d& IntImp_Int2S::DirectionOnS2 () const {
61
62 if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::DirectionOnS2 () ");
63 if (empty) Standard_DomainError::Raise(" IntImp_Int2S::DirectionOnS2 () ");
64 if (tangent) StdFail_UndefinedDerivative::Raise
65 (" IntImp_Int2S::DirectionOnS2 () ");
66 return d2d2;
67}
68
69
70inline IntImp_TheFunction& IntImp_Int2S::Function() {
71 return myZerParFunc;
72}
73