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_ShapeInfo_HeaderFile
16 #define _BOPDS_ShapeInfo_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <TopoDS_Shape.hxx>
23 #include <TopAbs_ShapeEnum.hxx>
24 #include <Bnd_Box.hxx>
25 #include <BOPCol_ListOfInteger.hxx>
26 #include <Standard_Integer.hxx>
27 #include <BOPCol_BaseAllocator.hxx>
28 #include <Standard_Boolean.hxx>
34 //! The class BOPDS_ShapeInfo is to store
35 //! handy information about shape
46 virtual ~BOPDS_ShapeInfo();
50 //! theAllocator - the allocator to manage the memory
51 BOPDS_ShapeInfo(const BOPCol_BaseAllocator& theAllocator);
55 //! Sets the shape <theS>
56 void SetShape (const TopoDS_Shape& theS);
61 const TopoDS_Shape& Shape() const;
65 //! Sets the type of shape theType
66 void SetShapeType (const TopAbs_ShapeEnum theType);
70 //! Returns the type of shape
71 TopAbs_ShapeEnum ShapeType() const;
75 //! Sets the boundung box of the shape theBox
76 void SetBox (const Bnd_Box& theBox);
80 //! Returns the boundung box of the shape
81 const Bnd_Box& Box() const;
85 //! Returns the boundung box of the shape
90 //! Returns the list of indices of sub-shapes
91 const BOPCol_ListOfInteger& SubShapes() const;
94 //! Selector/ Modifier
95 //! Returns the list of indices of sub-shapes
96 BOPCol_ListOfInteger& ChangeSubShapes();
100 //! Returns true if the shape has sub-shape with
102 Standard_Boolean HasSubShape (const Standard_Integer theI) const;
104 Standard_Boolean HasReference() const;
108 //! Sets the index of a reference information
109 void SetReference (const Standard_Integer theI);
113 //! Returns the index of a reference information
114 Standard_Integer Reference() const;
118 //! Returns true if the shape has boundary representation
119 Standard_Boolean HasBRep() const;
122 //! Returns true if the shape can be participant of
126 Standard_Boolean IsInterfering() const;
130 //! Returns true if there is flag.
131 Standard_Boolean HasFlag() const;
135 //! Returns true if there is flag.
136 //! Returns the the flag theFlag
137 Standard_Boolean HasFlag (Standard_Integer& theFlag) const;
142 void SetFlag (const Standard_Integer theI);
146 Standard_Integer Flag() const;
148 Standard_EXPORT void Dump() const;
157 TopoDS_Shape myShape;
158 TopAbs_ShapeEnum myType;
160 BOPCol_ListOfInteger mySubShapes;
161 Standard_Integer myReference;
162 Standard_Integer myFlag;
174 #include <BOPDS_ShapeInfo.lxx>
180 #endif // _BOPDS_ShapeInfo_HeaderFile