1 -- Created on: 1992-04-03
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Transition from IntRes2d
19 inherits Storable from Standard
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.
31 uses Position from IntRes2d,
32 Situation from IntRes2d,
33 TypeTrans from IntRes2d
36 raises DomainError from Standard
42 ---Purpose: Empty constructor.
44 returns Transition from IntRes2d;
47 Create(Tangent: Boolean from Standard;
48 Pos : Position from IntRes2d;
49 Type : TypeTrans from IntRes2d)
51 ---Purpose: Creates an IN or OUT transition.
55 returns Transition from IntRes2d;
58 Create(Tangent: Boolean from Standard;
59 Pos : Position from IntRes2d;
60 Situ : Situation from IntRes2d;
61 Oppos : Boolean from Standard)
63 ---Purpose: Creates a TOUCH transition.
67 returns Transition from IntRes2d;
70 Create(Pos: Position from IntRes2d)
72 ---Purpose: Creates an UNDECIDED transition.
76 returns Transition from IntRes2d;
79 SetValue(me: in out; Tangent: Boolean from Standard;
80 Pos : Position from IntRes2d;
81 Type : TypeTrans from IntRes2d)
83 ---Purpose: Sets the values of an IN or OUT transition.
90 SetValue(me: in out; Tangent: Boolean from Standard;
91 Pos : Position from IntRes2d;
92 Situ : Situation from IntRes2d;
93 Oppos : Boolean from Standard)
95 ---Purpose: Sets the values of a TOUCH transition.
102 SetValue(me: in out; Pos: Position from IntRes2d)
104 ---Purpose: Sets the values of an UNDECIDED transition.
111 SetPosition(me: in out; Pos: Position from IntRes2d)
113 ---Purpose: Sets the value of the position.
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.
128 returns Position from IntRes2d
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.
141 returns TypeTrans from IntRes2d
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.
154 returns Boolean from Standard
155 raises DomainError from Standard
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.
172 returns Situation from IntRes2d
173 raises DomainError from Standard
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.
188 returns Boolean from Standard
189 raises DomainError from Standard
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;