1 // Created by: Peter KURNEV
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 //=======================================================================
18 //=======================================================================
19 inline BOPDS_Curve::BOPDS_Curve()
21 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
22 myPaveBlocks(myAllocator),
23 myTechnoVertices(myAllocator)
26 //=======================================================================
29 //=======================================================================
30 inline BOPDS_Curve::BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator)
32 myAllocator(theAllocator),
33 myPaveBlocks(myAllocator),
34 myTechnoVertices(myAllocator)
37 //=======================================================================
40 //=======================================================================
41 inline BOPDS_Curve::~BOPDS_Curve()
44 //=======================================================================
47 //=======================================================================
48 inline void BOPDS_Curve::SetCurve(const IntTools_Curve& theCurve)
52 //=======================================================================
55 //=======================================================================
56 inline const IntTools_Curve& BOPDS_Curve::Curve()const
60 //=======================================================================
61 //function : SetPaveBlocks
63 //=======================================================================
64 inline void BOPDS_Curve::SetPaveBlocks(const BOPDS_ListOfPaveBlock& theLPB)
66 BOPDS_ListIteratorOfListOfPaveBlock aIt;
69 aIt.Initialize(theLPB);
70 for (; aIt.More(); aIt.Next()) {
71 myPaveBlocks.Append(aIt.Value());
74 //=======================================================================
75 //function : PaveBlocks
77 //=======================================================================
78 inline const BOPDS_ListOfPaveBlock& BOPDS_Curve::PaveBlocks()const
82 //=======================================================================
83 //function : ChangePaveBlocks
85 //=======================================================================
86 inline BOPDS_ListOfPaveBlock& BOPDS_Curve::ChangePaveBlocks()
90 //=======================================================================
91 //function : InitPaveBlock1
93 //=======================================================================
94 inline void BOPDS_Curve::InitPaveBlock1()
96 if (!myPaveBlocks.Extent()) {
97 Handle(BOPDS_PaveBlock) aPB=new BOPDS_PaveBlock;
98 myPaveBlocks.Append(aPB);
101 //=======================================================================
102 //function : ChangePaveBlock1
104 //=======================================================================
105 inline Handle(BOPDS_PaveBlock)& BOPDS_Curve::ChangePaveBlock1()
107 Handle(BOPDS_PaveBlock)* pPB=(Handle(BOPDS_PaveBlock)*)&myPaveBlocks.First();
110 //=======================================================================
111 //function : TechnoVertices
113 //=======================================================================
114 inline const BOPCol_ListOfInteger& BOPDS_Curve::TechnoVertices()const
116 return myTechnoVertices;
118 //=======================================================================
119 //function : ChangeTechnoVertices
121 //=======================================================================
122 inline BOPCol_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices()
124 return myTechnoVertices;
126 //=======================================================================
129 //=======================================================================
130 inline void BOPDS_Curve::SetBox(const Bnd_Box& theBox)
134 //=======================================================================
137 //=======================================================================
138 inline const Bnd_Box& BOPDS_Curve::Box()const
142 //=======================================================================
143 //function : ChangeBox
145 //=======================================================================
146 inline Bnd_Box& BOPDS_Curve::ChangeBox()
150 //=======================================================================
153 //=======================================================================
154 inline Standard_Boolean BOPDS_Curve::HasEdge()const
156 Standard_Boolean bFlag;
157 BOPDS_ListIteratorOfListOfPaveBlock aItPB;
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();