File indexing completed on 2026-11-07 10:22:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepAlgo_Image_HeaderFile
0018 #define _BRepAlgo_Image_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <TopoDS_Shape.hxx>
0025 #include <NCollection_List.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <TopAbs_ShapeEnum.hxx>
0030 class TopoDS_Shape;
0031
0032
0033
0034 class BRepAlgo_Image
0035 {
0036 public:
0037 DEFINE_STANDARD_ALLOC
0038
0039 Standard_EXPORT BRepAlgo_Image();
0040
0041 Standard_EXPORT void SetRoot(const TopoDS_Shape& S);
0042
0043
0044 Standard_EXPORT void Bind(const TopoDS_Shape& OldS, const TopoDS_Shape& NewS);
0045
0046
0047 Standard_EXPORT void Bind(const TopoDS_Shape& OldS, const NCollection_List<TopoDS_Shape>& NewS);
0048
0049
0050 Standard_EXPORT void Add(const TopoDS_Shape& OldS, const TopoDS_Shape& NewS);
0051
0052
0053 Standard_EXPORT void Add(const TopoDS_Shape& OldS, const NCollection_List<TopoDS_Shape>& NewS);
0054
0055 Standard_EXPORT void Clear();
0056
0057
0058 Standard_EXPORT void Remove(const TopoDS_Shape& S);
0059
0060
0061 Standard_EXPORT void RemoveRoot(const TopoDS_Shape& Root);
0062
0063
0064
0065
0066 Standard_EXPORT void ReplaceRoot(const TopoDS_Shape& OldRoot, const TopoDS_Shape& NewRoot);
0067
0068 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Roots() const;
0069
0070 Standard_EXPORT bool IsImage(const TopoDS_Shape& S) const;
0071
0072
0073 Standard_EXPORT const TopoDS_Shape& ImageFrom(const TopoDS_Shape& S) const;
0074
0075
0076 Standard_EXPORT const TopoDS_Shape& Root(const TopoDS_Shape& S) const;
0077
0078 Standard_EXPORT bool HasImage(const TopoDS_Shape& S) const;
0079
0080
0081
0082 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Image(const TopoDS_Shape& S) const;
0083
0084
0085
0086 Standard_EXPORT void LastImage(const TopoDS_Shape& S, NCollection_List<TopoDS_Shape>& L) const;
0087
0088
0089 Standard_EXPORT void Compact();
0090
0091
0092
0093
0094 Standard_EXPORT void Filter(const TopoDS_Shape& S, const TopAbs_ShapeEnum ShapeType);
0095
0096 private:
0097 NCollection_List<TopoDS_Shape> roots;
0098 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> up;
0099 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher> down;
0100 };
0101
0102 #endif