1 -- Created on: 1992-04-03
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class Transition from IntRes2d
25 inherits Storable from Standard
27 ---Purpose: Definition of the type of transition near an
28 -- intersection point between two curves. The transition
29 -- is either a "true transition", which means that one of
30 -- the curves goes inside or outside the area defined by
31 -- the other curve near the intersection, or a "touch
32 -- transition" which means that the first curve does not
33 -- cross the other one, or an "undecided" transition,
34 -- which means that the curves are superposed.
37 uses Position from IntRes2d,
38 Situation from IntRes2d,
39 TypeTrans from IntRes2d
42 raises DomainError from Standard
48 ---Purpose: Empty constructor.
50 returns Transition from IntRes2d;
53 Create(Tangent: Boolean from Standard;
54 Pos : Position from IntRes2d;
55 Type : TypeTrans from IntRes2d)
57 ---Purpose: Creates an IN or OUT transition.
61 returns Transition from IntRes2d;
64 Create(Tangent: Boolean from Standard;
65 Pos : Position from IntRes2d;
66 Situ : Situation from IntRes2d;
67 Oppos : Boolean from Standard)
69 ---Purpose: Creates a TOUCH transition.
73 returns Transition from IntRes2d;
76 Create(Pos: Position from IntRes2d)
78 ---Purpose: Creates an UNDECIDED transition.
82 returns Transition from IntRes2d;
85 SetValue(me: in out; Tangent: Boolean from Standard;
86 Pos : Position from IntRes2d;
87 Type : TypeTrans from IntRes2d)
89 ---Purpose: Sets the values of an IN or OUT transition.
96 SetValue(me: in out; Tangent: Boolean from Standard;
97 Pos : Position from IntRes2d;
98 Situ : Situation from IntRes2d;
99 Oppos : Boolean from Standard)
101 ---Purpose: Sets the values of a TOUCH transition.
108 SetValue(me: in out; Pos: Position from IntRes2d)
110 ---Purpose: Sets the values of an UNDECIDED transition.
117 SetPosition(me: in out; Pos: Position from IntRes2d)
119 ---Purpose: Sets the value of the position.
128 ---Purpose: Indicates if the intersection is at the beginning
129 -- (IntRes2d_Head), at the end (IntRes2d_End), or in
130 -- the middle (IntRes2d_Middle) of the curve.
134 returns Position from IntRes2d
140 ---Purpose: Returns the type of transition at the intersection.
141 -- It may be IN or OUT or TOUCH, or UNDECIDED if the
142 -- two first derivatives are not enough to give
143 -- the tangent to one of the two curves.
147 returns TypeTrans from IntRes2d
153 ---Purpose: Returns TRUE when the 2 curves are tangent at the
154 -- intersection point.
155 -- Theexception DomainError is raised if the type of
156 -- transition is UNDECIDED.
160 returns Boolean from Standard
161 raises DomainError from Standard
167 ---Purpose: returns a significant value if TransitionType returns
168 -- TOUCH. In this case, the function returns :
169 -- INSIDE when the curve remains inside the other one,
170 -- OUTSIDE when it remains outside the other one,
171 -- UNKNOWN when the calculus, based on the second derivatives
172 -- cannot give the result.
173 -- If TransitionType returns IN or OUT or UNDECIDED, the
174 -- exception DomainError is raised.
178 returns Situation from IntRes2d
179 raises DomainError from Standard
185 ---Purpose: returns a significant value if TransitionType
186 -- returns TOUCH. In this case, the function returns
187 -- true when the 2 curves locally define two
188 -- different parts of the space. If TransitionType
189 -- returns IN or OUT or UNDECIDED, the exception
190 -- DomainError is raised.
194 returns Boolean from Standard
195 raises DomainError from Standard
201 tangent : Boolean from Standard;
202 posit : Position from IntRes2d;
203 typetra : TypeTrans from IntRes2d;
204 situat : Situation from IntRes2d;
205 oppos : Boolean from Standard;