Integration of OCCT 6.5.0 from SVN
[occt.git] / src / ChFiDS / ChFiDS_SurfData.cxx
CommitLineData
7fd59977 1// File: ChFiDS_SurfData.cxx
2// Created: Mon Nov 29 11:12:59 1993
3// Author: Isabelle GRIGNON
4// <isg@zerox>
5
6
7#include <ChFiDS_SurfData.ixx>
8
9ChFiDS_SurfData::ChFiDS_SurfData () :
10indexOfS1(0),indexOfS2(0),indexOfConge(0),
11isoncurv1(0),isoncurv2(0),twistons1(0),twistons2(0)
12{}
13
14//=======================================================================
15//function : Copy
16//purpose :
17//=======================================================================
18
19void ChFiDS_SurfData::Copy(const Handle(ChFiDS_SurfData)& Other)
20{
21indexOfS1 = Other->indexOfS1;
22indexOfS2 = Other->indexOfS2;
23indexOfConge = Other->indexOfConge;
24orientation = Other->orientation;
25intf1 = Other->intf1;
26intf2 = Other->intf2;
27
28pfirstOnS1 = Other->pfirstOnS1;
29plastOnS1 = Other->plastOnS1;
30pfirstOnS2 = Other->pfirstOnS2;
31plastOnS2 = Other->plastOnS2;
32
33ufspine = Other->ufspine;
34ulspine = Other->ulspine;
35
36simul = Other->simul;
37p2df1 = Other->p2df1;
38p2dl1 = Other->p2dl1;
39p2df2 = Other->p2df2;
40p2dl2 = Other->p2dl2;
41
42myfirstextend = Other->myfirstextend;
43mylastextend = Other->mylastextend;
44
45twistons1 = Other->twistons1;
46twistons2 = Other->twistons2;
47}
48
49//=======================================================================
50//function : Index
51//purpose :
52//=======================================================================
53
54Standard_Integer ChFiDS_SurfData::Index(const Standard_Integer OfS) const
55{
56 if(OfS == 1) return indexOfS1;
57 else return indexOfS2;
58}
59
60//=======================================================================
61//function : Interference
62//purpose :
63//=======================================================================
64
65const ChFiDS_FaceInterference& ChFiDS_SurfData::Interference
66(const Standard_Integer OnS) const
67{
68 if(OnS == 1) return intf1;
69 else return intf2;
70}
71
72
73//=======================================================================
74//function : Interference
75//purpose :
76//=======================================================================
77
78ChFiDS_FaceInterference& ChFiDS_SurfData::ChangeInterference
79(const Standard_Integer OnS)
80{
81 if(OnS == 1) return intf1;
82 else return intf2;
83}
84
85
86//=======================================================================
87//function : Vertex
88//purpose :
89//=======================================================================
90
91const ChFiDS_CommonPoint& ChFiDS_SurfData::Vertex
92(const Standard_Boolean First,const Standard_Integer OnS) const
93{
94 if(First && OnS == 1) return pfirstOnS1;
95 else if(First && OnS == 2) return pfirstOnS2;
96 else if(!First && OnS == 1) return plastOnS1;
97 else return plastOnS2;
98}
99
100
101//=======================================================================
102//function : ChangeVertex
103//purpose :
104//=======================================================================
105
106ChFiDS_CommonPoint& ChFiDS_SurfData::ChangeVertex
107(const Standard_Boolean First,const Standard_Integer OnS)
108{
109 if(First && OnS == 1) return pfirstOnS1;
110 else if(First && OnS == 2) return pfirstOnS2;
111 else if(!First && OnS == 1) return plastOnS1;
112 else return plastOnS2;
113}
114
115
116//=======================================================================
117//function : FirstSpineParam
118//purpose :
119//=======================================================================
120
121Standard_Real ChFiDS_SurfData::FirstSpineParam()const
122{
123 return ufspine;
124}
125
126//=======================================================================
127//function : LastSpineParam
128//purpose :
129//=======================================================================
130
131Standard_Real ChFiDS_SurfData::LastSpineParam()const
132{
133 return ulspine;
134}
135
136//=======================================================================
137//function : FirstSpineParam
138//purpose :
139//=======================================================================
140
141void ChFiDS_SurfData::FirstSpineParam(const Standard_Real Par)
142{
143 ufspine = Par;
144}
145
146//=======================================================================
147//function : LastSpineParam
148//purpose :
149//=======================================================================
150
151void ChFiDS_SurfData::LastSpineParam(const Standard_Real Par)
152{
153 ulspine = Par;
154}
155
156//=======================================================================
157//function : FirstExtensionValue
158//purpose :
159//=======================================================================
160
161Standard_Real ChFiDS_SurfData::FirstExtensionValue()const
162{
163 return myfirstextend;
164}
165
166//=======================================================================
167//function : LastExtensionValue
168//purpose :
169//=======================================================================
170
171Standard_Real ChFiDS_SurfData::LastExtensionValue()const
172{
173 return mylastextend;
174}
175
176//=======================================================================
177//function : FirstExtensionValue
178//purpose :
179//=======================================================================
180
181void ChFiDS_SurfData::FirstExtensionValue(const Standard_Real Extend)
182{
183 myfirstextend=Extend;
184}
185
186//=======================================================================
187//function : LastExtensionValue
188//purpose :
189//=======================================================================
190
191void ChFiDS_SurfData::LastExtensionValue(const Standard_Real Extend)
192{
193 mylastextend=Extend;
194}
195
196//=======================================================================
197//function : Simul
198//purpose :
199//=======================================================================
200
201Handle(MMgt_TShared) ChFiDS_SurfData::Simul() const
202{
203 return simul;
204}
205
206
207//=======================================================================
208//function : SetSimul
209//purpose :
210//=======================================================================
211
212void ChFiDS_SurfData::SetSimul(const Handle(MMgt_TShared)& S)
213{
214 simul = S;
215}
216
217//=======================================================================
218//function : ResetSimul
219//purpose :
220//=======================================================================
221
222void ChFiDS_SurfData::ResetSimul()
223{
224 simul.Nullify();
225}
226
227
228//=======================================================================
229//function : Get2dPoints
230//purpose :
231//=======================================================================
232
233void ChFiDS_SurfData::Get2dPoints(gp_Pnt2d& P2df1,
234 gp_Pnt2d& P2dl1,
235 gp_Pnt2d& P2df2,
236 gp_Pnt2d& P2dl2) const
237{
238 P2df1 = p2df1;
239 P2dl1 = p2dl1;
240 P2df2 = p2df2;
241 P2dl2 = p2dl2;
242}
243
244//=======================================================================
245//function : Get2dPoints
246//purpose :
247//=======================================================================
248
249gp_Pnt2d ChFiDS_SurfData::Get2dPoints(const Standard_Boolean First,
250 const Standard_Integer OnS) const
251
252{
253 if(First && OnS == 1) return p2df1;
254 else if(!First && OnS == 1) return p2dl1;
255 else if(First && OnS == 2) return p2df2;
256 return p2dl2;
257}
258
259//=======================================================================
260//function : Set2dPoints
261//purpose :
262//=======================================================================
263
264void ChFiDS_SurfData::Set2dPoints(const gp_Pnt2d& P2df1,
265 const gp_Pnt2d& P2dl1,
266 const gp_Pnt2d& P2df2,
267 const gp_Pnt2d& P2dl2)
268{
269 p2df1 = P2df1;
270 p2dl1 = P2dl1;
271 p2df2 = P2df2;
272 p2dl2 = P2dl2;
273}
274