b311480e |
1 | -- Created on: 1994-05-26 |
2 | -- Created by: Jean Yves LEBEY |
3 | -- Copyright (c) 1994-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 TopOpeBRepDS |
18 | |
19 | uses |
20 | |
21 | State from TopAbs, |
22 | Orientation from TopAbs, |
23 | ShapeEnum from TopAbs, |
24 | OStream from Standard |
25 | |
26 | is |
27 | |
28 | Create returns Transition from TopOpeBRepDS; |
29 | |
30 | Create(StateBefore,StateAfter : State from TopAbs; |
31 | ShapeBefore : ShapeEnum from TopAbs = TopAbs_FACE; |
32 | ShapeAfter : ShapeEnum from TopAbs = TopAbs_FACE) |
33 | returns Transition from TopOpeBRepDS; |
34 | |
35 | Create(O : Orientation from TopAbs) |
36 | returns Transition from TopOpeBRepDS; |
37 | |
38 | Set(me : in out; |
39 | StateBefore, StateAfter : State from TopAbs; |
40 | ShapeBefore : ShapeEnum from TopAbs = TopAbs_FACE; |
41 | ShapeAfter : ShapeEnum from TopAbs = TopAbs_FACE); |
42 | |
43 | StateBefore(me : in out; S : State from TopAbs); |
44 | StateAfter(me : in out; S : State from TopAbs); |
45 | ShapeBefore(me : in out; SE : ShapeEnum from TopAbs); |
46 | ShapeAfter(me : in out; SE : ShapeEnum from TopAbs); |
47 | Before(me : in out; S : State from TopAbs;ShapeBefore : ShapeEnum from TopAbs = TopAbs_FACE); |
48 | After(me : in out; S : State from TopAbs;ShapeAfter : ShapeEnum from TopAbs = TopAbs_FACE); |
49 | |
50 | Index(me : in out; I : Integer); |
51 | IndexBefore(me : in out; I : Integer); |
52 | IndexAfter(me : in out; I : Integer); |
53 | |
54 | Before(me) returns State from TopAbs; |
55 | ONBefore(me) returns ShapeEnum from TopAbs; |
56 | After(me) returns State from TopAbs; |
57 | ONAfter(me) returns ShapeEnum from TopAbs; |
58 | ShapeBefore(me) returns ShapeEnum from TopAbs; |
59 | ShapeAfter(me) returns ShapeEnum from TopAbs; |
60 | Index(me) returns Integer; -- index of ShapeBefore (may be null) |
61 | IndexBefore(me) returns Integer; -- index of ShapeBefore (may be null) |
62 | IndexAfter(me) returns Integer; -- index of ShapeAfter (may be null) |
63 | |
64 | Set(me : in out; O : Orientation from TopAbs); |
65 | ---Purpose: set the transition corresponding to orientation <O> |
66 | -- |
67 | -- O Before After |
68 | -- |
69 | -- FORWARD OUT IN |
70 | -- REVERSED IN OUT |
71 | -- INTERNAL IN IN |
72 | -- EXTERNAL OUT OUT |
73 | -- |
74 | |
75 | Orientation(me; S : State from TopAbs; |
76 | T : ShapeEnum from TopAbs = TopAbs_FACE) |
77 | |
78 | ---Purpose: returns the orientation corresponding to state <S> |
79 | -- |
80 | -- Before and After not equal TopAbs_ON : |
81 | -- -------------------------------------- |
82 | -- Before After Computed orientation |
83 | -- |
84 | -- S not S REVERSED (we leave state S) |
85 | -- not S S FORWARD (we enter state S) |
86 | -- S S INTERNAL (we stay in state S) |
87 | -- not S not S EXTERNAL (we stay outside state S) |
88 | returns Orientation from TopAbs; |
89 | |
90 | OrientationON(me; S : State from TopAbs; |
91 | T : ShapeEnum from TopAbs) |
92 | |
93 | ---Purpose: returns the orientation corresponding to state <S> |
94 | -- (if one at least of the internal states is ON) |
95 | returns Orientation from TopAbs |
96 | is static private; |
97 | |
98 | Complement(me) returns Transition from TopOpeBRepDS; |
99 | |
100 | IsUnknown(me) returns Boolean from Standard; |
101 | ---Purpose: returns True if both states are UNKNOWN |
102 | |
103 | DumpA(me; OS : in out OStream from Standard) returns OStream; |
104 | ---C++: return & |
105 | |
106 | DumpB(me; OS : in out OStream from Standard) returns OStream; |
107 | ---C++: return & |
108 | |
109 | Dump(me; OS : in out OStream from Standard) returns OStream; |
110 | ---C++: return & |
111 | |
112 | fields |
113 | |
114 | myStateBefore, myStateAfter : State from TopAbs; |
115 | myShapeBefore, myShapeAfter : ShapeEnum from TopAbs; |
116 | myIndexBefore, myIndexAfter : Integer from Standard; |
117 | |
118 | end Transition from TopOpeBRepDS; |