Replacing french comments by english one
[occt.git] / src / ChFiDS / ChFiDS_Spine.lxx
1 // File:        ChFiDS_Spine.lxx
2 // Created:     Thu Nov 18 12:44:20 1993
3 // Author:      Isabelle GRIGNON
4 //              <isg@zerox>
5
6 #include <TopoDS.hxx>
7
8 //=======================================================================
9 //function : SetFirstStatus
10 //purpose  : 
11 //=======================================================================
12
13 inline void  ChFiDS_Spine::SetFirstStatus(const ChFiDS_State S)
14 {
15   firstState = S;
16 }
17
18
19 //=======================================================================
20 //function : SetLastStatus
21 //purpose  : 
22 //=======================================================================
23
24 inline void  ChFiDS_Spine::SetLastStatus(const ChFiDS_State S)
25 {
26   lastState = S;
27 }
28 //=======================================================================
29 //function : FirstStatus
30 //purpose  : 
31 //=======================================================================
32
33 inline ChFiDS_State  ChFiDS_Spine::FirstStatus()const 
34 {
35   return firstState;
36 }
37
38
39 //=======================================================================
40 //function : LastStatus
41 //purpose  : 
42 //=======================================================================
43
44 inline ChFiDS_State  ChFiDS_Spine::LastStatus()const 
45 {
46   return lastState;
47 }
48
49
50 //=======================================================================
51 //function : SetStatus
52 //purpose  : 
53 //=======================================================================
54
55 inline void  ChFiDS_Spine::SetStatus(const ChFiDS_State S,
56                                      const Standard_Boolean IsFirst)
57 {
58   if(IsFirst) firstState = S;
59   else lastState = S;
60 }
61 //=======================================================================
62 //function : Status
63 //purpose  : 
64 //=======================================================================
65
66 inline ChFiDS_State  ChFiDS_Spine::Status(const Standard_Boolean IsFirst)const 
67 {
68   if (IsFirst) return firstState;
69   else return lastState;
70 }
71
72 //=======================================================================
73 //function : SetTangencyExtremity
74 //purpose  : 
75 //=======================================================================
76
77 inline void  ChFiDS_Spine::SetTangencyExtremity(const Standard_Boolean IsTangency,
78                                                 const Standard_Boolean IsFirst)
79 {
80   if(IsFirst)  firstistgt = IsTangency ;
81   else         lastistgt = IsTangency;
82 }
83 //=======================================================================
84 //function : IsTangencyExtremity
85 //purpose  : 
86 //=======================================================================
87
88 inline Standard_Boolean 
89 ChFiDS_Spine::IsTangencyExtremity(const Standard_Boolean IsFirst)const 
90 {
91   if (IsFirst) return firstistgt;
92   else return lastistgt;
93 }
94
95 //=======================================================================
96 //function : NbEdges
97 //purpose  : 
98 //=======================================================================
99
100 inline Standard_Integer  ChFiDS_Spine::NbEdges() const 
101 {
102   return spine.Length();
103 }
104
105
106 //=======================================================================
107 //function : Edges
108 //purpose  : 
109 //=======================================================================
110
111 inline const TopoDS_Edge&  ChFiDS_Spine::Edges(const Standard_Integer I) const 
112 {
113   return TopoDS::Edge(spine.Value(I));
114 }
115
116 //=======================================================================
117 //function : SetEdges
118 //purpose  : 
119 //=======================================================================
120
121 inline void  ChFiDS_Spine::SetEdges(const TopoDS_Edge& E)
122 {
123   spine.Append(E);
124 }
125
126 //=======================================================================
127 //function : PutInFirst
128 //purpose  : 
129 //=======================================================================
130
131 inline void  ChFiDS_Spine::PutInFirst(const TopoDS_Edge& E)
132 {
133   spine.InsertBefore(1,E);
134 }
135
136 //=======================================================================
137 //function : CurrentIndexOfElementarySpine
138 //purpose  : 
139 //=======================================================================
140 inline Standard_Integer ChFiDS_Spine::CurrentIndexOfElementarySpine() const 
141 {
142   return indexofcurve;
143 }