0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / Sweep / Sweep_NumShape.cxx
CommitLineData
b311480e 1// Created on: 1993-02-03
2// Created by: Laurent BOURESCHE
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
7fd59977 17
42cf5bc1 18#include <Sweep_NumShape.hxx>
7fd59977 19
20//=======================================================================
21//function : Sweep_NumShape
22//purpose :
23//=======================================================================
7fd59977 24Sweep_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
40Sweep_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
59void 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
78TopAbs_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