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_Sewing_HeaderFile
00028 #define ShHealOper_Sewing_HeaderFile
00029
00030 #include <MMgt_TShared.hxx>
00031 #include <ShHealOper_Tool.hxx>
00032 #include <TopoDS_Shape.hxx>
00033 #include <TopAbs_ShapeEnum.hxx>
00034 #include <BRepBuilderAPI_Sewing.hxx>
00035 #include <TopoDS_Compound.hxx>
00036 #include <TopTools_MapOfShape.hxx>
00037 #include <TopTools_SequenceOfShape.hxx>
00038
00040
00041
00042 class ShHealOper_Sewing : public ShHealOper_Tool
00043 {
00044 public:
00045
00046
00047
00048 Standard_EXPORT ShHealOper_Sewing () : ShHealOper_Tool() {}
00049
00050
00051 Standard_EXPORT ShHealOper_Sewing (const TopoDS_Shape& theShape,
00052 const Standard_Real theTolerance);
00053
00054
00055 Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape);
00056
00057
00058 Standard_EXPORT Standard_Boolean Perform();
00059
00060
00061 Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqShapes);
00062
00063
00064 inline void SetFacesMode(const Standard_Boolean theFacesMode )
00065 {
00066 myFacesMode = theFacesMode;
00067 }
00068
00069
00070 inline Standard_Boolean GetFacesMode( )
00071 {
00072 return myFacesMode;
00073 }
00074
00075
00076 inline void SetFloatingEdgesMode(const Standard_Boolean theEdgesMode )
00077 {
00078 myEdgesMode = theEdgesMode;
00079 }
00080
00081
00082 inline Standard_Boolean GetFloatingEdgesMode( )
00083 {
00084 return myEdgesMode;
00085 }
00086
00087
00088 inline void SetNonManifoldMode(const Standard_Boolean theNonManifoldMode )
00089 {
00090 myNonManifoldMode = theNonManifoldMode;
00091 }
00092
00093
00094 inline Standard_Boolean GetNonManifoldMode( )
00095 {
00096 return myNonManifoldMode;
00097 }
00098
00099
00100 inline void SetTolerance(const Standard_Real theToler)
00101 {
00102 myTolerance = theToler;
00103 }
00104
00105
00106 inline Standard_Real GetTolerance()
00107 {
00108 return myTolerance;
00109 }
00110
00111
00112 inline void SetHistoryLevel(TopAbs_ShapeEnum theHistLevel)
00113 {
00114 myHistoryLevel =theHistLevel;
00115 }
00116
00117
00118 inline TopAbs_ShapeEnum GetHistoryLevel()
00119 {
00120 return myHistoryLevel;
00121 }
00122
00123
00124 private:
00125
00126
00127 Standard_Boolean sewing(const TopTools_SequenceOfShape& theSeqShapes);
00128 Standard_Boolean getShells(const TopoDS_Shape& theSewShape) const;
00129 Standard_Boolean getWires(const TopoDS_Shape& theSewShape) const;
00130 Standard_Boolean getModifications(const TopoDS_Shape& theShape,
00131 const Handle(BRepBuilderAPI_Sewing)& theSewing) const;
00132
00133 Standard_Boolean isSewed(const TopoDS_Shape& theShape) const;
00134
00135 void deleteFreeEdges(const TopoDS_Shape& theSewShape,
00136 TopTools_MapOfShape& theMapEdges,
00137 TopoDS_Compound& theNewComp) const;
00138 private:
00139
00140
00141 Standard_Boolean myNonManifoldMode;
00142 Standard_Boolean myEdgesMode;
00143 Standard_Boolean myFacesMode;
00144 Standard_Real myTolerance;
00145 TopAbs_ShapeEnum myHistoryLevel;
00146 public:
00147
00148
00149 };
00150
00151
00152
00153
00154
00155 #endif