Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/opencascade/ShapeFix_Root.lxx is written in an unsupported language. File is not indexed.

0001 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #include <Precision.hxx>
0015 
0016 //=======================================================================
0017 //function : Context
0018 //purpose  : 
0019 //=======================================================================
0020 
0021 inline Handle(ShapeBuild_ReShape) ShapeFix_Root::Context() const
0022 {
0023   return myContext;
0024 }
0025 
0026 //=======================================================================
0027 //function : MsgRegistrator
0028 //purpose  : 
0029 //=======================================================================
0030 
0031 inline Handle(ShapeExtend_BasicMsgRegistrator) ShapeFix_Root::MsgRegistrator() const
0032 {
0033   return myMsgReg;
0034 }
0035 
0036 //=======================================================================
0037 //function : Precision
0038 //purpose  : 
0039 //=======================================================================
0040 
0041 inline Standard_Real ShapeFix_Root::Precision() const
0042 {
0043   return myPrecision;
0044 }
0045 
0046 //=======================================================================
0047 //function : MinTolerance
0048 //purpose  : 
0049 //=======================================================================
0050 
0051 inline Standard_Real ShapeFix_Root::MinTolerance() const
0052 {
0053   return myMinTol;
0054 }
0055 
0056 //=======================================================================
0057 //function : MaxTolerance
0058 //purpose  : 
0059 //=======================================================================
0060 
0061 inline Standard_Real ShapeFix_Root::MaxTolerance() const
0062 {
0063   return myMaxTol;
0064 }
0065 
0066 //=======================================================================
0067 //function : LimitTolerance
0068 //purpose  : 
0069 //=======================================================================
0070 
0071 inline Standard_Real ShapeFix_Root::LimitTolerance(const Standard_Real toler) const
0072 {
0073   //only maximal restriction implemented.
0074   return Min(myMaxTol,toler);
0075 }
0076 
0077 //=======================================================================
0078 //function : SendMsg
0079 //purpose  : 
0080 //=======================================================================
0081 
0082 inline  void ShapeFix_Root::SendMsg(const Message_Msg& message,const Message_Gravity gravity) const
0083 {
0084   SendMsg (myShape, message, gravity);
0085 }
0086 
0087  
0088 //=======================================================================
0089 //function : SendWarning
0090 //purpose  : 
0091 //=======================================================================
0092 
0093 inline  void ShapeFix_Root::SendWarning(const TopoDS_Shape& shape,const Message_Msg& message) const
0094 {
0095   SendMsg (shape, message, Message_Warning);
0096 }
0097 
0098  
0099 //=======================================================================
0100 //function : SendWarning
0101 //purpose  : 
0102 //=======================================================================
0103 
0104 inline  void ShapeFix_Root::SendWarning(const Message_Msg& message) const
0105 {
0106   SendWarning (myShape, message);
0107 }
0108 
0109  
0110 //=======================================================================
0111 //function : SendFail
0112 //purpose  : 
0113 //=======================================================================
0114 
0115 inline  void ShapeFix_Root::SendFail(const TopoDS_Shape& shape,const Message_Msg& message) const
0116 {
0117   SendMsg (shape, message, Message_Fail);
0118 }
0119 
0120  
0121 //=======================================================================
0122 //function : SendFail
0123 //purpose  : 
0124 //=======================================================================
0125 
0126 inline  void ShapeFix_Root::SendFail(const Message_Msg& message) const
0127 {
0128   SendFail (myShape, message);
0129 }
0130 
0131  
0132 //=======================================================================
0133 //function : NeedFix
0134 //purpose  : Function used to define if the fixing method needs to be called
0135 //           according to its specific flag if it is set, or 
0136 //           to some additional criteria (if Flag is default) 
0137 //=======================================================================
0138 
0139 inline Standard_Boolean ShapeFix_Root::NeedFix (const Standard_Integer Flag, 
0140                                                 const Standard_Boolean need)
0141 {
0142   return Flag <0 ? need : ( Flag >0 );
0143 }