1 -- Created on: 2000-05-22
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
22 class Root from IntTools
24 ---Purpose: The class is to describe the root of
25 -- function of one variable for Edge/Edge
26 -- and Edge/Surface algorithms.
34 returns Root from IntTools ;
39 Create(aRoot: Real from Standard;
40 aType: Integer from Standard)
41 returns Root from IntTools ;
43 --- Initializes my by range of parameters
47 SetRoot (me:out; aRoot: Real from Standard);
49 --- Sets the Root's value
52 SetType (me:out; aType: Integer from Standard);
54 --- Sets the Root's Type
57 SetStateBefore (me:out; aState: State from TopAbs);
59 --- Set the value of the state before the root
63 SetStateAfter (me:out; aState: State from TopAbs);
65 --- Set the value of the state after the root
69 SetLayerHeight (me:out; aHeight:Real from Standard);
71 --- Not used in Edge/Edge algorithm
74 SetInterval (me:out; t1, t2, f1, f2:Real from Standard);
76 --- Sets the interval from which the Root was
77 --- found [t1,t2] and the corresponding values
78 --- of the function on the bounds f(t1), f(t2).
82 returns Real from Standard;
84 --- Returns the Root value
88 returns Integer from Standard;
90 --- Returns the type of the root
91 --- =0 - Simple (was found by bisection method);
92 --- =2 - Smart when f1=0, f2!=0 or vice versa
93 --- (was found by Fibbonacci method);
94 --- =1 - Pure (pure zero for all t [t1,t2] );
97 returns State from TopAbs;
99 --- Returns the state before the root
103 returns State from TopAbs;
105 --- Returns the state after the root
109 returns Real from Standard;
111 --- Not used in Edge/Edge algorithm
115 returns Boolean from Standard;
117 --- Returns the validity flag for the root,
119 --- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or
120 --- myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or
121 --- myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or
122 --- myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT .
123 --- For other cases it returns False.
126 Interval (me; t1:out Real from Standard;
127 t2:out Real from Standard;
128 f1:out Real from Standard;
129 f2:out Real from Standard);
131 --- Returns the values of interval from which the Root was
132 --- found [t1,t2] and the corresponding values
133 --- of the function on the bounds f(t1), f(t2).
137 myRoot: Real from Standard;
139 myType: Integer from Standard;
141 myLayerHeight: Real from Standard;
142 myStateBefore: State from TopAbs;
143 myStateAfter : State from TopAbs;
145 myt1: Real from Standard;
146 myt2: Real from Standard;
147 myf1: Real from Standard;
148 myf2: Real from Standard;