1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <Precision.hxx>
16 //=======================================================================
19 //=======================================================================
21 inline Handle(ShapeBuild_ReShape) ShapeFix_Root::Context() const
26 //=======================================================================
27 //function : MsgRegistrator
29 //=======================================================================
31 inline Handle(ShapeExtend_BasicMsgRegistrator) ShapeFix_Root::MsgRegistrator() const
36 //=======================================================================
37 //function : Precision
39 //=======================================================================
41 inline Standard_Real ShapeFix_Root::Precision() const
46 //=======================================================================
47 //function : MinTolerance
49 //=======================================================================
51 inline Standard_Real ShapeFix_Root::MinTolerance() const
56 //=======================================================================
57 //function : MaxTolerance
59 //=======================================================================
61 inline Standard_Real ShapeFix_Root::MaxTolerance() const
66 //=======================================================================
67 //function : LimitTolerance
69 //=======================================================================
71 inline Standard_Real ShapeFix_Root::LimitTolerance(const Standard_Real toler) const
73 //only maximal restriction implemented.
74 return Min(myMaxTol,toler);
77 //=======================================================================
80 //=======================================================================
82 inline void ShapeFix_Root::SendMsg(const Message_Msg& message,const Message_Gravity gravity) const
84 SendMsg (myShape, message, gravity);
88 //=======================================================================
89 //function : SendWarning
91 //=======================================================================
93 inline void ShapeFix_Root::SendWarning(const TopoDS_Shape& shape,const Message_Msg& message) const
95 SendMsg (shape, message, Message_Warning);
99 //=======================================================================
100 //function : SendWarning
102 //=======================================================================
104 inline void ShapeFix_Root::SendWarning(const Message_Msg& message) const
106 SendWarning (myShape, message);
110 //=======================================================================
111 //function : SendFail
113 //=======================================================================
115 inline void ShapeFix_Root::SendFail(const TopoDS_Shape& shape,const Message_Msg& message) const
117 SendMsg (shape, message, Message_Fail);
121 //=======================================================================
122 //function : SendFail
124 //=======================================================================
126 inline void ShapeFix_Root::SendFail(const Message_Msg& message) const
128 SendFail (myShape, message);
132 //=======================================================================
134 //purpose : Function used to define if the fixing method needs to be called
135 // according to its specific flag if it is set, or
136 // to some additional criteria (if Flag is default)
137 //=======================================================================
139 inline Standard_Boolean ShapeFix_Root::NeedFix (const Standard_Integer Flag,
140 const Standard_Boolean need)
142 return Flag <0 ? need : ( Flag >0 );