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