0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / StepShape / StepShape_OrientedEdge.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14#include <StepShape_OrientedEdge.ixx>
15
16
17StepShape_OrientedEdge::StepShape_OrientedEdge () {}
18
19
20void StepShape_OrientedEdge::Init(
21 const Handle(TCollection_HAsciiString)& aName,
22 const Handle(StepShape_Edge)& aEdgeElement,
23 const Standard_Boolean aOrientation)
24{
25 // --- classe own fields ---
26 edgeElement = aEdgeElement;
27 orientation = aOrientation;
28 // --- classe inherited fields ---
29 Handle(StepShape_Vertex) aEdgeStart;
30 aEdgeStart.Nullify();
31 Handle(StepShape_Vertex) aEdgeEnd;
32 aEdgeEnd.Nullify();
33 StepShape_Edge::Init(aName, aEdgeStart, aEdgeEnd);
34}
35
36
37void StepShape_OrientedEdge::SetEdgeElement(const Handle(StepShape_Edge)& aEdgeElement)
38{
39 edgeElement = aEdgeElement;
40}
41
42Handle(StepShape_Edge) StepShape_OrientedEdge::EdgeElement() const
43{
44 return edgeElement;
45}
46
47void StepShape_OrientedEdge::SetOrientation(const Standard_Boolean aOrientation)
48{
49 orientation = aOrientation;
50}
51
52Standard_Boolean StepShape_OrientedEdge::Orientation() const
53{
54 return orientation;
55}
56
57void StepShape_OrientedEdge::SetEdgeStart(const Handle(StepShape_Vertex)& /*aEdgeStart*/)
58{
59 // WARNING : the field is redefined.
60 // field set up forbidden.
61 cout << "Field is redefined, SetUp Forbidden" << endl;
62}
63
64Handle(StepShape_Vertex) StepShape_OrientedEdge::EdgeStart() const
65{
66 // WARNING : the field is redefined.
67 // method body is not yet automaticly wrote
68 if (Orientation()) {
69 return edgeElement->EdgeStart();
70 }
71 else {
72 return edgeElement->EdgeEnd();
73 }
74}
75
76void StepShape_OrientedEdge::SetEdgeEnd(const Handle(StepShape_Vertex)& /*aEdgeEnd*/)
77{
78 // WARNING : the field is redefined.
79 // field set up forbidden.
80 cout << "Field is redefined, SetUp Forbidden" << endl;
81}
82
83Handle(StepShape_Vertex) StepShape_OrientedEdge::EdgeEnd() const
84{
85 // WARNING : the field is redefined.
86 // method body is not yet automaticly wrote
87
88 if (Orientation()) {
89 return edgeElement->EdgeEnd();
90 }
91 else {
92 return edgeElement->EdgeStart();
93 }
94}