42cf5bc1 |
1 | // Created by: Peter KURNEV |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
3 | // |
4 | // This file is part of Open CASCADE Technology software library. |
5 | // |
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. |
11 | // |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
14 | |
15 | #ifndef _BOPDS_Curve_HeaderFile |
16 | #define _BOPDS_Curve_HeaderFile |
17 | |
18 | #include <Standard.hxx> |
19 | #include <Standard_DefineAlloc.hxx> |
20 | #include <Standard_Handle.hxx> |
21 | |
22 | #include <BOPCol_BaseAllocator.hxx> |
23 | #include <IntTools_Curve.hxx> |
24 | #include <BOPDS_ListOfPaveBlock.hxx> |
25 | #include <BOPCol_ListOfInteger.hxx> |
26 | #include <Bnd_Box.hxx> |
27 | #include <Standard_Boolean.hxx> |
28 | class IntTools_Curve; |
29 | class Bnd_Box; |
30 | class BOPDS_PaveBlock; |
31 | |
32 | |
33 | |
34 | //! The class BOPDS_Curve is to store |
35 | //! the information about intersection curve |
36 | class BOPDS_Curve |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | |
44 | //! Empty contructor |
45 | BOPDS_Curve(); |
46 | virtual ~BOPDS_Curve(); |
47 | |
48 | |
49 | //! Contructor |
50 | //! <theAllocator> - the allocator to manage the memory |
51 | BOPDS_Curve(const BOPCol_BaseAllocator& theAllocator); |
52 | |
53 | |
54 | //! Modifier |
55 | //! Sets the curve <theC> |
56 | void SetCurve (const IntTools_Curve& theC); |
57 | |
58 | |
59 | //! Selector |
60 | //! Returns the curve |
61 | const IntTools_Curve& Curve() const; |
62 | |
63 | |
64 | //! Modifier |
65 | //! Sets the bounding box <theBox> of the curve |
66 | void SetBox (const Bnd_Box& theBox); |
67 | |
68 | |
69 | //! Selector |
70 | //! Returns the bounding box of the curve |
71 | const Bnd_Box& Box() const; |
72 | |
73 | |
74 | //! Selector/Modifier |
75 | //! Returns the bounding box of the curve |
76 | Bnd_Box& ChangeBox(); |
77 | |
78 | Standard_EXPORT void SetPaveBlocks (const BOPDS_ListOfPaveBlock& theLPB); |
79 | |
80 | |
81 | //! Selector |
82 | //! Returns the list of pave blocks |
83 | //! of the curve |
84 | const BOPDS_ListOfPaveBlock& PaveBlocks() const; |
85 | |
86 | |
87 | //! Selector/Modifier |
88 | //! Returns the list of pave blocks |
89 | //! of the curve |
90 | BOPDS_ListOfPaveBlock& ChangePaveBlocks(); |
91 | |
92 | |
93 | //! Creates initial pave block |
94 | //! of the curve |
95 | void InitPaveBlock1(); |
96 | |
97 | |
98 | //! Selector/Modifier |
99 | //! Returns initial pave block |
100 | //! of the curve |
101 | Handle(BOPDS_PaveBlock)& ChangePaveBlock1(); |
102 | |
103 | |
104 | //! Selector |
105 | //! Returns list of indices of technologic vertices |
106 | //! of the curve |
107 | const BOPCol_ListOfInteger& TechnoVertices() const; |
108 | |
109 | |
110 | //! Selector/Modifier |
111 | //! Returns list of indices of technologic vertices |
112 | //! of the curve |
113 | BOPCol_ListOfInteger& ChangeTechnoVertices(); |
114 | |
115 | |
116 | //! Query |
117 | //! Returns true if at least one pave block of the curve |
118 | //! has edge |
119 | Standard_Boolean HasEdge() const; |
120 | |
121 | |
122 | |
123 | |
124 | protected: |
125 | |
126 | |
127 | |
128 | BOPCol_BaseAllocator myAllocator; |
129 | IntTools_Curve myCurve; |
130 | BOPDS_ListOfPaveBlock myPaveBlocks; |
131 | BOPCol_ListOfInteger myTechnoVertices; |
132 | Bnd_Box myBox; |
133 | |
134 | |
135 | private: |
136 | |
137 | |
138 | |
139 | |
140 | |
141 | }; |
142 | |
143 | |
144 | #include <BOPDS_Curve.lxx> |
145 | |
146 | |
147 | |
148 | |
149 | |
150 | #endif // _BOPDS_Curve_HeaderFile |