File indexing completed on 2026-09-29 09:18:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepTools_Modifier_HeaderFile
0018 #define _BRepTools_Modifier_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <TopoDS_Shape.hxx>
0025 #include <TopTools_ShapeMapHasher.hxx>
0026 #include <NCollection_DataMap.hxx>
0027 #include <NCollection_Map.hxx>
0028 #include <NCollection_List.hxx>
0029 #include <NCollection_IndexedDataMap.hxx>
0030 #include <TopoDS_Edge.hxx>
0031 #include <TopoDS_Face.hxx>
0032
0033 #include <TopLoc_Location.hxx>
0034 #include <Message_ProgressRange.hxx>
0035
0036 class BRepTools_Modification;
0037 class Geom_Curve;
0038 class Geom_Surface;
0039
0040
0041 class BRepTools_Modifier
0042 {
0043 public:
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047 Standard_EXPORT BRepTools_Modifier(bool theMutableInput = false);
0048
0049
0050 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S);
0051
0052
0053
0054 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S,
0055 const occ::handle<BRepTools_Modification>& M);
0056
0057
0058 Standard_EXPORT void Init(const TopoDS_Shape& S);
0059
0060
0061 Standard_EXPORT void Perform(const occ::handle<BRepTools_Modification>& M,
0062 const Message_ProgressRange& theProgress = Message_ProgressRange());
0063
0064
0065
0066 bool IsDone() const;
0067
0068
0069 Standard_EXPORT bool IsMutableInput() const;
0070
0071
0072
0073
0074 Standard_EXPORT void SetMutableInput(bool theMutableInput);
0075
0076
0077 const TopoDS_Shape& ModifiedShape(const TopoDS_Shape& S) const;
0078
0079 private:
0080 struct NewCurveInfo
0081 {
0082 occ::handle<Geom_Curve> myCurve;
0083 TopLoc_Location myLoc;
0084 double myToler;
0085 };
0086
0087 struct NewSurfaceInfo
0088 {
0089 occ::handle<Geom_Surface> mySurface;
0090 TopLoc_Location myLoc;
0091 double myToler;
0092 bool myRevWires;
0093 bool myRevFace;
0094 };
0095
0096 Standard_EXPORT void Put(const TopoDS_Shape& S);
0097
0098 Standard_EXPORT bool Rebuild(const TopoDS_Shape& S,
0099 const occ::handle<BRepTools_Modification>& M,
0100 bool& theNewGeom,
0101 const Message_ProgressRange& theProgress = Message_ProgressRange());
0102
0103 Standard_EXPORT void CreateNewVertices(
0104 const NCollection_IndexedDataMap<TopoDS_Shape,
0105 NCollection_List<TopoDS_Shape>,
0106 TopTools_ShapeMapHasher>& theMVE,
0107 const occ::handle<BRepTools_Modification>& M);
0108
0109 Standard_EXPORT void FillNewCurveInfo(
0110 const NCollection_IndexedDataMap<TopoDS_Shape,
0111 NCollection_List<TopoDS_Shape>,
0112 TopTools_ShapeMapHasher>& theMEF,
0113 const occ::handle<BRepTools_Modification>& M);
0114
0115 Standard_EXPORT void FillNewSurfaceInfo(const occ::handle<BRepTools_Modification>& M);
0116
0117 Standard_EXPORT void CreateOtherVertices(
0118 const NCollection_IndexedDataMap<TopoDS_Shape,
0119 NCollection_List<TopoDS_Shape>,
0120 TopTools_ShapeMapHasher>& theMVE,
0121 const NCollection_IndexedDataMap<TopoDS_Shape,
0122 NCollection_List<TopoDS_Shape>,
0123 TopTools_ShapeMapHasher>& theMEF,
0124 const occ::handle<BRepTools_Modification>& M);
0125
0126 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myMap;
0127 TopoDS_Shape myShape;
0128 bool myDone;
0129 NCollection_DataMap<TopoDS_Edge, NewCurveInfo, TopTools_ShapeMapHasher> myNCInfo;
0130 NCollection_DataMap<TopoDS_Face, NewSurfaceInfo, TopTools_ShapeMapHasher> myNSInfo;
0131 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> myNonUpdFace;
0132 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> myHasNewGeom;
0133 bool myMutableInput;
0134 };
0135
0136 #include <BRepTools_Modifier.lxx>
0137
0138 #endif