1 // Created on: 1994-03-09
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
23 #include <ChFiDS_Stripe.ixx>
25 ChFiDS_Stripe::ChFiDS_Stripe ():
26 begfilled(/*Standard_False*/0), // eap, Apr 29 2002, occ293
27 endfilled(/*Standard_False*/0),
28 orcurv1(TopAbs_FORWARD),
29 orcurv2(TopAbs_FORWARD)
32 void ChFiDS_Stripe::Reset()
35 orcurv1 = orcurv2 = TopAbs_FORWARD;
41 //=======================================================================
42 //function : Parameters
44 //=======================================================================
46 void ChFiDS_Stripe::Parameters(const Standard_Boolean First,
48 Standard_Real& Pfin) const
50 if(First) {Pdeb = pardeb1; Pfin = parfin1;}
51 else {Pdeb = pardeb2; Pfin = parfin2;}
55 //=======================================================================
56 //function : SetParameters
58 //=======================================================================
60 void ChFiDS_Stripe::SetParameters(const Standard_Boolean First,
61 const Standard_Real Pdeb,
62 const Standard_Real Pfin)
64 if(First) {pardeb1 = Pdeb; parfin1 = Pfin;}
65 else {pardeb2 = Pdeb; parfin2 = Pfin;}
69 //=======================================================================
72 //=======================================================================
74 Standard_Integer ChFiDS_Stripe::Curve(const Standard_Boolean First) const
76 if(First) return indexOfcurve1;
77 else return indexOfcurve2;
81 //=======================================================================
84 //=======================================================================
86 void ChFiDS_Stripe::SetCurve(const Standard_Integer Index,
87 const Standard_Boolean First)
89 if(First) indexOfcurve1 = Index;
90 else indexOfcurve2 = Index;
94 //=======================================================================
95 //function : Handle_Geom2d_Curve&
97 //=======================================================================
99 const Handle(Geom2d_Curve)& ChFiDS_Stripe::PCurve
100 (const Standard_Boolean First) const
102 if(First) return pcrv1;
107 //=======================================================================
108 //function : ChangePCurve
110 //=======================================================================
112 Handle(Geom2d_Curve)& ChFiDS_Stripe::ChangePCurve
113 (const Standard_Boolean First)
115 if(First) return pcrv1;
120 //=======================================================================
121 //function : Orientation
123 //=======================================================================
125 TopAbs_Orientation ChFiDS_Stripe::Orientation
126 (const Standard_Integer OnS) const
128 if(OnS == 1) return myOr1;
133 //=======================================================================
134 //function : Orientation
136 //=======================================================================
138 void ChFiDS_Stripe::SetOrientation(const TopAbs_Orientation Or,
139 const Standard_Integer OnS)
141 if(OnS == 1) myOr1 = Or;
146 //=======================================================================
147 //function : Orientation
149 //=======================================================================
151 TopAbs_Orientation ChFiDS_Stripe::Orientation
152 (const Standard_Boolean First) const
154 if(First) return orcurv1;
159 //=======================================================================
160 //function : Orientation
162 //=======================================================================
164 void ChFiDS_Stripe::SetOrientation(const TopAbs_Orientation Or,
165 const Standard_Boolean First)
167 if(First) orcurv1 = Or;
172 //=======================================================================
173 //function : IndexPoint
175 //=======================================================================
177 Standard_Integer ChFiDS_Stripe::IndexPoint
178 (const Standard_Boolean First, const Standard_Integer OnS) const
181 if (OnS == 1) return indexfirstPOnS1;
182 else return indexfirstPOnS2;
185 if (OnS == 1) return indexlastPOnS1;
186 else return indexlastPOnS2;
191 //=======================================================================
192 //function : SetIndexPoint
194 //=======================================================================
196 void ChFiDS_Stripe::SetIndexPoint(const Standard_Integer Index,
197 const Standard_Boolean First,
198 const Standard_Integer OnS)
201 if (OnS == 1) indexfirstPOnS1 = Index;
202 else indexfirstPOnS2 = Index;
205 if (OnS == 1) indexlastPOnS1 = Index;
206 else indexlastPOnS2 = Index;
210 Standard_Integer ChFiDS_Stripe::SolidIndex()const
215 void ChFiDS_Stripe::SetSolidIndex(const Standard_Integer Index)
217 indexOfSolid = Index;
221 //=======================================================================
224 //=======================================================================
226 void ChFiDS_Stripe::InDS(const Standard_Boolean First,
227 const Standard_Integer Nb) // eap, Apr 29 2002, occ293
230 begfilled = /*Standard_True*/ Nb;
233 endfilled = /*Standard_True*/ Nb;
238 //=======================================================================
241 //=======================================================================
243 Standard_Integer ChFiDS_Stripe::IsInDS(const Standard_Boolean First)const
245 if(First) return begfilled;
246 else return endfilled;