Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:11

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 
0028 //! The class is to describe the root of
0029 //! function of one variable  for  Edge/Edge
0030 //! and  Edge/Surface  algorithms.
0031 class IntTools_Root 
0032 {
0033 public:
0034 
0035   DEFINE_STANDARD_ALLOC
0036 
0037   
0038 
0039   //! Empty constructor
0040   Standard_EXPORT IntTools_Root();
0041   
0042 
0043   //! Initializes my by range of parameters
0044   //! and type of root
0045   Standard_EXPORT IntTools_Root(const Standard_Real aRoot, const Standard_Integer aType);
0046   
0047 
0048   //! Sets the Root's value
0049   Standard_EXPORT void SetRoot (const Standard_Real aRoot);
0050   
0051 
0052   //! Sets the Root's Type
0053   Standard_EXPORT void SetType (const Standard_Integer aType);
0054   
0055 
0056   //! Set  the  value of the state before the root
0057   //! (at  t=Root-dt)
0058   Standard_EXPORT void SetStateBefore (const TopAbs_State aState);
0059   
0060 
0061   //! Set  the  value of the state after the root
0062   //! (at  t=Root-dt)
0063   Standard_EXPORT void SetStateAfter (const TopAbs_State aState);
0064   
0065 
0066   //! Not  used  in  Edge/Edge  algorithm
0067   Standard_EXPORT void SetLayerHeight (const Standard_Real aHeight);
0068   
0069 
0070   //! Sets the  interval  from which the Root was
0071   //! found [t1,t2] and the  corresponding  values
0072   //! of  the  function  on  the  bounds f(t1), f(t2).
0073   Standard_EXPORT void SetInterval (const Standard_Real t1, const Standard_Real t2, const Standard_Real f1, const Standard_Real f2);
0074   
0075 
0076   //! Returns the Root  value
0077   Standard_EXPORT Standard_Real Root() const;
0078   
0079 
0080   //! Returns the  type  of  the  root
0081   //! =0  -  Simple (was  found  by  bisection  method);
0082   //! =2  -  Smart when f1=0, f2!=0 or  vice  versa
0083   //! (was  found  by  Fibbonacci method);
0084   //! =1  -  Pure   (pure  zero  for all t [t1,t2] );
0085   Standard_EXPORT Standard_Integer Type() const;
0086   
0087 
0088   //! Returns the state before the root
0089   Standard_EXPORT TopAbs_State StateBefore() const;
0090   
0091 
0092   //! Returns the state after the root
0093   Standard_EXPORT TopAbs_State StateAfter() const;
0094   
0095 
0096   //! Not  used  in  Edge/Edge  algorithm
0097   Standard_EXPORT Standard_Real LayerHeight() const;
0098   
0099 
0100   //! Returns the validity flag for the root,
0101   //! True if
0102   //! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or
0103   //! myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or
0104   //! myStateBefore==TopAbs_ON  && myStateAfter==TopAbs_OUT or
0105   //! myStateBefore==TopAbs_IN  && myStateAfter==TopAbs_OUT  .
0106   //! For  other  cases it  returns  False.
0107   Standard_EXPORT Standard_Boolean IsValid() const;
0108   
0109 
0110   //! Returns the values of interval  from which the Root was
0111   //! found [t1,t2] and the  corresponding  values
0112   //! of  the  function  on  the  bounds f(t1), f(t2).
0113   Standard_EXPORT void Interval (Standard_Real& t1, Standard_Real& t2, Standard_Real& f1, Standard_Real& f2) const;
0114 
0115 
0116 
0117 
0118 protected:
0119 
0120 
0121 
0122 
0123 
0124 private:
0125 
0126 
0127 
0128   Standard_Real myRoot;
0129   Standard_Integer myType;
0130   Standard_Real myLayerHeight;
0131   TopAbs_State myStateBefore;
0132   TopAbs_State myStateAfter;
0133   Standard_Real myt1;
0134   Standard_Real myt2;
0135   Standard_Real myf1;
0136   Standard_Real myf2;
0137 
0138 
0139 };
0140 
0141 
0142 
0143 
0144 
0145 
0146 
0147 #endif // _IntTools_Root_HeaderFile