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 #ifndef _BOPDS_Curve_HeaderFile
16 #define _BOPDS_Curve_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <Bnd_Box.hxx>
23 #include <BOPDS_ListOfPaveBlock.hxx>
24 #include <IntTools_Curve.hxx>
25 #include <NCollection_BaseAllocator.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <TColStd_ListOfInteger.hxx>
30 class BOPDS_PaveBlock;
34 //! The class BOPDS_Curve is to store
35 //! the information about intersection curve
46 virtual ~BOPDS_Curve();
50 //! <theAllocator> - the allocator to manage the memory
51 BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator);
55 //! Sets the curve <theC>
56 void SetCurve (const IntTools_Curve& theC);
61 const IntTools_Curve& Curve() const;
65 //! Sets the bounding box <theBox> of the curve
66 void SetBox (const Bnd_Box& theBox);
70 //! Returns the bounding box of the curve
71 const Bnd_Box& Box() const;
75 //! Returns the bounding box of the curve
78 void SetPaveBlocks (const BOPDS_ListOfPaveBlock& theLPB);
82 //! Returns the list of pave blocks
84 const BOPDS_ListOfPaveBlock& PaveBlocks() const;
88 //! Returns the list of pave blocks
90 BOPDS_ListOfPaveBlock& ChangePaveBlocks();
93 //! Creates initial pave block
95 void InitPaveBlock1();
99 //! Returns initial pave block
101 Handle(BOPDS_PaveBlock)& ChangePaveBlock1();
105 //! Returns list of indices of technologic vertices
107 const TColStd_ListOfInteger& TechnoVertices() const;
110 //! Selector/Modifier
111 //! Returns list of indices of technologic vertices
113 TColStd_ListOfInteger& ChangeTechnoVertices();
117 //! Returns true if at least one pave block of the curve
119 Standard_Boolean HasEdge() const;
121 //! Sets the tolerance for the curve.
122 void SetTolerance(const Standard_Real theTol)
124 myTolerance = theTol;
127 //! Returns the tolerance of the curve
128 Standard_Real Tolerance() const
133 //! Returns the tangential tolerance of the curve
134 Standard_Real TangentialTolerance() const
136 return myCurve.TangentialTolerance();
141 Handle(NCollection_BaseAllocator) myAllocator;
142 IntTools_Curve myCurve;
143 BOPDS_ListOfPaveBlock myPaveBlocks;
144 TColStd_ListOfInteger myTechnoVertices;
146 Standard_Real myTolerance;
152 #include <BOPDS_Curve.lxx>
154 #endif // _BOPDS_Curve_HeaderFile