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