summaryrefslogtreecommitdiff
path: root/inc/ShapeFix_Root.hxx
blob: df58e4ed02f3914d726bbf665a11c603eb759a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _ShapeFix_Root_HeaderFile
#define _ShapeFix_Root_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_ShapeFix_Root_HeaderFile
#include <Handle_ShapeFix_Root.hxx>
#endif

#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
#include <Handle_ShapeBuild_ReShape.hxx>
#endif
#ifndef _Handle_ShapeExtend_BasicMsgRegistrator_HeaderFile
#include <Handle_ShapeExtend_BasicMsgRegistrator.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Message_Gravity_HeaderFile
#include <Message_Gravity.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class ShapeBuild_ReShape;
class ShapeExtend_BasicMsgRegistrator;
class TopoDS_Shape;
class Message_Msg;


//! Root class for fixing operations <br>
//!          Provides context for recording changes (optional), <br>
//!          basic precision value and limit (minimal and <br>
//!          maximal) values for tolerances, <br>
//!          and message registrator <br>
class ShapeFix_Root : public MMgt_TShared {

public:

  //! Empty Constructor (no context is created) <br>
  Standard_EXPORT   ShapeFix_Root();
  //! Copy all fields from another Root object <br>
  Standard_EXPORT   virtual  void Set(const Handle(ShapeFix_Root)& Root) ;
  //! Sets context <br>
  Standard_EXPORT   virtual  void SetContext(const Handle(ShapeBuild_ReShape)& context) ;
  //! Returns context <br>
        Handle_ShapeBuild_ReShape Context() const;
  //! Sets message registrator <br>
  Standard_EXPORT   virtual  void SetMsgRegistrator(const Handle(ShapeExtend_BasicMsgRegistrator)& msgreg) ;
  //! Returns message registrator <br>
        Handle_ShapeExtend_BasicMsgRegistrator MsgRegistrator() const;
  //! Sets basic precision value <br>
  Standard_EXPORT   virtual  void SetPrecision(const Standard_Real preci) ;
  //! Returns basic precision value <br>
        Standard_Real Precision() const;
  //! Sets minimal allowed tolerance <br>
  Standard_EXPORT   virtual  void SetMinTolerance(const Standard_Real mintol) ;
  //! Returns minimal allowed tolerance <br>
        Standard_Real MinTolerance() const;
  //! Sets maximal allowed tolerance <br>
  Standard_EXPORT   virtual  void SetMaxTolerance(const Standard_Real maxtol) ;
  //! Returns maximal allowed tolerance <br>
        Standard_Real MaxTolerance() const;
  //! Returns tolerance limited by [myMinTol,myMaxTol] <br>
        Standard_Real LimitTolerance(const Standard_Real toler) const;
  //! Sends a message to be attached to the shape. <br>
//!          Calls corresponding message of message registrator. <br>
  Standard_EXPORT     void SendMsg(const TopoDS_Shape& shape,const Message_Msg& message,const Message_Gravity gravity = Message_Info) const;
  //! Sends a message to be attached to myShape. <br>
//!          Calls previous method. <br>
        void SendMsg(const Message_Msg& message,const Message_Gravity gravity = Message_Info) const;
  //! Sends a warning to be attached to the shape. <br>
//!          Calls SendMsg with gravity set to Message_Warning. <br>
        void SendWarning(const TopoDS_Shape& shape,const Message_Msg& message) const;
  //! Calls previous method for myShape. <br>
        void SendWarning(const Message_Msg& message) const;
  //! Sends a fail to be attached to the shape. <br>
//!          Calls SendMsg with gravity set to Message_Fail. <br>
        void SendFail(const TopoDS_Shape& shape,const Message_Msg& message) const;
  //! Calls previous method for myShape. <br>
        void SendFail(const Message_Msg& message) const;




  DEFINE_STANDARD_RTTI(ShapeFix_Root)

protected:

  //! Auxiliary method for work with three-position <br>
//!          (on/off/default) flags (modes) in ShapeFix. <br>
      static  Standard_Boolean NeedFix(const Standard_Integer flag,const Standard_Boolean def = Standard_True) ;

TopoDS_Shape myShape;


private: 


Handle_ShapeBuild_ReShape myContext;
Handle_ShapeExtend_BasicMsgRegistrator myMsgReg;
Standard_Real myPrecision;
Standard_Real myMinTol;
Standard_Real myMaxTol;


};


#include <ShapeFix_Root.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif