File indexing completed on 2026-09-18 09:21:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ShapeUpgrade_ShapeDivide_HeaderFile
0018 #define _ShapeUpgrade_ShapeDivide_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <TopoDS_Shape.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Message_Gravity.hxx>
0027 #include <ShapeExtend_Status.hxx>
0028 class ShapeUpgrade_FaceDivide;
0029 class ShapeBuild_ReShape;
0030 class ShapeExtend_BasicMsgRegistrator;
0031 class Message_Msg;
0032
0033
0034 #ifdef Status
0035 #undef Status
0036 #endif
0037
0038
0039 class ShapeUpgrade_ShapeDivide
0040 {
0041 public:
0042 DEFINE_STANDARD_ALLOC
0043
0044 Standard_EXPORT ShapeUpgrade_ShapeDivide();
0045
0046
0047 Standard_EXPORT ShapeUpgrade_ShapeDivide(const TopoDS_Shape& S);
0048
0049
0050 Standard_EXPORT void Init(const TopoDS_Shape& S);
0051
0052 Standard_EXPORT virtual ~ShapeUpgrade_ShapeDivide();
0053
0054
0055 Standard_EXPORT void SetPrecision(const double Prec);
0056
0057
0058 Standard_EXPORT void SetMaxTolerance(const double maxtol);
0059
0060
0061 Standard_EXPORT void SetMinTolerance(const double mintol);
0062
0063
0064
0065 Standard_EXPORT void SetSurfaceSegmentMode(const bool Segment);
0066
0067
0068
0069
0070
0071 Standard_EXPORT virtual bool Perform(const bool newContext = true);
0072
0073
0074 Standard_EXPORT TopoDS_Shape Result() const;
0075
0076
0077
0078 Standard_EXPORT occ::handle<ShapeBuild_ReShape> GetContext() const;
0079
0080
0081
0082 Standard_EXPORT void SetContext(const occ::handle<ShapeBuild_ReShape>& context);
0083
0084
0085 Standard_EXPORT virtual void SetMsgRegistrator(
0086 const occ::handle<ShapeExtend_BasicMsgRegistrator>& msgreg);
0087
0088
0089 Standard_EXPORT occ::handle<ShapeExtend_BasicMsgRegistrator> MsgRegistrator() const;
0090
0091
0092
0093 Standard_EXPORT void SendMsg(const TopoDS_Shape& shape,
0094 const Message_Msg& message,
0095 const Message_Gravity gravity = Message_Info) const;
0096
0097
0098
0099
0100
0101
0102 Standard_EXPORT bool Status(const ShapeExtend_Status status) const;
0103
0104
0105 Standard_EXPORT void SetSplitFaceTool(const occ::handle<ShapeUpgrade_FaceDivide>& splitFaceTool);
0106
0107
0108
0109
0110
0111 Standard_EXPORT void SetEdgeMode(const int aEdgeMode);
0112
0113 protected:
0114
0115 Standard_EXPORT virtual occ::handle<ShapeUpgrade_FaceDivide> GetSplitFaceTool() const;
0116
0117 Standard_EXPORT virtual Message_Msg GetFaceMsg() const;
0118
0119 Standard_EXPORT virtual Message_Msg GetWireMsg() const;
0120
0121
0122 Standard_EXPORT virtual Message_Msg GetEdgeMsg() const;
0123
0124 occ::handle<ShapeBuild_ReShape> myContext;
0125 occ::handle<ShapeExtend_BasicMsgRegistrator> myMsgReg;
0126 TopoDS_Shape myShape;
0127 TopoDS_Shape myResult;
0128 double myPrecision;
0129 double myMinTol;
0130 double myMaxTol;
0131 bool mySegmentMode;
0132 int myStatus;
0133 int myEdgeMode;
0134
0135 private:
0136 occ::handle<ShapeUpgrade_FaceDivide> mySplitFaceTool;
0137 };
0138
0139 #endif