Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BOPDS_ShapeInfo.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BOPDS_ShapeInfo_HeaderFile
0016 #define _BOPDS_ShapeInfo_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <Bnd_Box.hxx>
0023 #include <NCollection_BaseAllocator.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <TColStd_ListOfInteger.hxx>
0027 #include <TopoDS_Shape.hxx>
0028 
0029 //! The class BOPDS_ShapeInfo is to store
0030 //! handy information about shape
0031 class BOPDS_ShapeInfo
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! Empty constructor
0037   BOPDS_ShapeInfo();
0038 
0039   virtual ~BOPDS_ShapeInfo();
0040 
0041   //! Constructor
0042   //! @param theAllocator the allocator to manage the memory
0043   BOPDS_ShapeInfo(const Handle(NCollection_BaseAllocator)& theAllocator);
0044 
0045   //! Modifier
0046   //! Sets the shape <theS>
0047   void SetShape(const TopoDS_Shape& theS);
0048 
0049   //! Selector
0050   //! Returns the shape
0051   const TopoDS_Shape& Shape() const;
0052 
0053   //! Modifier
0054   //! Sets the type of shape theType
0055   void SetShapeType(const TopAbs_ShapeEnum theType);
0056 
0057   //! Selector
0058   //! Returns the type of shape
0059   TopAbs_ShapeEnum ShapeType() const;
0060 
0061   //! Modifier
0062   //! Sets the boundung box of the shape theBox
0063   void SetBox(const Bnd_Box& theBox);
0064 
0065   //! Selector
0066   //! Returns the boundung box of the shape
0067   const Bnd_Box& Box() const;
0068 
0069   //! Selector/Modifier
0070   //! Returns the boundung box of the shape
0071   Bnd_Box& ChangeBox();
0072 
0073   //! Selector
0074   //! Returns the list of indices of sub-shapes
0075   const TColStd_ListOfInteger& SubShapes() const;
0076 
0077   //! Selector/ Modifier
0078   //! Returns the list of indices of sub-shapes
0079   TColStd_ListOfInteger& ChangeSubShapes();
0080 
0081   //! Query
0082   //! Returns true if the shape has sub-shape with
0083   //! index theI
0084   Standard_Boolean HasSubShape(const Standard_Integer theI) const;
0085 
0086   Standard_Boolean HasReference() const;
0087 
0088   //! Modifier
0089   //! Sets the index of a reference information
0090   void SetReference(const Standard_Integer theI);
0091 
0092   //! Selector
0093   //! Returns the index of a reference information
0094   Standard_Integer Reference() const;
0095 
0096   //! Query
0097   //! Returns true if the shape has boundary representation
0098   Standard_Boolean HasBRep() const;
0099 
0100   //! Returns true if the shape can be participant of
0101   //! an interference
0102   //!
0103   //! Flag
0104   Standard_Boolean IsInterfering() const;
0105 
0106   //! Query
0107   //! Returns true if there is flag.
0108   Standard_Boolean HasFlag() const;
0109 
0110   //! Query
0111   //! Returns true if there is flag.
0112   //! Returns the flag theFlag
0113   Standard_Boolean HasFlag(Standard_Integer& theFlag) const;
0114 
0115   //! Modifier
0116   //! Sets the flag
0117   void SetFlag(const Standard_Integer theI);
0118 
0119   //! Returns the flag
0120   Standard_Integer Flag() const;
0121 
0122   Standard_EXPORT void Dump() const;
0123 
0124 protected:
0125   TopoDS_Shape          myShape;
0126   TopAbs_ShapeEnum      myType;
0127   Bnd_Box               myBox;
0128   TColStd_ListOfInteger mySubShapes;
0129   Standard_Integer      myReference;
0130   Standard_Integer      myFlag;
0131 
0132 private:
0133 };
0134 
0135 #include <BOPDS_ShapeInfo.lxx>
0136 
0137 #endif // _BOPDS_ShapeInfo_HeaderFile