35248b804c5b2a3ebc11b77efdaf3954b00cd0da
[occt.git] / src / Geom2dHatch / Geom2dHatch_Element.cxx
1 // Created on: 1993-11-03
2 // Created by: Jean Marc LACHAUME
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 #include <Geom2dHatch_Element.hxx>
18
19 #include <Geom2dAdaptor_Curve.hxx>
20   
21 //=======================================================================
22 // Function : Geom2dHatch_Element
23 // Purpose  : Empty Constructor.
24 //=======================================================================
25
26 Geom2dHatch_Element::Geom2dHatch_Element () { 
27 }
28   
29 //=======================================================================
30 // Function : Geom2dHatch_Element
31 // Purpose  : Constructor.
32 //=======================================================================
33
34 Geom2dHatch_Element::Geom2dHatch_Element (const Geom2dAdaptor_Curve& Curve,
35                                           const TopAbs_Orientation Orientation) :
36        myCurve       (Curve),
37        myOrientation (Orientation)
38 {
39 }
40   
41 //=======================================================================
42 // Function : Curve
43 // Purpose  : Returns the curve associated to the hatching.
44 //=======================================================================
45
46 const Geom2dAdaptor_Curve& Geom2dHatch_Element::Curve () const
47 {
48   return myCurve ;
49 }
50
51 //=======================================================================
52 // Function : ChangeCurve
53 // Purpose  : Returns the curve associated to the hatching.
54 //=======================================================================
55
56 Geom2dAdaptor_Curve& Geom2dHatch_Element::ChangeCurve ()
57 {
58   return myCurve ;
59 }
60
61 //=======================================================================
62 // Function : Orientation
63 // Purpose  : Sets the orientation of the element.
64 //=======================================================================
65
66 void Geom2dHatch_Element::Orientation (const TopAbs_Orientation Orientation)
67 {
68   myOrientation = Orientation ;
69 }
70
71 //=======================================================================
72 // Function : Orientation
73 // Purpose  : Returns the orientation of the element.
74 //=======================================================================
75
76 TopAbs_Orientation Geom2dHatch_Element::Orientation () const
77 {
78   return myOrientation ;
79 }
80
81
82