1 -- Created on: 2000-05-22
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2000-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class Root from IntTools
18 ---Purpose: The class is to describe the root of
19 -- function of one variable for Edge/Edge
20 -- and Edge/Surface algorithms.
28 returns Root from IntTools ;
33 Create(aRoot: Real from Standard;
34 aType: Integer from Standard)
35 returns Root from IntTools ;
37 --- Initializes my by range of parameters
41 SetRoot (me:out; aRoot: Real from Standard);
43 --- Sets the Root's value
46 SetType (me:out; aType: Integer from Standard);
48 --- Sets the Root's Type
51 SetStateBefore (me:out; aState: State from TopAbs);
53 --- Set the value of the state before the root
57 SetStateAfter (me:out; aState: State from TopAbs);
59 --- Set the value of the state after the root
63 SetLayerHeight (me:out; aHeight:Real from Standard);
65 --- Not used in Edge/Edge algorithm
68 SetInterval (me:out; t1, t2, f1, f2:Real from Standard);
70 --- Sets the interval from which the Root was
71 --- found [t1,t2] and the corresponding values
72 --- of the function on the bounds f(t1), f(t2).
76 returns Real from Standard;
78 --- Returns the Root value
82 returns Integer from Standard;
84 --- Returns the type of the root
85 --- =0 - Simple (was found by bisection method);
86 --- =2 - Smart when f1=0, f2!=0 or vice versa
87 --- (was found by Fibbonacci method);
88 --- =1 - Pure (pure zero for all t [t1,t2] );
91 returns State from TopAbs;
93 --- Returns the state before the root
97 returns State from TopAbs;
99 --- Returns the state after the root
103 returns Real from Standard;
105 --- Not used in Edge/Edge algorithm
109 returns Boolean from Standard;
111 --- Returns the validity flag for the root,
113 --- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or
114 --- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or
115 --- myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or
116 --- myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT .
117 --- For other cases it returns False.
120 Interval (me; t1:out Real from Standard;
121 t2:out Real from Standard;
122 f1:out Real from Standard;
123 f2:out Real from Standard);
125 --- Returns the values of interval from which the Root was
126 --- found [t1,t2] and the corresponding values
127 --- of the function on the bounds f(t1), f(t2).
131 myRoot: Real from Standard;
133 myType: Integer from Standard;
135 myLayerHeight: Real from Standard;
136 myStateBefore: State from TopAbs;
137 myStateAfter : State from TopAbs;
139 myt1: Real from Standard;
140 myt2: Real from Standard;
141 myf1: Real from Standard;
142 myf2: Real from Standard;