summaryrefslogtreecommitdiff
path: root/inc/ChFiDS_Spine.lxx
blob: a8fc5145048e6a1c8e116a6eb98f76ebaa667063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// File:	ChFiDS_Spine.lxx
// Created:	Thu Nov 18 12:44:20 1993
// Author:	Isabelle GRIGNON
//		<isg@zerox>

#include <TopoDS.hxx>

//=======================================================================
//function : SetFirstStatus
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::SetFirstStatus(const ChFiDS_State S)
{
  firstState = S;
}


//=======================================================================
//function : SetLastStatus
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::SetLastStatus(const ChFiDS_State S)
{
  lastState = S;
}
//=======================================================================
//function : FirstStatus
//purpose  : 
//=======================================================================

inline ChFiDS_State  ChFiDS_Spine::FirstStatus()const 
{
  return firstState;
}


//=======================================================================
//function : LastStatus
//purpose  : 
//=======================================================================

inline ChFiDS_State  ChFiDS_Spine::LastStatus()const 
{
  return lastState;
}


//=======================================================================
//function : SetStatus
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::SetStatus(const ChFiDS_State S,
				     const Standard_Boolean IsFirst)
{
  if(IsFirst) firstState = S;
  else lastState = S;
}
//=======================================================================
//function : Status
//purpose  : 
//=======================================================================

inline ChFiDS_State  ChFiDS_Spine::Status(const Standard_Boolean IsFirst)const 
{
  if (IsFirst) return firstState;
  else return lastState;
}

//=======================================================================
//function : SetTangencyExtremity
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::SetTangencyExtremity(const Standard_Boolean IsTangency,
						const Standard_Boolean IsFirst)
{
  if(IsFirst)  firstistgt = IsTangency ;
  else         lastistgt = IsTangency;
}
//=======================================================================
//function : IsTangencyExtremity
//purpose  : 
//=======================================================================

inline Standard_Boolean 
ChFiDS_Spine::IsTangencyExtremity(const Standard_Boolean IsFirst)const 
{
  if (IsFirst) return firstistgt;
  else return lastistgt;
}

//=======================================================================
//function : NbEdges
//purpose  : 
//=======================================================================

inline Standard_Integer  ChFiDS_Spine::NbEdges() const 
{
  return spine.Length();
}


//=======================================================================
//function : Edges
//purpose  : 
//=======================================================================

inline const TopoDS_Edge&  ChFiDS_Spine::Edges(const Standard_Integer I) const 
{
  return TopoDS::Edge(spine.Value(I));
}

//=======================================================================
//function : SetEdges
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::SetEdges(const TopoDS_Edge& E)
{
  spine.Append(E);
}

//=======================================================================
//function : PutInFirst
//purpose  : 
//=======================================================================

inline void  ChFiDS_Spine::PutInFirst(const TopoDS_Edge& E)
{
  spine.InsertBefore(1,E);
}

//=======================================================================
//function : CurrentIndexOfElementarySpine
//purpose  : 
//=======================================================================
inline Standard_Integer ChFiDS_Spine::CurrentIndexOfElementarySpine() const 
{
  return indexofcurve;
}