summaryrefslogtreecommitdiff
path: root/src/ChFiDS/ChFiDS_SurfData.cxx
blob: 917292a2c556fdad042f5bd687f2b50fafa30b9c (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// File:	ChFiDS_SurfData.cxx
// Created:	Mon Nov 29 11:12:59 1993
// Author:	Isabelle GRIGNON
//		<isg@zerox>


#include <ChFiDS_SurfData.ixx>

ChFiDS_SurfData::ChFiDS_SurfData () : 
indexOfS1(0),indexOfS2(0),indexOfConge(0),
isoncurv1(0),isoncurv2(0),twistons1(0),twistons2(0)
{}

//=======================================================================
//function : Copy
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::Copy(const Handle(ChFiDS_SurfData)& Other)
{
indexOfS1    = Other->indexOfS1;
indexOfS2    = Other->indexOfS2;
indexOfConge = Other->indexOfConge;
orientation  = Other->orientation;
intf1        = Other->intf1;
intf2        = Other->intf2;

pfirstOnS1   = Other->pfirstOnS1;
plastOnS1    = Other->plastOnS1; 
pfirstOnS2   = Other->pfirstOnS2;   
plastOnS2    = Other->plastOnS2;  

ufspine      = Other->ufspine;
ulspine      = Other->ulspine;

simul        = Other->simul; 
p2df1        = Other->p2df1;
p2dl1        = Other->p2dl1;
p2df2        = Other->p2df2; 
p2dl2        = Other->p2dl2;

myfirstextend = Other->myfirstextend;
mylastextend  = Other->mylastextend;

twistons1 = Other->twistons1;
twistons2 = Other->twistons2;
}

//=======================================================================
//function : Index
//purpose  : 
//=======================================================================

Standard_Integer ChFiDS_SurfData::Index(const Standard_Integer OfS) const
{
  if(OfS == 1) return indexOfS1;
  else return indexOfS2;
}

//=======================================================================
//function : Interference
//purpose  : 
//=======================================================================

const ChFiDS_FaceInterference& ChFiDS_SurfData::Interference
(const Standard_Integer OnS) const
{
  if(OnS == 1) return intf1;
  else return intf2;
}


//=======================================================================
//function : Interference
//purpose  : 
//=======================================================================

ChFiDS_FaceInterference& ChFiDS_SurfData::ChangeInterference
(const Standard_Integer OnS)
{
  if(OnS == 1) return intf1;
  else return intf2;
}


//=======================================================================
//function : Vertex
//purpose  : 
//=======================================================================

const ChFiDS_CommonPoint&  ChFiDS_SurfData::Vertex
(const Standard_Boolean First,const Standard_Integer OnS) const
{
  if(First && OnS == 1) return pfirstOnS1;
  else if(First && OnS == 2) return pfirstOnS2;
  else if(!First && OnS == 1) return plastOnS1;
  else return plastOnS2;
}


//=======================================================================
//function : ChangeVertex
//purpose  : 
//=======================================================================

ChFiDS_CommonPoint&  ChFiDS_SurfData::ChangeVertex
(const Standard_Boolean First,const Standard_Integer OnS)
{
  if(First && OnS == 1) return pfirstOnS1;
  else if(First && OnS == 2) return pfirstOnS2;
  else if(!First && OnS == 1) return plastOnS1;
  else return plastOnS2;
}


//=======================================================================
//function : FirstSpineParam
//purpose  : 
//=======================================================================

Standard_Real ChFiDS_SurfData::FirstSpineParam()const
{
  return ufspine;
}

//=======================================================================
//function : LastSpineParam
//purpose  : 
//=======================================================================

Standard_Real ChFiDS_SurfData::LastSpineParam()const
{
  return ulspine;
}

//=======================================================================
//function : FirstSpineParam
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::FirstSpineParam(const Standard_Real Par)
{
  ufspine = Par;
}

//=======================================================================
//function : LastSpineParam
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::LastSpineParam(const Standard_Real Par)
{
  ulspine = Par;
}

//=======================================================================
//function : FirstExtensionValue
//purpose  : 
//=======================================================================

Standard_Real ChFiDS_SurfData::FirstExtensionValue()const
{
  return myfirstextend;
}

//=======================================================================
//function : LastExtensionValue
//purpose  : 
//=======================================================================

Standard_Real ChFiDS_SurfData::LastExtensionValue()const
{
  return mylastextend;
}

//=======================================================================
//function : FirstExtensionValue
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::FirstExtensionValue(const Standard_Real Extend)
{
  myfirstextend=Extend;
}

//=======================================================================
//function : LastExtensionValue
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::LastExtensionValue(const Standard_Real Extend)
{
  mylastextend=Extend;
}

//=======================================================================
//function : Simul
//purpose  : 
//=======================================================================

Handle(MMgt_TShared) ChFiDS_SurfData::Simul() const 
{
  return simul;
}


//=======================================================================
//function : SetSimul
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::SetSimul(const Handle(MMgt_TShared)& S)
{
  simul = S;
}

//=======================================================================
//function : ResetSimul
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::ResetSimul()
{
  simul.Nullify();
}


//=======================================================================
//function : Get2dPoints
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::Get2dPoints(gp_Pnt2d& P2df1,
				  gp_Pnt2d& P2dl1,
				  gp_Pnt2d& P2df2,
				  gp_Pnt2d& P2dl2) const 
{
  P2df1 = p2df1;
  P2dl1 = p2dl1;
  P2df2 = p2df2;
  P2dl2 = p2dl2;
}

//=======================================================================
//function : Get2dPoints
//purpose  : 
//=======================================================================

gp_Pnt2d ChFiDS_SurfData::Get2dPoints(const Standard_Boolean First,
				      const Standard_Integer OnS) const 

{
  if(First && OnS == 1) return p2df1;
  else if(!First && OnS == 1) return p2dl1;
  else if(First && OnS == 2) return p2df2;
  return p2dl2;
}

//=======================================================================
//function : Set2dPoints
//purpose  : 
//=======================================================================

void ChFiDS_SurfData::Set2dPoints(const gp_Pnt2d& P2df1,
				  const gp_Pnt2d& P2dl1,
				  const gp_Pnt2d& P2df2,
				  const gp_Pnt2d& P2dl2)
{
  p2df1 = P2df1;
  p2dl1 = P2dl1;
  p2df2 = P2df2;
  p2dl2 = P2dl2;
}