File indexing completed on 2026-09-17 09:22:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _TopOpeBRepBuild_ShapeSet_HeaderFile
0018 #define _TopOpeBRepBuild_ShapeSet_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022
0023 #include <TopAbs_ShapeEnum.hxx>
0024 #include <TopOpeBRepTool_ShapeExplorer.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_List.hxx>
0027 #include <TopTools_ShapeMapHasher.hxx>
0028 #include <NCollection_IndexedDataMap.hxx>
0029 #include <Standard_Integer.hxx>
0030 #include <TCollection_AsciiString.hxx>
0031 #include <NCollection_IndexedMap.hxx>
0032 #include <Standard_OStream.hxx>
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 class TopOpeBRepBuild_ShapeSet
0056 {
0057 public:
0058 DEFINE_STANDARD_ALLOC
0059
0060
0061
0062
0063 Standard_EXPORT TopOpeBRepBuild_ShapeSet(const TopAbs_ShapeEnum SubShapeType,
0064 const bool checkshape = true);
0065
0066 Standard_EXPORT virtual ~TopOpeBRepBuild_ShapeSet();
0067
0068
0069 Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S);
0070
0071
0072
0073
0074 Standard_EXPORT virtual void AddStartElement(const TopoDS_Shape& S);
0075
0076
0077
0078
0079 Standard_EXPORT virtual void AddElement(const TopoDS_Shape& S);
0080
0081
0082 Standard_EXPORT const NCollection_List<TopoDS_Shape>& StartElements() const;
0083
0084 Standard_EXPORT void InitShapes();
0085
0086 Standard_EXPORT bool MoreShapes() const;
0087
0088 Standard_EXPORT void NextShape();
0089
0090 Standard_EXPORT const TopoDS_Shape& Shape() const;
0091
0092 Standard_EXPORT void InitStartElements();
0093
0094 Standard_EXPORT bool MoreStartElements() const;
0095
0096 Standard_EXPORT void NextStartElement();
0097
0098 Standard_EXPORT const TopoDS_Shape& StartElement() const;
0099
0100 Standard_EXPORT virtual void InitNeighbours(const TopoDS_Shape& S);
0101
0102 Standard_EXPORT bool MoreNeighbours();
0103
0104 Standard_EXPORT void NextNeighbour();
0105
0106 Standard_EXPORT const TopoDS_Shape& Neighbour() const;
0107
0108 Standard_EXPORT NCollection_List<TopoDS_Shape>& ChangeStartShapes();
0109
0110
0111
0112
0113 Standard_EXPORT virtual void FindNeighbours();
0114
0115 Standard_EXPORT virtual const NCollection_List<TopoDS_Shape>& MakeNeighboursList(
0116 const TopoDS_Shape& E,
0117 const TopoDS_Shape& V);
0118
0119 Standard_EXPORT int MaxNumberSubShape(const TopoDS_Shape& Shape);
0120
0121 Standard_EXPORT void CheckShape(const bool checkshape);
0122
0123 Standard_EXPORT bool CheckShape() const;
0124
0125 Standard_EXPORT bool CheckShape(const TopoDS_Shape& S, const bool checkgeom = false);
0126
0127 Standard_EXPORT void DumpName(Standard_OStream& OS, const TCollection_AsciiString& str) const;
0128
0129 Standard_EXPORT void DumpCheck(Standard_OStream& OS,
0130 const TCollection_AsciiString& str,
0131 const TopoDS_Shape& S,
0132 const bool chk) const;
0133
0134 Standard_EXPORT virtual void DumpSS();
0135
0136 Standard_EXPORT virtual void DumpBB();
0137
0138 Standard_EXPORT void DEBName(const TCollection_AsciiString& N);
0139
0140 Standard_EXPORT const TCollection_AsciiString& DEBName() const;
0141
0142 Standard_EXPORT void DEBNumber(const int I);
0143
0144 Standard_EXPORT int DEBNumber() const;
0145
0146 Standard_EXPORT virtual TCollection_AsciiString SName(
0147 const TopoDS_Shape& S,
0148 const TCollection_AsciiString& sb = "",
0149 const TCollection_AsciiString& sa = "") const;
0150
0151 Standard_EXPORT virtual TCollection_AsciiString SNameori(
0152 const TopoDS_Shape& S,
0153 const TCollection_AsciiString& sb = "",
0154 const TCollection_AsciiString& sa = "") const;
0155
0156 Standard_EXPORT virtual TCollection_AsciiString SName(
0157 const NCollection_List<TopoDS_Shape>& S,
0158 const TCollection_AsciiString& sb = "",
0159 const TCollection_AsciiString& sa = "") const;
0160
0161 Standard_EXPORT virtual TCollection_AsciiString SNameori(
0162 const NCollection_List<TopoDS_Shape>& S,
0163 const TCollection_AsciiString& sb = "",
0164 const TCollection_AsciiString& sa = "") const;
0165
0166 protected:
0167 Standard_EXPORT void ProcessAddShape(const TopoDS_Shape& S);
0168
0169 Standard_EXPORT void ProcessAddStartElement(const TopoDS_Shape& S);
0170
0171 Standard_EXPORT void ProcessAddElement(const TopoDS_Shape& S);
0172
0173 TopAbs_ShapeEnum myShapeType;
0174 TopAbs_ShapeEnum mySubShapeType;
0175 TopOpeBRepTool_ShapeExplorer mySubShapeExplorer;
0176 NCollection_List<TopoDS_Shape> myStartShapes;
0177 NCollection_List<TopoDS_Shape>::Iterator myStartShapesIter;
0178 NCollection_IndexedDataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0179 mySubShapeMap;
0180 NCollection_List<TopoDS_Shape>::Iterator myIncidentShapesIter;
0181 NCollection_List<TopoDS_Shape> myShapes;
0182 NCollection_List<TopoDS_Shape>::Iterator myShapesIter;
0183 TopoDS_Shape myCurrentShape;
0184 NCollection_List<TopoDS_Shape> myCurrentShapeNeighbours;
0185 int myDEBNumber;
0186 TCollection_AsciiString myDEBName;
0187 NCollection_IndexedMap<TopoDS_Shape> myOMSS;
0188 NCollection_IndexedMap<TopoDS_Shape> myOMES;
0189 NCollection_IndexedMap<TopoDS_Shape> myOMSH;
0190 bool myCheckShape;
0191 };
0192
0193 #endif