File indexing completed on 2026-09-22 08:59:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ShapeFix_Wireframe_HeaderFile
0018 #define _ShapeFix_Wireframe_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <TopoDS_Shape.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <ShapeFix_Root.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_Map.hxx>
0028 #include <NCollection_List.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <ShapeExtend_Status.hxx>
0031
0032
0033 class ShapeFix_Wireframe : public ShapeFix_Root
0034 {
0035
0036 public:
0037 Standard_EXPORT ShapeFix_Wireframe();
0038
0039 Standard_EXPORT ShapeFix_Wireframe(const TopoDS_Shape& shape);
0040
0041
0042 Standard_EXPORT virtual void ClearStatuses();
0043
0044
0045 Standard_EXPORT void Load(const TopoDS_Shape& shape);
0046
0047
0048
0049
0050 Standard_EXPORT bool FixWireGaps();
0051
0052
0053
0054 Standard_EXPORT bool FixSmallEdges();
0055
0056
0057
0058 Standard_EXPORT bool CheckSmallEdges(
0059 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& theSmallEdges,
0060 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>&
0061 theEdgeToFaces,
0062 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>&
0063 theFaceWithSmall,
0064 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& theMultyEdges);
0065
0066
0067
0068
0069
0070
0071
0072
0073 Standard_EXPORT bool MergeSmallEdges(
0074 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& theSmallEdges,
0075 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>&
0076 theEdgeToFaces,
0077 NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>&
0078 theFaceWithSmall,
0079 NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>& theMultyEdges,
0080 const bool theModeDrop = false,
0081 const double theLimitAngle = -1);
0082
0083
0084
0085
0086
0087
0088
0089 bool StatusWireGaps(const ShapeExtend_Status status) const;
0090
0091
0092
0093
0094
0095 bool StatusSmallEdges(const ShapeExtend_Status status) const;
0096
0097 TopoDS_Shape Shape();
0098
0099
0100 bool& ModeDropSmallEdges();
0101
0102
0103 void SetLimitAngle(const double theLimitAngle);
0104
0105
0106 double LimitAngle() const;
0107
0108 DEFINE_STANDARD_RTTIEXT(ShapeFix_Wireframe, ShapeFix_Root)
0109
0110 protected:
0111 TopoDS_Shape myShape;
0112
0113 private:
0114 bool myModeDrop;
0115 double myLimitAngle;
0116 int myStatusWireGaps;
0117 int myStatusSmallEdges;
0118 };
0119
0120 #include <ShapeFix_Wireframe.lxx>
0121
0122 #endif