0026937: Eliminate NO_CXX_EXCEPTION macro support
[occt.git] / src / IntSurf / IntSurf_PathPoint.lxx
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 #include <TColgp_HSequenceOfXY.hxx>
17
18 inline void IntSurf_PathPoint::AddUV(const Standard_Real U,
19                                      const Standard_Real V) {
20   sequv->Append(gp_XY(U,V));
21 }
22   
23 inline void IntSurf_PathPoint::SetDirections (const gp_Vec& V,
24                                               const gp_Dir2d& D) {
25
26   istgt = Standard_False;
27   vectg = V;
28   dirtg = D;
29 }
30
31 inline void IntSurf_PathPoint::SetTangency (const Standard_Boolean Tang) {
32   
33   istgt = Tang;
34 }
35
36 inline void IntSurf_PathPoint::SetPassing (const Standard_Boolean Pass) {
37
38   ispass = Pass;
39 }
40
41 inline const gp_Pnt& IntSurf_PathPoint::Value () const
42 {
43   return pt;
44 }
45
46 inline void IntSurf_PathPoint::Value2d (Standard_Real& U,
47                                         Standard_Real& V) const
48 {
49   gp_XY uv(sequv->Sequence().First());
50   U = uv.X();
51   V = uv.Y();
52 }
53
54 inline Standard_Boolean IntSurf_PathPoint::IsPassingPnt () const {
55
56   return ispass;
57 }
58
59 inline Standard_Boolean IntSurf_PathPoint::IsTangent () const {
60
61   return istgt;
62 }
63
64 inline const gp_Vec& IntSurf_PathPoint::Direction3d () const {
65
66   if (istgt) {throw StdFail_UndefinedDerivative();}
67   return vectg;
68 }
69
70 inline const gp_Dir2d& IntSurf_PathPoint::Direction2d () const {
71
72   if (istgt) {throw StdFail_UndefinedDerivative();}
73   return dirtg;
74 }
75
76 inline Standard_Integer IntSurf_PathPoint::Multiplicity () const {
77
78   return (sequv->Length()-1);
79 }
80
81 inline void IntSurf_PathPoint::Parameters (const Standard_Integer Index,
82                                            Standard_Real& U,
83                                            Standard_Real& V) const
84 {
85   gp_XY uv(sequv->Value(Index+1));
86   U = uv.X();
87   V = uv.Y();
88 }
89