|
|
|||
File indexing completed on 2026-07-12 08:21:26
0001 // Created on: 2000-05-22 0002 // Created by: Peter KURNEV 0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _IntTools_Root_HeaderFile 0017 #define _IntTools_Root_HeaderFile 0018 0019 #include <Standard.hxx> 0020 #include <Standard_DefineAlloc.hxx> 0021 #include <Standard_Handle.hxx> 0022 0023 #include <Standard_Real.hxx> 0024 #include <TopAbs_State.hxx> 0025 #include <Standard_Boolean.hxx> 0026 0027 //! The class is to describe the root of 0028 //! function of one variable for Edge/Edge 0029 //! and Edge/Surface algorithms. 0030 class IntTools_Root 0031 { 0032 public: 0033 DEFINE_STANDARD_ALLOC 0034 0035 //! Empty constructor 0036 Standard_EXPORT IntTools_Root(); 0037 0038 //! Initializes my by range of parameters 0039 //! and type of root 0040 Standard_EXPORT IntTools_Root(const Standard_Real aRoot, const Standard_Integer aType); 0041 0042 //! Sets the Root's value 0043 Standard_EXPORT void SetRoot(const Standard_Real aRoot); 0044 0045 //! Sets the Root's Type 0046 Standard_EXPORT void SetType(const Standard_Integer aType); 0047 0048 //! Set the value of the state before the root 0049 //! (at t=Root-dt) 0050 Standard_EXPORT void SetStateBefore(const TopAbs_State aState); 0051 0052 //! Set the value of the state after the root 0053 //! (at t=Root-dt) 0054 Standard_EXPORT void SetStateAfter(const TopAbs_State aState); 0055 0056 //! Not used in Edge/Edge algorithm 0057 Standard_EXPORT void SetLayerHeight(const Standard_Real aHeight); 0058 0059 //! Sets the interval from which the Root was 0060 //! found [t1,t2] and the corresponding values 0061 //! of the function on the bounds f(t1), f(t2). 0062 Standard_EXPORT void SetInterval(const Standard_Real t1, 0063 const Standard_Real t2, 0064 const Standard_Real f1, 0065 const Standard_Real f2); 0066 0067 //! Returns the Root value 0068 Standard_EXPORT Standard_Real Root() const; 0069 0070 //! Returns the type of the root 0071 //! =0 - Simple (was found by bisection method); 0072 //! =2 - Smart when f1=0, f2!=0 or vice versa 0073 //! (was found by Fibbonacci method); 0074 //! =1 - Pure (pure zero for all t [t1,t2] ); 0075 Standard_EXPORT Standard_Integer Type() const; 0076 0077 //! Returns the state before the root 0078 Standard_EXPORT TopAbs_State StateBefore() const; 0079 0080 //! Returns the state after the root 0081 Standard_EXPORT TopAbs_State StateAfter() const; 0082 0083 //! Not used in Edge/Edge algorithm 0084 Standard_EXPORT Standard_Real LayerHeight() const; 0085 0086 //! Returns the validity flag for the root, 0087 //! True if 0088 //! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or 0089 //! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or 0090 //! myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or 0091 //! myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT . 0092 //! For other cases it returns False. 0093 Standard_EXPORT Standard_Boolean IsValid() const; 0094 0095 //! Returns the values of interval from which the Root was 0096 //! found [t1,t2] and the corresponding values 0097 //! of the function on the bounds f(t1), f(t2). 0098 Standard_EXPORT void Interval(Standard_Real& t1, 0099 Standard_Real& t2, 0100 Standard_Real& f1, 0101 Standard_Real& f2) const; 0102 0103 protected: 0104 private: 0105 Standard_Real myRoot; 0106 Standard_Integer myType; 0107 Standard_Real myLayerHeight; 0108 TopAbs_State myStateBefore; 0109 TopAbs_State myStateAfter; 0110 Standard_Real myt1; 0111 Standard_Real myt2; 0112 Standard_Real myf1; 0113 Standard_Real myf2; 0114 }; 0115 0116 #endif // _IntTools_Root_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|