File indexing completed on 2026-09-27 09:18:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _ShapeUpgrade_RemoveInternalWires_HeaderFile
0017 #define _ShapeUpgrade_RemoveInternalWires_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021
0022 #include <TopoDS_Shape.hxx>
0023 #include <NCollection_List.hxx>
0024 #include <TopTools_ShapeMapHasher.hxx>
0025 #include <NCollection_IndexedDataMap.hxx>
0026 #include <NCollection_DataMap.hxx>
0027 #include <NCollection_Sequence.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <ShapeUpgrade_Tool.hxx>
0030 #include <ShapeExtend_Status.hxx>
0031
0032
0033 #ifdef Status
0034 #undef Status
0035 #endif
0036
0037
0038 class ShapeUpgrade_RemoveInternalWires : public ShapeUpgrade_Tool
0039 {
0040
0041 public:
0042
0043 Standard_EXPORT ShapeUpgrade_RemoveInternalWires();
0044
0045 Standard_EXPORT ShapeUpgrade_RemoveInternalWires(const TopoDS_Shape& theShape);
0046
0047
0048 Standard_EXPORT void Init(const TopoDS_Shape& theShape);
0049
0050
0051 Standard_EXPORT bool Perform();
0052
0053
0054
0055
0056
0057 Standard_EXPORT bool Perform(const NCollection_Sequence<TopoDS_Shape>& theSeqShapes);
0058
0059
0060 TopoDS_Shape GetResult() const;
0061
0062
0063 double& MinArea();
0064
0065
0066
0067
0068 bool& RemoveFaceMode();
0069
0070
0071 const NCollection_Sequence<TopoDS_Shape>& RemovedFaces() const;
0072
0073
0074 const NCollection_Sequence<TopoDS_Shape>& RemovedWires() const;
0075
0076
0077
0078
0079
0080
0081
0082 bool Status(const ShapeExtend_Status theStatus) const;
0083
0084 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_RemoveInternalWires, ShapeUpgrade_Tool)
0085
0086 protected:
0087
0088 Standard_EXPORT void Clear();
0089
0090 int myStatus;
0091
0092 private:
0093
0094 Standard_EXPORT void removeSmallWire(const TopoDS_Shape& theFace, const TopoDS_Shape& theWire);
0095
0096
0097
0098 Standard_EXPORT void removeSmallFaces();
0099
0100 TopoDS_Shape myShape;
0101 TopoDS_Shape myResult;
0102 double myMinArea;
0103 bool myRemoveFacesMode;
0104 NCollection_IndexedDataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0105 myEdgeFaces;
0106 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0107 myRemoveEdges;
0108 NCollection_Sequence<TopoDS_Shape> myRemovedFaces;
0109 NCollection_Sequence<TopoDS_Shape> myRemoveWires;
0110 };
0111
0112 #include <ShapeUpgrade_RemoveInternalWires.lxx>
0113
0114 #endif