0024814: Avoid using explicit names of Handle classes
[occt.git] / src / ChFiDS / ChFiDS_SurfData.cxx
CommitLineData
b311480e 1// Created on: 1993-11-29
2// Created by: Isabelle GRIGNON
3// Copyright (c) 1993-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17#include <ChFiDS_SurfData.ixx>
18
19ChFiDS_SurfData::ChFiDS_SurfData () :
20indexOfS1(0),indexOfS2(0),indexOfConge(0),
21isoncurv1(0),isoncurv2(0),twistons1(0),twistons2(0)
22{}
23
24//=======================================================================
25//function : Copy
26//purpose :
27//=======================================================================
28
29void ChFiDS_SurfData::Copy(const Handle(ChFiDS_SurfData)& Other)
30{
31indexOfS1 = Other->indexOfS1;
32indexOfS2 = Other->indexOfS2;
33indexOfConge = Other->indexOfConge;
34orientation = Other->orientation;
35intf1 = Other->intf1;
36intf2 = Other->intf2;
37
38pfirstOnS1 = Other->pfirstOnS1;
39plastOnS1 = Other->plastOnS1;
40pfirstOnS2 = Other->pfirstOnS2;
41plastOnS2 = Other->plastOnS2;
42
43ufspine = Other->ufspine;
44ulspine = Other->ulspine;
45
46simul = Other->simul;
47p2df1 = Other->p2df1;
48p2dl1 = Other->p2dl1;
49p2df2 = Other->p2df2;
50p2dl2 = Other->p2dl2;
51
52myfirstextend = Other->myfirstextend;
53mylastextend = Other->mylastextend;
54
55twistons1 = Other->twistons1;
56twistons2 = Other->twistons2;
57}
58
59//=======================================================================
60//function : Index
61//purpose :
62//=======================================================================
63
64Standard_Integer ChFiDS_SurfData::Index(const Standard_Integer OfS) const
65{
66 if(OfS == 1) return indexOfS1;
67 else return indexOfS2;
68}
69
70//=======================================================================
71//function : Interference
72//purpose :
73//=======================================================================
74
75const ChFiDS_FaceInterference& ChFiDS_SurfData::Interference
76(const Standard_Integer OnS) const
77{
78 if(OnS == 1) return intf1;
79 else return intf2;
80}
81
82
83//=======================================================================
84//function : Interference
85//purpose :
86//=======================================================================
87
88ChFiDS_FaceInterference& ChFiDS_SurfData::ChangeInterference
89(const Standard_Integer OnS)
90{
91 if(OnS == 1) return intf1;
92 else return intf2;
93}
94
95
96//=======================================================================
97//function : Vertex
98//purpose :
99//=======================================================================
100
101const ChFiDS_CommonPoint& ChFiDS_SurfData::Vertex
102(const Standard_Boolean First,const Standard_Integer OnS) const
103{
104 if(First && OnS == 1) return pfirstOnS1;
105 else if(First && OnS == 2) return pfirstOnS2;
106 else if(!First && OnS == 1) return plastOnS1;
107 else return plastOnS2;
108}
109
110
111//=======================================================================
112//function : ChangeVertex
113//purpose :
114//=======================================================================
115
116ChFiDS_CommonPoint& ChFiDS_SurfData::ChangeVertex
117(const Standard_Boolean First,const Standard_Integer OnS)
118{
119 if(First && OnS == 1) return pfirstOnS1;
120 else if(First && OnS == 2) return pfirstOnS2;
121 else if(!First && OnS == 1) return plastOnS1;
122 else return plastOnS2;
123}
124
125
126//=======================================================================
127//function : FirstSpineParam
128//purpose :
129//=======================================================================
130
131Standard_Real ChFiDS_SurfData::FirstSpineParam()const
132{
133 return ufspine;
134}
135
136//=======================================================================
137//function : LastSpineParam
138//purpose :
139//=======================================================================
140
141Standard_Real ChFiDS_SurfData::LastSpineParam()const
142{
143 return ulspine;
144}
145
146//=======================================================================
147//function : FirstSpineParam
148//purpose :
149//=======================================================================
150
151void ChFiDS_SurfData::FirstSpineParam(const Standard_Real Par)
152{
153 ufspine = Par;
154}
155
156//=======================================================================
157//function : LastSpineParam
158//purpose :
159//=======================================================================
160
161void ChFiDS_SurfData::LastSpineParam(const Standard_Real Par)
162{
163 ulspine = Par;
164}
165
166//=======================================================================
167//function : FirstExtensionValue
168//purpose :
169//=======================================================================
170
171Standard_Real ChFiDS_SurfData::FirstExtensionValue()const
172{
173 return myfirstextend;
174}
175
176//=======================================================================
177//function : LastExtensionValue
178//purpose :
179//=======================================================================
180
181Standard_Real ChFiDS_SurfData::LastExtensionValue()const
182{
183 return mylastextend;
184}
185
186//=======================================================================
187//function : FirstExtensionValue
188//purpose :
189//=======================================================================
190
191void ChFiDS_SurfData::FirstExtensionValue(const Standard_Real Extend)
192{
193 myfirstextend=Extend;
194}
195
196//=======================================================================
197//function : LastExtensionValue
198//purpose :
199//=======================================================================
200
201void ChFiDS_SurfData::LastExtensionValue(const Standard_Real Extend)
202{
203 mylastextend=Extend;
204}
205
206//=======================================================================
207//function : Simul
208//purpose :
209//=======================================================================
210
211Handle(MMgt_TShared) ChFiDS_SurfData::Simul() const
212{
213 return simul;
214}
215
216
217//=======================================================================
218//function : SetSimul
219//purpose :
220//=======================================================================
221
222void ChFiDS_SurfData::SetSimul(const Handle(MMgt_TShared)& S)
223{
224 simul = S;
225}
226
227//=======================================================================
228//function : ResetSimul
229//purpose :
230//=======================================================================
231
232void ChFiDS_SurfData::ResetSimul()
233{
234 simul.Nullify();
235}
236
237
238//=======================================================================
239//function : Get2dPoints
240//purpose :
241//=======================================================================
242
243void ChFiDS_SurfData::Get2dPoints(gp_Pnt2d& P2df1,
244 gp_Pnt2d& P2dl1,
245 gp_Pnt2d& P2df2,
246 gp_Pnt2d& P2dl2) const
247{
248 P2df1 = p2df1;
249 P2dl1 = p2dl1;
250 P2df2 = p2df2;
251 P2dl2 = p2dl2;
252}
253
254//=======================================================================
255//function : Get2dPoints
256//purpose :
257//=======================================================================
258
259gp_Pnt2d ChFiDS_SurfData::Get2dPoints(const Standard_Boolean First,
260 const Standard_Integer OnS) const
261
262{
263 if(First && OnS == 1) return p2df1;
264 else if(!First && OnS == 1) return p2dl1;
265 else if(First && OnS == 2) return p2df2;
266 return p2dl2;
267}
268
269//=======================================================================
270//function : Set2dPoints
271//purpose :
272//=======================================================================
273
274void ChFiDS_SurfData::Set2dPoints(const gp_Pnt2d& P2df1,
275 const gp_Pnt2d& P2dl1,
276 const gp_Pnt2d& P2df2,
277 const gp_Pnt2d& P2dl2)
278{
279 p2df1 = P2df1;
280 p2dl1 = P2dl1;
281 p2df2 = P2df2;
282 p2dl2 = P2dl2;
283}
284