b311480e |
1 | -- Created on: 1991-12-13 |
2 | -- Created by: Christophe MARION |
3 | -- Copyright (c) 1991-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Interval from Intrv |
18 | ---Purpose: |
19 | -- **-----------**** Other |
20 | -- ***---* IsBefore |
21 | -- ***----------* IsJustBefore |
22 | -- ***---------------* IsOverlappingAtStart |
23 | -- ***------------------------* IsJustEnclosingAtEnd |
24 | -- ***-----------------------------------* IsEnclosing |
25 | -- ***----* IsJustOverlappingAtStart |
26 | -- ***-------------* IsSimilar |
27 | -- ***------------------------* IsJustEnclosingAtStart |
28 | -- ***-* IsInside |
29 | -- ***------* IsJustOverlappingAtEnd |
30 | -- ***-----------------* IsOverlappingAtEnd |
31 | -- ***--------* IsJustAfter |
32 | -- ***---* IsAfter |
33 | |
34 | |
35 | uses |
36 | Real from Standard, |
37 | ShortReal from Standard, |
38 | Integer from Standard, |
39 | Position from Intrv |
40 | |
41 | is |
42 | Create returns Interval from Intrv; |
43 | |
44 | Create(Start, End : Real from Standard) returns Interval from Intrv; |
45 | |
46 | Create(Start : Real from Standard; |
47 | TolStart : ShortReal from Standard; |
48 | End : Real from Standard; |
49 | TolEnd : ShortReal from Standard) |
50 | returns Interval from Intrv; |
51 | |
52 | Start(me) returns Real from Standard |
53 | ---C++: inline |
54 | is static; |
55 | |
56 | End(me) returns Real from Standard |
57 | ---C++: inline |
58 | is static; |
59 | |
60 | TolStart(me) returns ShortReal from Standard |
61 | ---C++: inline |
62 | is static; |
63 | |
64 | TolEnd(me) returns ShortReal from Standard |
65 | ---C++: inline |
66 | is static; |
67 | |
68 | Bounds(me; Start : out Real from Standard; |
69 | TolStart : out ShortReal from Standard; |
70 | End : out Real from Standard; |
71 | TolEnd : out ShortReal from Standard) |
72 | ---C++: inline |
73 | is static; |
74 | |
75 | SetStart(me : in out; Start : Real from Standard; |
76 | TolStart : ShortReal from Standard) |
77 | ---C++: inline |
78 | is static; |
79 | |
80 | FuseAtStart(me : in out; Start : Real from Standard; |
81 | TolStart : ShortReal from Standard) |
82 | ---C++: inline |
83 | ---Purpose: |
84 | -- ****+****--------------------> Old one |
85 | -- ****+****------------------------> New one to fuse |
86 | -- <<< <<< |
87 | -- ****+****------------------------> result |
88 | is static; |
89 | |
90 | CutAtStart(me : in out; Start : Real from Standard; |
91 | TolStart : ShortReal from Standard) |
92 | ---C++: inline |
93 | ---Purpose: |
94 | -- ****+****-----------> Old one |
95 | -- <----------**+** Tool for cutting |
96 | -- >>> >>> |
97 | -- ****+****-----------> result |
98 | is static; |
99 | |
100 | SetEnd(me : in out; End : Real from Standard; |
101 | TolEnd : ShortReal from Standard) |
102 | ---C++: inline |
103 | is static; |
104 | |
105 | FuseAtEnd(me : in out; End : Real from Standard; |
106 | TolEnd : ShortReal from Standard) |
107 | ---C++: inline |
108 | ---Purpose: |
109 | -- <---------------------****+**** Old one |
110 | -- <-----------------**+** New one to fuse |
111 | -- >>> >>> |
112 | -- <---------------------****+**** result |
113 | is static; |
114 | |
115 | CutAtEnd(me : in out; End : Real from Standard; |
116 | TolEnd : ShortReal from Standard) |
117 | ---C++: inline |
118 | ---Purpose: |
119 | -- <-----****+**** Old one |
120 | -- **+**------> Tool for cutting |
121 | -- <<< <<< |
122 | -- <-----****+**** result |
123 | is static; |
124 | |
125 | IsProbablyEmpty(me) returns Boolean from Standard |
126 | ---C++: inline |
127 | ---Purpose: True if myStart+myTolStart > myEnd-myTolEnd |
128 | -- or if myEnd+myTolEnd > myStart-myTolStart |
129 | is static; |
130 | |
131 | Position(me; Other : Interval from Intrv) returns Position from Intrv |
132 | ---Purpose: True if me is Before Other |
133 | -- **-----------**** Other |
134 | -- ***-----* Before |
135 | -- ***------------* JustBefore |
136 | -- ***-----------------* OverlappingAtStart |
137 | -- ***--------------------------* JustEnclosingAtEnd |
138 | -- ***-------------------------------------* Enclosing |
139 | -- ***----* JustOverlappingAtStart |
140 | -- ***-------------* Similar |
141 | -- ***------------------------* JustEnclosingAtStart |
142 | -- ***-* Inside |
143 | -- ***------* JustOverlappingAtEnd |
144 | -- ***-----------------* OverlappingAtEnd |
145 | -- ***--------* JustAfter |
146 | -- ***---* After |
147 | is static; |
148 | |
149 | IsBefore(me; Other : Interval from Intrv) returns Boolean from Standard |
150 | ---C++: inline |
151 | ---Purpose: True if me is Before Other |
152 | -- ***----------------** me |
153 | -- **-----------**** Other |
154 | is static; |
155 | |
156 | IsAfter(me; Other : Interval from Intrv) returns Boolean from Standard |
157 | ---C++: inline |
158 | ---Purpose: True if me is After Other |
159 | -- **-----------**** me |
160 | -- ***----------------** Other |
161 | is static; |
162 | |
163 | IsInside(me; Other : Interval from Intrv) returns Boolean from Standard |
164 | ---C++: inline |
165 | ---Purpose: True if me is Inside Other |
166 | -- **-----------**** me |
167 | -- ***--------------------------** Other |
168 | is static; |
169 | |
170 | IsEnclosing(me; Other : Interval from Intrv) returns Boolean from Standard |
171 | ---C++: inline |
172 | ---Purpose: True if me is Enclosing Other |
173 | -- ***----------------------------**** me |
174 | -- ***------------------** Other |
175 | is static; |
176 | |
177 | IsJustEnclosingAtStart(me; Other : Interval from Intrv) |
178 | returns Boolean from Standard |
179 | ---C++: inline |
180 | ---Purpose: True if me is just Enclosing Other at start |
181 | -- ***---------------------------**** me |
182 | -- ***------------------** Other |
183 | is static; |
184 | |
185 | IsJustEnclosingAtEnd(me; Other : Interval from Intrv) |
186 | returns Boolean from Standard |
187 | ---C++: inline |
188 | ---Purpose: True if me is just Enclosing Other at End |
189 | -- ***----------------------------**** me |
190 | -- ***-----------------**** Other |
191 | is static; |
192 | |
193 | IsJustBefore(me; Other : Interval from Intrv) returns Boolean from Standard |
194 | ---C++: inline |
195 | ---Purpose: True if me is just before Other |
196 | -- ***--------**** me |
197 | -- ***-----------** Other |
198 | is static; |
199 | |
200 | IsJustAfter(me; Other : Interval from Intrv) returns Boolean from Standard |
201 | ---C++: inline |
202 | ---Purpose: True if me is just after Other |
203 | -- ****-------**** me |
204 | -- ***-----------** Other |
205 | is static; |
206 | |
207 | IsOverlappingAtStart(me; Other : Interval from Intrv) |
208 | returns Boolean from Standard |
209 | ---C++: inline |
210 | ---Purpose: True if me is overlapping Other at start |
211 | -- ***---------------*** me |
212 | -- ***-----------** Other |
213 | is static; |
214 | |
215 | IsOverlappingAtEnd(me; Other : Interval from Intrv) |
216 | returns Boolean from Standard |
217 | ---C++: inline |
218 | ---Purpose: True if me is overlapping Other at end |
219 | -- ***-----------** me |
220 | -- ***---------------*** Other |
221 | is static; |
222 | |
223 | IsJustOverlappingAtStart(me; Other : Interval from Intrv) |
224 | returns Boolean from Standard |
225 | ---C++: inline |
226 | ---Purpose: True if me is just overlapping Other at start |
227 | -- ***-----------*** me |
228 | -- ***------------------------** Other |
229 | is static; |
230 | |
231 | IsJustOverlappingAtEnd(me; Other : Interval from Intrv) |
232 | returns Boolean from Standard |
233 | ---C++: inline |
234 | ---Purpose: True if me is just overlapping Other at end |
235 | -- ***-----------* me |
236 | -- ***------------------------** Other |
237 | is static; |
238 | |
239 | IsSimilar(me; Other : Interval from Intrv) returns Boolean from Standard |
240 | ---C++: inline |
241 | ---Purpose: True if me and Other have the same bounds |
242 | -- *----------------*** me |
243 | -- ***-----------------** Other |
244 | is static; |
245 | |
246 | fields |
247 | myStart : Real from Standard; |
248 | myEnd : Real from Standard; |
249 | myTolStart : ShortReal from Standard; |
250 | myTolEnd : ShortReal from Standard; |
251 | |
252 | end; |