0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / TopOpeBRepBuild / TopOpeBRepBuild_EdgeBuilder.cxx
CommitLineData
b311480e 1// Created on: 1995-12-21
2// Created by: Jean Yves LEBEY
3// Copyright (c) 1995-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
42cf5bc1 17
18#include <TopoDS_Shape.hxx>
19#include <TopOpeBRepBuild_EdgeBuilder.hxx>
20#include <TopOpeBRepBuild_LoopClassifier.hxx>
21#include <TopOpeBRepBuild_LoopSet.hxx>
7fd59977 22#include <TopOpeBRepBuild_Pave.hxx>
42cf5bc1 23#include <TopOpeBRepBuild_PaveClassifier.hxx>
24#include <TopOpeBRepBuild_PaveSet.hxx>
7fd59977 25
26//=======================================================================
27//function : TopOpeBRepBuild_EdgeBuilder
28//purpose :
29//=======================================================================
7fd59977 30TopOpeBRepBuild_EdgeBuilder::TopOpeBRepBuild_EdgeBuilder()
31{
32}
33
34//=======================================================================
35//function : TopOpeBRepBuild_EdgeBuilder
36//purpose :
37//=======================================================================
38
39TopOpeBRepBuild_EdgeBuilder::TopOpeBRepBuild_EdgeBuilder
40(TopOpeBRepBuild_PaveSet& LS, TopOpeBRepBuild_PaveClassifier& LC,
41 const Standard_Boolean ForceClass)
42{
43 InitEdgeBuilder(LS,LC,ForceClass);
44}
45
46//=======================================================================
47//function : InitEdgeBuilder
48//purpose :
49//=======================================================================
50
51void TopOpeBRepBuild_EdgeBuilder::InitEdgeBuilder
52(TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC,
53 const Standard_Boolean ForceClass)
54{
55 InitAreaBuilder(LS,LC,ForceClass);
56}
57
58//=======================================================================
59//function : InitEdge
60//purpose :
61//=======================================================================
62
63void TopOpeBRepBuild_EdgeBuilder::InitEdge()
64{
65 InitArea();
66}
67
68//=======================================================================
69//function : MoreEdge
70//purpose :
71//=======================================================================
72
73Standard_Boolean TopOpeBRepBuild_EdgeBuilder::MoreEdge() const
74{
75 Standard_Boolean b = MoreArea();
76 return b;
77}
78
79//=======================================================================
80//function : NextEdge
81//purpose :
82//=======================================================================
83
84void TopOpeBRepBuild_EdgeBuilder::NextEdge()
85{
86 NextArea();
87}
88
89//=======================================================================
90//function : InitVertex
91//purpose :
92//=======================================================================
93
94void TopOpeBRepBuild_EdgeBuilder::InitVertex()
95{
96 InitLoop();
97}
98
99//=======================================================================
100//function : MoreVertex
101//purpose :
102//=======================================================================
103
104Standard_Boolean TopOpeBRepBuild_EdgeBuilder::MoreVertex() const
105{
106 Standard_Boolean b = MoreLoop();
107 return b;
108}
109
110//=======================================================================
111//function : NextVertex
112//purpose :
113//=======================================================================
114
115void TopOpeBRepBuild_EdgeBuilder::NextVertex()
116{
117 NextLoop();
118}
119
120//=======================================================================
121//function : Vertex
122//purpose :
123//=======================================================================
124
125const TopoDS_Shape& TopOpeBRepBuild_EdgeBuilder::Vertex() const
126{
127 const Handle(TopOpeBRepBuild_Loop)& L = Loop();
c5f3a425 128 Handle(TopOpeBRepBuild_Pave) PV (Handle(TopOpeBRepBuild_Pave)::DownCast (L));
7fd59977 129 const TopoDS_Shape& V = PV->Vertex();
130 return V;
131}
132
133//=======================================================================
134//function : Parameter
135//purpose :
136//=======================================================================
137
138Standard_Real TopOpeBRepBuild_EdgeBuilder::Parameter() const
139{
140 const Handle(TopOpeBRepBuild_Loop)& L = Loop();
c5f3a425 141 Handle(TopOpeBRepBuild_Pave) PV (Handle(TopOpeBRepBuild_Pave)::DownCast (L));
7fd59977 142 Standard_Real parV = PV->Parameter();
143 return parV;
144}