File indexing completed on 2025-01-18 10:03:17
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 <TopTools_DataMapOfShapeShape.hxx>
0025 #include <TopTools_MapOfShape.hxx>
0026 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0027 #include <TopoDS_Edge.hxx>
0028 #include <TopoDS_Face.hxx>
0029
0030 #include <NCollection_DataMap.hxx>
0031 #include <TopoDS_Shape.hxx>
0032 #include <TopTools_ShapeMapHasher.hxx>
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
0045 DEFINE_STANDARD_ALLOC
0046
0047
0048 Standard_EXPORT BRepTools_Modifier(Standard_Boolean theMutableInput = Standard_False);
0049
0050
0051 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S);
0052
0053
0054
0055 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M);
0056
0057
0058 Standard_EXPORT void Init (const TopoDS_Shape& S);
0059
0060
0061 Standard_EXPORT void Perform (const Handle(BRepTools_Modification)& M,
0062 const Message_ProgressRange& theProgress = Message_ProgressRange());
0063
0064
0065
0066 Standard_Boolean IsDone() const;
0067
0068
0069 Standard_EXPORT Standard_Boolean IsMutableInput() const;
0070
0071
0072
0073
0074 Standard_EXPORT void SetMutableInput(Standard_Boolean theMutableInput);
0075
0076
0077 const TopoDS_Shape& ModifiedShape (const TopoDS_Shape& S) const;
0078
0079
0080 protected:
0081
0082
0083
0084 private:
0085
0086 struct NewCurveInfo
0087 {
0088 Handle(Geom_Curve) myCurve;
0089 TopLoc_Location myLoc;
0090 Standard_Real myToler;
0091 };
0092
0093 struct NewSurfaceInfo
0094 {
0095 Handle(Geom_Surface) mySurface;
0096 TopLoc_Location myLoc;
0097 Standard_Real myToler;
0098 Standard_Boolean myRevWires;
0099 Standard_Boolean myRevFace;
0100 };
0101
0102 Standard_EXPORT void Put (const TopoDS_Shape& S);
0103
0104 Standard_EXPORT Standard_Boolean Rebuild (const TopoDS_Shape& S,
0105 const Handle(BRepTools_Modification)& M,
0106 Standard_Boolean& theNewGeom,
0107 const Message_ProgressRange& theProgress = Message_ProgressRange());
0108
0109 Standard_EXPORT void CreateNewVertices(
0110 const TopTools_IndexedDataMapOfShapeListOfShape& theMVE,
0111 const Handle(BRepTools_Modification)& M);
0112
0113 Standard_EXPORT void FillNewCurveInfo(
0114 const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
0115 const Handle(BRepTools_Modification)& M);
0116
0117 Standard_EXPORT void FillNewSurfaceInfo(const Handle(BRepTools_Modification)& M);
0118
0119 Standard_EXPORT void CreateOtherVertices(
0120 const TopTools_IndexedDataMapOfShapeListOfShape& theMVE,
0121 const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
0122 const Handle(BRepTools_Modification)& M);
0123
0124 TopTools_DataMapOfShapeShape myMap;
0125 TopoDS_Shape myShape;
0126 Standard_Boolean myDone;
0127 NCollection_DataMap<TopoDS_Edge, NewCurveInfo, TopTools_ShapeMapHasher> myNCInfo;
0128 NCollection_DataMap<TopoDS_Face, NewSurfaceInfo, TopTools_ShapeMapHasher> myNSInfo;
0129 TopTools_MapOfShape myNonUpdFace;
0130 TopTools_MapOfShape myHasNewGeom;
0131 Standard_Boolean myMutableInput;
0132
0133 };
0134
0135
0136 #include <BRepTools_Modifier.lxx>
0137
0138
0139
0140
0141
0142 #endif