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 #include <BOPDS_Tools.hxx>
17 //=======================================================================
20 //=======================================================================
21 inline BOPDS_ShapeInfo::BOPDS_ShapeInfo()
29 //=======================================================================
32 //=======================================================================
33 inline BOPDS_ShapeInfo::BOPDS_ShapeInfo
34 (const Handle(NCollection_BaseAllocator)& theAllocator)
37 mySubShapes(theAllocator),
42 //=======================================================================
45 //=======================================================================
46 inline BOPDS_ShapeInfo::~BOPDS_ShapeInfo()
49 //=======================================================================
52 //=======================================================================
53 inline void BOPDS_ShapeInfo::SetShape(const TopoDS_Shape& theS)
57 //=======================================================================
60 //=======================================================================
61 inline const TopoDS_Shape& BOPDS_ShapeInfo::Shape()const
65 //=======================================================================
66 //function : SetShapeType
68 //=======================================================================
69 inline void BOPDS_ShapeInfo::SetShapeType(const TopAbs_ShapeEnum theType)
73 //=======================================================================
74 //function : ShapeType
76 //=======================================================================
77 inline TopAbs_ShapeEnum BOPDS_ShapeInfo::ShapeType()const
81 //=======================================================================
84 //=======================================================================
85 inline void BOPDS_ShapeInfo::SetBox(const Bnd_Box& theBox)
89 //=======================================================================
92 //=======================================================================
93 inline const Bnd_Box& BOPDS_ShapeInfo::Box()const
97 //=======================================================================
98 //function : ChangeBox
100 //=======================================================================
101 inline Bnd_Box& BOPDS_ShapeInfo::ChangeBox()
106 //=======================================================================
107 //function : SubShapes
109 //=======================================================================
110 inline const BOPCol_ListOfInteger& BOPDS_ShapeInfo::SubShapes()const
114 //=======================================================================
115 //function : ChangeSubShapes
117 //=======================================================================
118 inline BOPCol_ListOfInteger& BOPDS_ShapeInfo::ChangeSubShapes()
122 //=======================================================================
123 //function : HasSubShape
125 //=======================================================================
126 inline Standard_Boolean BOPDS_ShapeInfo::HasSubShape
127 (const Standard_Integer theI)const
129 Standard_Boolean bRet;
130 BOPCol_ListIteratorOfListOfInteger aIt;
133 aIt.Initialize(mySubShapes);
134 for (; aIt.More(); aIt.Next()) {
135 bRet=(theI==aIt.Value());
142 //=======================================================================
143 //function : HasReference
145 //=======================================================================
146 inline Standard_Boolean BOPDS_ShapeInfo::HasReference()const
148 return (myReference>=0);
150 //=======================================================================
151 //function : SetReference
153 //=======================================================================
154 inline void BOPDS_ShapeInfo::SetReference(const Standard_Integer theI)
158 //=======================================================================
159 //function : Reference
161 //=======================================================================
162 inline Standard_Integer BOPDS_ShapeInfo::Reference()const
166 //=======================================================================
169 //=======================================================================
170 inline Standard_Boolean BOPDS_ShapeInfo::HasBRep()const
172 return (BOPDS_Tools::HasBRep(myType));
174 //=======================================================================
175 //function : IsInterfering
177 //=======================================================================
178 inline Standard_Boolean BOPDS_ShapeInfo::IsInterfering()const
180 return (HasBRep() || myType==TopAbs_SOLID);
182 //=======================================================================
185 //=======================================================================
186 inline Standard_Boolean BOPDS_ShapeInfo::HasFlag()const
190 //=======================================================================
193 //=======================================================================
194 inline Standard_Boolean BOPDS_ShapeInfo::HasFlag
195 (Standard_Integer& theFlag)const
200 //=======================================================================
203 //=======================================================================
204 inline void BOPDS_ShapeInfo::SetFlag(const Standard_Integer theFlag)
208 //=======================================================================
211 //=======================================================================
212 inline Standard_Integer BOPDS_ShapeInfo::Flag()const