b311480e |
1 | -- Created on: 1992-04-03 |
2 | -- Created by: Laurent BUCHARD |
3 | -- Copyright (c) 1992-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 Transition from IntRes2d |
18 | |
19 | inherits Storable from Standard |
20 | |
21 | ---Purpose: Definition of the type of transition near an |
22 | -- intersection point between two curves. The transition |
23 | -- is either a "true transition", which means that one of |
24 | -- the curves goes inside or outside the area defined by |
25 | -- the other curve near the intersection, or a "touch |
26 | -- transition" which means that the first curve does not |
27 | -- cross the other one, or an "undecided" transition, |
28 | -- which means that the curves are superposed. |
29 | |
30 | |
31 | uses Position from IntRes2d, |
32 | Situation from IntRes2d, |
33 | TypeTrans from IntRes2d |
34 | |
35 | |
36 | raises DomainError from Standard |
37 | |
38 | is |
39 | |
40 | Create |
41 | |
42 | ---Purpose: Empty constructor. |
43 | |
44 | returns Transition from IntRes2d; |
45 | |
46 | |
47 | Create(Tangent: Boolean from Standard; |
48 | Pos : Position from IntRes2d; |
49 | Type : TypeTrans from IntRes2d) |
50 | |
51 | ---Purpose: Creates an IN or OUT transition. |
52 | |
53 | ---C++: inline |
54 | |
55 | returns Transition from IntRes2d; |
56 | |
57 | |
58 | Create(Tangent: Boolean from Standard; |
59 | Pos : Position from IntRes2d; |
60 | Situ : Situation from IntRes2d; |
61 | Oppos : Boolean from Standard) |
62 | |
63 | ---Purpose: Creates a TOUCH transition. |
64 | |
65 | ---C++: inline |
66 | |
67 | returns Transition from IntRes2d; |
68 | |
69 | |
70 | Create(Pos: Position from IntRes2d) |
71 | |
72 | ---Purpose: Creates an UNDECIDED transition. |
73 | |
74 | ---C++: inline |
75 | |
76 | returns Transition from IntRes2d; |
77 | |
78 | |
79 | SetValue(me: in out; Tangent: Boolean from Standard; |
80 | Pos : Position from IntRes2d; |
81 | Type : TypeTrans from IntRes2d) |
82 | |
83 | ---Purpose: Sets the values of an IN or OUT transition. |
84 | |
85 | ---C++: inline |
86 | |
87 | is static; |
88 | |
89 | |
90 | SetValue(me: in out; Tangent: Boolean from Standard; |
91 | Pos : Position from IntRes2d; |
92 | Situ : Situation from IntRes2d; |
93 | Oppos : Boolean from Standard) |
94 | |
95 | ---Purpose: Sets the values of a TOUCH transition. |
96 | |
97 | ---C++: inline |
98 | |
99 | is static; |
100 | |
101 | |
102 | SetValue(me: in out; Pos: Position from IntRes2d) |
103 | |
104 | ---Purpose: Sets the values of an UNDECIDED transition. |
105 | |
106 | ---C++: inline |
107 | |
108 | is static; |
109 | |
110 | |
111 | SetPosition(me: in out; Pos: Position from IntRes2d) |
112 | |
113 | ---Purpose: Sets the value of the position. |
114 | |
115 | ---C++: inline |
116 | |
117 | is static; |
118 | |
119 | |
120 | PositionOnCurve(me) |
121 | |
122 | ---Purpose: Indicates if the intersection is at the beginning |
123 | -- (IntRes2d_Head), at the end (IntRes2d_End), or in |
124 | -- the middle (IntRes2d_Middle) of the curve. |
125 | |
126 | ---C++: inline |
127 | |
128 | returns Position from IntRes2d |
129 | is static; |
130 | |
131 | |
132 | TransitionType(me) |
133 | |
134 | ---Purpose: Returns the type of transition at the intersection. |
135 | -- It may be IN or OUT or TOUCH, or UNDECIDED if the |
136 | -- two first derivatives are not enough to give |
137 | -- the tangent to one of the two curves. |
138 | |
139 | ---C++: inline |
140 | |
141 | returns TypeTrans from IntRes2d |
142 | is static; |
143 | |
144 | |
145 | IsTangent(me) |
146 | |
147 | ---Purpose: Returns TRUE when the 2 curves are tangent at the |
148 | -- intersection point. |
149 | -- Theexception DomainError is raised if the type of |
150 | -- transition is UNDECIDED. |
151 | |
152 | ---C++: inline |
153 | |
154 | returns Boolean from Standard |
155 | raises DomainError from Standard |
156 | is static; |
157 | |
158 | |
159 | Situation(me) |
160 | |
161 | ---Purpose: returns a significant value if TransitionType returns |
162 | -- TOUCH. In this case, the function returns : |
163 | -- INSIDE when the curve remains inside the other one, |
164 | -- OUTSIDE when it remains outside the other one, |
165 | -- UNKNOWN when the calculus, based on the second derivatives |
166 | -- cannot give the result. |
167 | -- If TransitionType returns IN or OUT or UNDECIDED, the |
168 | -- exception DomainError is raised. |
169 | |
170 | ---C++: inline |
171 | |
172 | returns Situation from IntRes2d |
173 | raises DomainError from Standard |
174 | is static; |
175 | |
176 | |
177 | IsOpposite(me) |
178 | |
179 | ---Purpose: returns a significant value if TransitionType |
180 | -- returns TOUCH. In this case, the function returns |
181 | -- true when the 2 curves locally define two |
182 | -- different parts of the space. If TransitionType |
183 | -- returns IN or OUT or UNDECIDED, the exception |
184 | -- DomainError is raised. |
185 | |
186 | ---C++: inline |
187 | |
188 | returns Boolean from Standard |
189 | raises DomainError from Standard |
190 | is static; |
191 | |
192 | |
193 | fields |
194 | |
195 | tangent : Boolean from Standard; |
196 | posit : Position from IntRes2d; |
197 | typetra : TypeTrans from IntRes2d; |
198 | situat : Situation from IntRes2d; |
199 | oppos : Boolean from Standard; |
200 | |
201 | end Transition; |