summaryrefslogtreecommitdiff
path: root/src/ChFiDS/ChFiDS_Stripe.cxx
blob: dbdee28dd64dc4cd0a53f1ca4d3bb635c94efcb8 (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
// File:	ChFiDS_Stripe.cxx
// Created:	Wed Mar  9 17:25:21 1994
// Author:	Isabelle GRIGNON
//		<isg@zerox>


#include <ChFiDS_Stripe.ixx>

ChFiDS_Stripe::ChFiDS_Stripe ():
       begfilled(/*Standard_False*/0), // eap, Apr 29 2002, occ293
       endfilled(/*Standard_False*/0),
       orcurv1(TopAbs_FORWARD),
       orcurv2(TopAbs_FORWARD)
{}

void ChFiDS_Stripe::Reset()
{
  myHdata.Nullify();
  orcurv1 = orcurv2 = TopAbs_FORWARD;
  pcrv1.Nullify();
  pcrv1.Nullify();
  mySpine->Reset();
}

//=======================================================================
//function : Parameters
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::Parameters(const Standard_Boolean First, 
				  Standard_Real& Pdeb, 
				  Standard_Real& Pfin) const 
{
  if(First) {Pdeb = pardeb1; Pfin = parfin1;}
  else {Pdeb = pardeb2; Pfin = parfin2;}
}


//=======================================================================
//function : SetParameters
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::SetParameters(const Standard_Boolean First, 
				     const Standard_Real Pdeb, 
				     const Standard_Real Pfin)
{
  if(First) {pardeb1 = Pdeb; parfin1 = Pfin;}
  else {pardeb2 = Pdeb; parfin2 = Pfin;}
}


//=======================================================================
//function : Curve
//purpose  : 
//=======================================================================

Standard_Integer ChFiDS_Stripe::Curve(const Standard_Boolean First) const 
{
  if(First) return indexOfcurve1;
  else return indexOfcurve2;
}


//=======================================================================
//function : SetCurve
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::SetCurve(const Standard_Integer Index, 
				const Standard_Boolean First)
{
  if(First) indexOfcurve1 = Index;
  else indexOfcurve2 = Index;
}


//=======================================================================
//function : Handle_Geom2d_Curve&
//purpose  : 
//=======================================================================

const Handle(Geom2d_Curve)& ChFiDS_Stripe::PCurve
(const Standard_Boolean First) const 
{
  if(First) return pcrv1;
  else return pcrv2;
}


//=======================================================================
//function : ChangePCurve
//purpose  : 
//=======================================================================

Handle(Geom2d_Curve)& ChFiDS_Stripe::ChangePCurve
(const Standard_Boolean First)
{
  if(First) return pcrv1;
  else return pcrv2;
}


//=======================================================================
//function : Orientation
//purpose  : 
//=======================================================================

TopAbs_Orientation ChFiDS_Stripe::Orientation
(const Standard_Integer OnS) const 
{
  if(OnS == 1) return myOr1;
  else return myOr2;
}


//=======================================================================
//function : Orientation
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::SetOrientation(const TopAbs_Orientation Or, 
				      const Standard_Integer OnS) 
{
  if(OnS == 1) myOr1 = Or;
  else myOr2 = Or;
}


//=======================================================================
//function : Orientation
//purpose  : 
//=======================================================================

TopAbs_Orientation ChFiDS_Stripe::Orientation
(const Standard_Boolean First) const 
{
  if(First) return orcurv1;
  else return orcurv2;
}


//=======================================================================
//function : Orientation
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::SetOrientation(const TopAbs_Orientation Or, 
				      const Standard_Boolean First) 
{
  if(First) orcurv1 = Or;
  else orcurv2 = Or;
}


//=======================================================================
//function : IndexPoint
//purpose  : 
//=======================================================================

Standard_Integer ChFiDS_Stripe::IndexPoint
(const Standard_Boolean First, const Standard_Integer OnS) const 
{
  if(First){
    if (OnS == 1) return indexfirstPOnS1;
    else return indexfirstPOnS2;
  }
  else{
    if (OnS == 1) return indexlastPOnS1;
    else return indexlastPOnS2;
  }
}


//=======================================================================
//function : SetIndexPoint
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::SetIndexPoint(const Standard_Integer Index, 
				     const Standard_Boolean First, 
				     const Standard_Integer OnS)
{
  if(First){
    if (OnS == 1) indexfirstPOnS1 = Index;
    else indexfirstPOnS2 = Index;
  }
  else{
    if (OnS == 1) indexlastPOnS1 = Index;
    else indexlastPOnS2 = Index;
  }
}

Standard_Integer ChFiDS_Stripe::SolidIndex()const
{
  return indexOfSolid;
}

void ChFiDS_Stripe::SetSolidIndex(const Standard_Integer Index)
{
  indexOfSolid = Index;
}


//=======================================================================
//function : InDS
//purpose  : 
//=======================================================================

void ChFiDS_Stripe::InDS(const Standard_Boolean First,
			 const Standard_Integer Nb)  // eap, Apr 29 2002, occ293
{
  if(First){
    begfilled = /*Standard_True*/ Nb;
  }
  else{
    endfilled = /*Standard_True*/ Nb;
  }
}


//=======================================================================
//function : IsInDS
//purpose  : 
//=======================================================================

Standard_Integer ChFiDS_Stripe::IsInDS(const Standard_Boolean First)const
{
  if(First) return begfilled;
  else return endfilled;
}