Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ShHealOper_CloseContour_HeaderFile
00028 #define ShHealOper_CloseContour_HeaderFile
00029
00030 #include <MMgt_TShared.hxx>
00031 #include <TopoDS_Shape.hxx>
00032 #include <TopTools_SequenceOfShape.hxx>
00033 #include <TopoDS_Wire.hxx>
00034 #include <BRepTools_ReShape.hxx>
00035 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
00036 #include <ShapeExtend_WireData.hxx>
00037 #include <ShapeAnalysis_Wire.hxx>
00038 #include <TColStd_MapOfInteger.hxx>
00039 #include <ShHealOper_Tool.hxx>
00040 #include <TopoDS_Edge.hxx>
00042
00043
00044 class ShHealOper_CloseContour : public ShHealOper_Tool
00045 {
00046 public:
00047
00048 Standard_EXPORT ShHealOper_CloseContour() : ShHealOper_Tool() {}
00049
00050 Standard_EXPORT ShHealOper_CloseContour (const TopoDS_Shape& theShape);
00051
00052
00053 Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
00054
00055
00056 Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqEdges,
00057 const Standard_Boolean theModeVertex = Standard_False,
00058 const Standard_Boolean theModeFixGapsCurves = Standard_True);
00059
00060
00061
00062
00063 Standard_EXPORT Standard_Boolean Perform(const TopoDS_Wire& theWire,
00064 const Standard_Boolean theModeVertex= Standard_False,
00065 const Standard_Boolean theModeFixGapsCurves = Standard_True);
00066
00067
00068
00069
00070 inline void SetTolerance(const Standard_Real theTolerance)
00071 {
00072 myTolerance = theTolerance;
00073 }
00074
00075
00076 inline Standard_Real GetTolerance()
00077 {
00078 return myTolerance;
00079 }
00080
00081
00082 inline void SetMaxTolerance(const Standard_Real theMaxTolerance)
00083 {
00084 myMaxTolerance = theMaxTolerance;
00085 }
00086
00087
00088 inline Standard_Real GetMaxTolerance()
00089 {
00090 return myMaxTolerance;
00091 }
00092
00093
00094 inline void SetModeVertex(const Standard_Boolean theModeVertex)
00095 {
00096 myModeVertex = theModeVertex;
00097 }
00098
00099
00100 inline Standard_Boolean GetModeVertex()
00101 {
00102 return myModeVertex;
00103 }
00104
00105
00106
00107 private:
00108
00109
00110 void build(Handle(ShapeExtend_WireData)& theSewd);
00111
00112 Standard_Boolean fixGaps(const Handle(ShapeExtend_WireData)& theWire,
00113 const TopTools_SequenceOfShape& theCommonFaces);
00114
00115 Standard_Boolean checkOneFace(const Handle(ShapeExtend_WireData)& theSewd,
00116 TopTools_SequenceOfShape& theCommonFaces) const;
00117
00118 void buildEdge(const TopoDS_Edge& aE1,
00119 const TopoDS_Edge& aE2,
00120 const TopTools_SequenceOfShape& theCommonFaces);
00121
00122 void updateWire (Handle(ShapeExtend_WireData)& sbwd);
00123 private:
00124
00125
00126
00127 Standard_Boolean myModeVertex;
00128 Standard_Boolean myModeFixGapsCurves;
00129
00130 Standard_Real myMaxTolerance;
00131 Standard_Real myTolerance;
00132 TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace;
00133 TopTools_SequenceOfShape myFreeEdges;
00134 public:
00135
00136
00137 };
00138
00139
00140
00141
00142
00143 #endif