b311480e |
1 | // Created on: 1993-06-23 |
2 | // Created by: Jean Yves LEBEY |
3 | // Copyright (c) 1993-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 | |
42cf5bc1 |
17 | |
18 | #include <Standard_Type.hxx> |
7fd59977 |
19 | #include <TCollection_AsciiString.hxx> |
7fd59977 |
20 | #include <TopAbs.hxx> |
42cf5bc1 |
21 | #include <TopOpeBRepDS.hxx> |
22 | #include <TopOpeBRepDS_Interference.hxx> |
23 | #include <TopOpeBRepDS_Transition.hxx> |
7fd59977 |
24 | |
25e59720 |
25 | IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Interference,Standard_Transient) |
92efcf78 |
26 | |
7fd59977 |
27 | //======================================================================= |
28 | //function : TopOpeBRepDS_Interference |
29 | //purpose : |
30 | //======================================================================= |
7fd59977 |
31 | TopOpeBRepDS_Interference::TopOpeBRepDS_Interference() |
32 | { |
33 | } |
34 | |
35 | //======================================================================= |
36 | //function : TopOpeBRepDS_Interference |
37 | //purpose : |
38 | //======================================================================= |
39 | |
40 | TopOpeBRepDS_Interference::TopOpeBRepDS_Interference |
41 | (const TopOpeBRepDS_Transition& T, |
42 | const TopOpeBRepDS_Kind ST, |
43 | const Standard_Integer S, |
44 | const TopOpeBRepDS_Kind GT, |
45 | const Standard_Integer G) : |
46 | myTransition(T), |
47 | mySupport(S), |
48 | myGeometry(G), |
49 | mySupportType(ST), |
50 | myGeometryType(GT) |
51 | { |
52 | } |
53 | |
54 | //======================================================================= |
55 | //function : TopOpeBRepDS_Interference |
56 | //purpose : |
57 | //======================================================================= |
58 | |
59 | TopOpeBRepDS_Interference::TopOpeBRepDS_Interference |
60 | (const Handle(TopOpeBRepDS_Interference)& I ) : |
61 | myTransition(I->Transition()), |
62 | mySupport(I->Support()), |
63 | myGeometry(I->Geometry()), |
64 | mySupportType(I->SupportType()), |
65 | myGeometryType(I->GeometryType()) |
66 | { |
67 | } |
68 | |
69 | |
70 | //======================================================================= |
71 | //function : Transition |
72 | //purpose : |
73 | //======================================================================= |
74 | |
75 | const TopOpeBRepDS_Transition& TopOpeBRepDS_Interference::Transition() const |
76 | { |
77 | return myTransition; |
78 | } |
79 | |
80 | |
81 | //======================================================================= |
82 | //function : ChangeTransition |
83 | //purpose : |
84 | //======================================================================= |
85 | |
86 | TopOpeBRepDS_Transition& TopOpeBRepDS_Interference::ChangeTransition() |
87 | { |
88 | return myTransition; |
89 | } |
90 | |
91 | //======================================================================= |
92 | //function : Transition |
93 | //purpose : |
94 | //======================================================================= |
95 | |
96 | void TopOpeBRepDS_Interference::Transition(const TopOpeBRepDS_Transition& T) |
97 | { |
98 | myTransition = T; |
99 | } |
100 | |
101 | //======================================================================= |
102 | //function : SupportType |
103 | //purpose : |
104 | //======================================================================= |
105 | |
106 | void TopOpeBRepDS_Interference::GKGSKS(TopOpeBRepDS_Kind& GK, |
107 | Standard_Integer& G, |
108 | TopOpeBRepDS_Kind& SK, |
109 | Standard_Integer& S) const |
110 | { |
111 | GK = myGeometryType; |
112 | G = myGeometry; |
113 | SK = mySupportType; |
114 | S = mySupport; |
115 | } |
116 | |
117 | //======================================================================= |
118 | //function : SupportType |
119 | //purpose : |
120 | //======================================================================= |
121 | |
122 | TopOpeBRepDS_Kind TopOpeBRepDS_Interference::SupportType()const |
123 | { |
124 | return mySupportType; |
125 | } |
126 | |
127 | |
128 | //======================================================================= |
129 | //function : Support |
130 | //purpose : |
131 | //======================================================================= |
132 | |
133 | Standard_Integer TopOpeBRepDS_Interference::Support()const |
134 | { |
135 | return mySupport; |
136 | } |
137 | |
138 | |
139 | //======================================================================= |
140 | //function : GeometryType |
141 | //purpose : |
142 | //======================================================================= |
143 | |
144 | TopOpeBRepDS_Kind TopOpeBRepDS_Interference::GeometryType()const |
145 | { |
146 | return myGeometryType; |
147 | } |
148 | |
149 | |
150 | //======================================================================= |
151 | //function : Geometry |
152 | //purpose : |
153 | //======================================================================= |
154 | |
155 | Standard_Integer TopOpeBRepDS_Interference::Geometry()const |
156 | { |
157 | return myGeometry; |
158 | } |
159 | |
160 | //======================================================================= |
161 | //function : SetGeometry |
162 | //purpose : |
163 | //======================================================================= |
164 | |
165 | void TopOpeBRepDS_Interference::SetGeometry(const Standard_Integer GI) |
166 | { |
167 | myGeometry = GI; |
168 | } |
169 | |
170 | |
171 | //======================================================================= |
172 | //function : SupportType |
173 | //purpose : |
174 | //======================================================================= |
175 | |
176 | void TopOpeBRepDS_Interference::SupportType(const TopOpeBRepDS_Kind ST) |
177 | { |
178 | mySupportType = ST; |
179 | } |
180 | |
181 | |
182 | //======================================================================= |
183 | //function : Support |
184 | //purpose : |
185 | //======================================================================= |
186 | |
187 | void TopOpeBRepDS_Interference::Support(const Standard_Integer S) |
188 | { |
189 | mySupport = S; |
190 | } |
191 | |
192 | |
193 | //======================================================================= |
194 | //function : GeometryType |
195 | //purpose : |
196 | //======================================================================= |
197 | |
198 | void TopOpeBRepDS_Interference::GeometryType(const TopOpeBRepDS_Kind GT) |
199 | { |
200 | myGeometryType = GT; |
201 | } |
202 | |
203 | |
204 | //======================================================================= |
205 | //function : Geometry |
206 | //purpose : |
207 | //======================================================================= |
208 | |
209 | void TopOpeBRepDS_Interference::Geometry(const Standard_Integer G) |
210 | { |
211 | myGeometry = G; |
212 | } |
213 | |
214 | //======================================================================= |
215 | //function : HasSameSupport |
216 | //purpose : |
217 | //======================================================================= |
218 | |
219 | Standard_Boolean TopOpeBRepDS_Interference::HasSameSupport(const Handle(TopOpeBRepDS_Interference)& I) |
220 | const |
221 | { |
222 | return (mySupportType == I->mySupportType && mySupport == I->mySupport); |
223 | } |
224 | |
225 | //======================================================================= |
226 | //function : HasSameGeometry |
227 | //purpose : |
228 | //======================================================================= |
229 | |
230 | Standard_Boolean TopOpeBRepDS_Interference::HasSameGeometry(const Handle(TopOpeBRepDS_Interference)& I) |
231 | const |
232 | { |
233 | return (myGeometryType == I->myGeometryType && myGeometry == I->myGeometry); |
234 | } |