0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / Sweep / Sweep_NumShape.cxx
1 // Created on: 1993-02-03
2 // Created by: Laurent BOURESCHE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <Sweep_NumShape.hxx>
19
20 //=======================================================================
21 //function : Sweep_NumShape
22 //purpose  : 
23 //=======================================================================
24 Sweep_NumShape::Sweep_NumShape():
25        myType(TopAbs_SHAPE),
26        myIndex(0),
27        myClosed(Standard_False),
28        myBegInf(Standard_False),
29        myEndInf(Standard_False)
30
31 {
32 }
33
34
35 //=======================================================================
36 //function : Sweep_NumShape
37 //purpose  : 
38 //=======================================================================
39
40 Sweep_NumShape::Sweep_NumShape(const Standard_Integer Index, 
41                                const TopAbs_ShapeEnum Type,
42                                const Standard_Boolean Closed,
43                                const Standard_Boolean BegInf,
44                                const Standard_Boolean EndInf):
45        myType(Type),
46        myIndex(Index),
47        myClosed(Closed),
48        myBegInf(BegInf),
49        myEndInf(EndInf)
50 {
51 }
52
53
54 //=======================================================================
55 //function : Init
56 //purpose  : 
57 //=======================================================================
58
59 void Sweep_NumShape::Init(const Standard_Integer Index, 
60                           const TopAbs_ShapeEnum Type,
61                           const Standard_Boolean Closed,
62                           const Standard_Boolean BegInf,
63                           const Standard_Boolean EndInf)
64 {
65   myIndex = Index;
66   myType = Type;
67   myClosed = Closed;
68   myBegInf = BegInf;
69   myEndInf = EndInf;
70 }
71
72
73 //=======================================================================
74 //function : Orientation
75 //purpose  : 
76 //=======================================================================
77
78 TopAbs_Orientation Sweep_NumShape::Orientation () const
79 {
80   if (myType==TopAbs_EDGE){
81     return TopAbs_FORWARD;
82   }
83   else{
84     if(myIndex == 2){
85       return TopAbs_FORWARD;
86     }
87     else{
88       return TopAbs_REVERSED;
89     }
90   }
91 }
92