0024624: Lost word in license statement in source files
[occt.git] / src / BOPDS / BOPDS_Curve.lxx
CommitLineData
b311480e 1// Created by: Peter KURNEV
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
b311480e 14
7fd59977 15//=======================================================================
4e57c75e 16//function :
17//purpose :
7fd59977 18//=======================================================================
4e57c75e 19 inline BOPDS_Curve::BOPDS_Curve()
7fd59977 20:
4e57c75e 21 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
22 myPaveBlocks(myAllocator),
23 myTechnoVertices(myAllocator)
24{
25}
7fd59977 26//=======================================================================
4e57c75e 27//function :
28//purpose :
7fd59977 29//=======================================================================
4e57c75e 30 inline BOPDS_Curve::BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator)
31:
32 myAllocator(theAllocator),
33 myPaveBlocks(myAllocator),
34 myTechnoVertices(myAllocator)
7fd59977 35{
7fd59977 36}
37//=======================================================================
4e57c75e 38//function :
39//purpose :
7fd59977 40//=======================================================================
4e57c75e 41 inline BOPDS_Curve::~BOPDS_Curve()
7fd59977 42{
7fd59977 43}
7fd59977 44//=======================================================================
4e57c75e 45//function : SetCurve
46//purpose :
7fd59977 47//=======================================================================
4e57c75e 48 inline void BOPDS_Curve::SetCurve(const IntTools_Curve& theCurve)
7fd59977 49{
4e57c75e 50 myCurve=theCurve;
7fd59977 51}
7fd59977 52//=======================================================================
4e57c75e 53//function : Curve
54//purpose :
7fd59977 55//=======================================================================
4e57c75e 56 inline const IntTools_Curve& BOPDS_Curve::Curve()const
7fd59977 57{
4e57c75e 58 return myCurve;
7fd59977 59}
7fd59977 60//=======================================================================
4e57c75e 61//function : SetPaveBlocks
62//purpose :
7fd59977 63//=======================================================================
4e57c75e 64 inline void BOPDS_Curve::SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB)
7fd59977 65{
4e57c75e 66 BOPDS_ListIteratorOfListOfPaveBlock aIt;
67 //
68 myPaveBlocks.Clear();
69 aIt.Initialize(theLPB);
70 for (; aIt.More(); aIt.Next()) {
71 myPaveBlocks.Append(aIt.Value());
72 }
7fd59977 73}
74//=======================================================================
4e57c75e 75//function : PaveBlocks
76//purpose :
7fd59977 77//=======================================================================
4e57c75e 78 inline const BOPDS_ListOfPaveBlock& BOPDS_Curve::PaveBlocks()const
7fd59977 79{
4e57c75e 80 return myPaveBlocks;
7fd59977 81}
7fd59977 82//=======================================================================
4e57c75e 83//function : ChangePaveBlocks
84//purpose :
7fd59977 85//=======================================================================
4e57c75e 86 inline BOPDS_ListOfPaveBlock& BOPDS_Curve::ChangePaveBlocks()
7fd59977 87{
4e57c75e 88 return myPaveBlocks;
7fd59977 89}
90//=======================================================================
4e57c75e 91//function : InitPaveBlock1
92//purpose :
7fd59977 93//=======================================================================
4e57c75e 94 inline void BOPDS_Curve::InitPaveBlock1()
7fd59977 95{
4e57c75e 96 if (!myPaveBlocks.Extent()) {
97 Handle(BOPDS_PaveBlock) aPB=new BOPDS_PaveBlock;
98 myPaveBlocks.Append(aPB);
99 }
7fd59977 100}
101//=======================================================================
4e57c75e 102//function : ChangePaveBlock1
103//purpose :
7fd59977 104//=======================================================================
4e57c75e 105 inline Handle(BOPDS_PaveBlock)& BOPDS_Curve::ChangePaveBlock1()
7fd59977 106{
4e57c75e 107 Handle_BOPDS_PaveBlock* pPB=(Handle_BOPDS_PaveBlock*)&myPaveBlocks.First();
108 return *pPB;
7fd59977 109}
110//=======================================================================
4e57c75e 111//function : TechnoVertices
112//purpose :
7fd59977 113//=======================================================================
4e57c75e 114 inline const BOPCol_ListOfInteger& BOPDS_Curve::TechnoVertices()const
7fd59977 115{
4e57c75e 116 return myTechnoVertices;
7fd59977 117}
118//=======================================================================
4e57c75e 119//function : ChangeTechnoVertices
120//purpose :
7fd59977 121//=======================================================================
4e57c75e 122 inline BOPCol_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices()
7fd59977 123{
4e57c75e 124 return myTechnoVertices;
7fd59977 125}
7fd59977 126//=======================================================================
4e57c75e 127//function : SetBox
128//purpose :
7fd59977 129//=======================================================================
4e57c75e 130 inline void BOPDS_Curve::SetBox(const Bnd_Box& theBox)
7fd59977 131{
4e57c75e 132 myBox=theBox;
7fd59977 133}
134//=======================================================================
4e57c75e 135//function : Box
136//purpose :
7fd59977 137//=======================================================================
4e57c75e 138 inline const Bnd_Box& BOPDS_Curve::Box()const
7fd59977 139{
4e57c75e 140 return myBox;
141}
142//=======================================================================
143//function : ChangeBox
144//purpose :
145//=======================================================================
146 inline Bnd_Box& BOPDS_Curve::ChangeBox()
147{
148 return myBox;
7fd59977 149}
7fd59977 150//=======================================================================
4e57c75e 151//function : HasEdge
152//purpose :
7fd59977 153//=======================================================================
4e57c75e 154 inline Standard_Boolean BOPDS_Curve::HasEdge()const
7fd59977 155{
4e57c75e 156 Standard_Boolean bFlag;
157 BOPDS_ListIteratorOfListOfPaveBlock aItPB;
158 //
159 bFlag=Standard_False;
160 aItPB.Initialize(myPaveBlocks);
161 for (; aItPB.More(); aItPB.Next()) {
162 const Handle(BOPDS_PaveBlock)& aPB=aItPB.Value();
163 bFlag=aPB->HasEdge();
164 if (bFlag) {
165 break;
166 }
167 }
168 return bFlag;
7fd59977 169}