Warning, /include/opencascade/BOPDS_ShapeInfo.lxx is written in an unsupported language. File is not indexed.
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 #include <BOPDS_Tools.hxx>
0016
0017 //=================================================================================================
0018
0019 inline BOPDS_ShapeInfo::BOPDS_ShapeInfo()
0020 :
0021
0022 myType(TopAbs_SHAPE),
0023 myReference(-1),
0024 myFlag(-1)
0025 {
0026 }
0027
0028 //=================================================================================================
0029
0030 inline BOPDS_ShapeInfo::BOPDS_ShapeInfo(const occ::handle<NCollection_BaseAllocator>& theAllocator)
0031 : myType(TopAbs_SHAPE),
0032 mySubShapes(theAllocator),
0033 myReference(-1),
0034 myFlag(-1)
0035 {
0036 }
0037
0038 //=================================================================================================
0039
0040 inline BOPDS_ShapeInfo::~BOPDS_ShapeInfo() = default;
0041
0042 //=================================================================================================
0043
0044 inline void BOPDS_ShapeInfo::SetShape(const TopoDS_Shape& theS)
0045 {
0046 myShape = theS;
0047 }
0048
0049 //=================================================================================================
0050
0051 inline const TopoDS_Shape& BOPDS_ShapeInfo::Shape() const
0052 {
0053 return myShape;
0054 }
0055
0056 //=================================================================================================
0057
0058 inline void BOPDS_ShapeInfo::SetShapeType(const TopAbs_ShapeEnum theType)
0059 {
0060 myType = theType;
0061 }
0062
0063 //=================================================================================================
0064
0065 inline TopAbs_ShapeEnum BOPDS_ShapeInfo::ShapeType() const
0066 {
0067 return myType;
0068 }
0069
0070 //=================================================================================================
0071
0072 inline void BOPDS_ShapeInfo::SetBox(const Bnd_Box& theBox)
0073 {
0074 myBox = theBox;
0075 }
0076
0077 //=================================================================================================
0078
0079 inline const Bnd_Box& BOPDS_ShapeInfo::Box() const
0080 {
0081 return myBox;
0082 }
0083
0084 //=================================================================================================
0085
0086 inline Bnd_Box& BOPDS_ShapeInfo::ChangeBox()
0087 {
0088 return myBox;
0089 }
0090
0091 //=================================================================================================
0092
0093 inline const NCollection_List<int>& BOPDS_ShapeInfo::SubShapes() const
0094 {
0095 return mySubShapes;
0096 }
0097
0098 //=================================================================================================
0099
0100 inline NCollection_List<int>& BOPDS_ShapeInfo::ChangeSubShapes()
0101 {
0102 return mySubShapes;
0103 }
0104
0105 //=================================================================================================
0106
0107 inline bool BOPDS_ShapeInfo::HasSubShape(const int theI) const
0108 {
0109 return mySubShapes.Contains(theI);
0110 }
0111
0112 //=================================================================================================
0113
0114 inline bool BOPDS_ShapeInfo::HasReference() const
0115 {
0116 return (myReference >= 0);
0117 }
0118
0119 //=================================================================================================
0120
0121 inline void BOPDS_ShapeInfo::SetReference(const int theI)
0122 {
0123 myReference = theI;
0124 }
0125
0126 //=================================================================================================
0127
0128 inline int BOPDS_ShapeInfo::Reference() const
0129 {
0130 return myReference;
0131 }
0132
0133 //=================================================================================================
0134
0135 inline bool BOPDS_ShapeInfo::HasBRep() const
0136 {
0137 return (BOPDS_Tools::HasBRep(myType));
0138 }
0139
0140 //=================================================================================================
0141
0142 inline bool BOPDS_ShapeInfo::IsInterfering() const
0143 {
0144 return (HasBRep() || myType == TopAbs_SOLID);
0145 }
0146
0147 //=================================================================================================
0148
0149 inline bool BOPDS_ShapeInfo::HasFlag() const
0150 {
0151 return (myFlag >= 0);
0152 }
0153
0154 //=================================================================================================
0155
0156 inline bool BOPDS_ShapeInfo::HasFlag(int& theFlag) const
0157 {
0158 theFlag = myFlag;
0159 return (myFlag >= 0);
0160 }
0161
0162 //=================================================================================================
0163
0164 inline void BOPDS_ShapeInfo::SetFlag(const int theFlag)
0165 {
0166 myFlag = theFlag;
0167 }
0168
0169 //=================================================================================================
0170
0171 inline int BOPDS_ShapeInfo::Flag() const
0172 {
0173 return myFlag;
0174 }