1 // Created on: 1993-06-23
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 
18 #include <Standard_Type.hxx>
19 #include <TCollection_AsciiString.hxx>
20 #include <TopAbs.hxx>
21 #include <TopOpeBRepDS.hxx>
22 #include <TopOpeBRepDS_Interference.hxx>
23 #include <TopOpeBRepDS_Transition.hxx>
24 
IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Interference,Standard_Transient)25 IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Interference,Standard_Transient)
26 
27 //=======================================================================
28 //function : TopOpeBRepDS_Interference
29 //purpose  :
30 //=======================================================================
31 TopOpeBRepDS_Interference::TopOpeBRepDS_Interference()
32 {
33 }
34 
35 //=======================================================================
36 //function : TopOpeBRepDS_Interference
37 //purpose  :
38 //=======================================================================
39 
TopOpeBRepDS_Interference(const TopOpeBRepDS_Transition & T,const TopOpeBRepDS_Kind ST,const Standard_Integer S,const TopOpeBRepDS_Kind GT,const Standard_Integer G)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 
TopOpeBRepDS_Interference(const Handle (TopOpeBRepDS_Interference)& I)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 
Transition() const75 const TopOpeBRepDS_Transition& TopOpeBRepDS_Interference::Transition() const
76 {
77   return myTransition;
78 }
79 
80 
81 //=======================================================================
82 //function : ChangeTransition
83 //purpose  :
84 //=======================================================================
85 
ChangeTransition()86 TopOpeBRepDS_Transition&  TopOpeBRepDS_Interference::ChangeTransition()
87 {
88   return myTransition;
89 }
90 
91 //=======================================================================
92 //function : Transition
93 //purpose  :
94 //=======================================================================
95 
Transition(const TopOpeBRepDS_Transition & T)96 void  TopOpeBRepDS_Interference::Transition(const TopOpeBRepDS_Transition& T)
97 {
98   myTransition = T;
99 }
100 
101 //=======================================================================
102 //function : SupportType
103 //purpose  :
104 //=======================================================================
105 
GKGSKS(TopOpeBRepDS_Kind & GK,Standard_Integer & G,TopOpeBRepDS_Kind & SK,Standard_Integer & S) const106 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 
SupportType() const122 TopOpeBRepDS_Kind  TopOpeBRepDS_Interference::SupportType()const
123 {
124   return mySupportType;
125 }
126 
127 
128 //=======================================================================
129 //function : Support
130 //purpose  :
131 //=======================================================================
132 
Support() const133 Standard_Integer  TopOpeBRepDS_Interference::Support()const
134 {
135   return mySupport;
136 }
137 
138 
139 //=======================================================================
140 //function : GeometryType
141 //purpose  :
142 //=======================================================================
143 
GeometryType() const144 TopOpeBRepDS_Kind  TopOpeBRepDS_Interference::GeometryType()const
145 {
146   return myGeometryType;
147 }
148 
149 
150 //=======================================================================
151 //function : Geometry
152 //purpose  :
153 //=======================================================================
154 
Geometry() const155 Standard_Integer  TopOpeBRepDS_Interference::Geometry()const
156 {
157   return myGeometry;
158 }
159 
160 //=======================================================================
161 //function : SetGeometry
162 //purpose  :
163 //=======================================================================
164 
SetGeometry(const Standard_Integer GI)165 void TopOpeBRepDS_Interference::SetGeometry(const Standard_Integer GI)
166 {
167   myGeometry = GI;
168 }
169 
170 
171 //=======================================================================
172 //function : SupportType
173 //purpose  :
174 //=======================================================================
175 
SupportType(const TopOpeBRepDS_Kind ST)176 void  TopOpeBRepDS_Interference::SupportType(const TopOpeBRepDS_Kind ST)
177 {
178   mySupportType = ST;
179 }
180 
181 
182 //=======================================================================
183 //function : Support
184 //purpose  :
185 //=======================================================================
186 
Support(const Standard_Integer S)187 void  TopOpeBRepDS_Interference::Support(const Standard_Integer S)
188 {
189   mySupport = S;
190 }
191 
192 
193 //=======================================================================
194 //function : GeometryType
195 //purpose  :
196 //=======================================================================
197 
GeometryType(const TopOpeBRepDS_Kind GT)198 void  TopOpeBRepDS_Interference::GeometryType(const TopOpeBRepDS_Kind GT)
199 {
200   myGeometryType = GT;
201 }
202 
203 
204 //=======================================================================
205 //function : Geometry
206 //purpose  :
207 //=======================================================================
208 
Geometry(const Standard_Integer G)209 void  TopOpeBRepDS_Interference::Geometry(const Standard_Integer G)
210 {
211   myGeometry = G;
212 }
213 
214 //=======================================================================
215 //function : HasSameSupport
216 //purpose  :
217 //=======================================================================
218 
HasSameSupport(const Handle (TopOpeBRepDS_Interference)& I) const219 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 
HasSameGeometry(const Handle (TopOpeBRepDS_Interference)& I) const230 Standard_Boolean  TopOpeBRepDS_Interference::HasSameGeometry(const Handle(TopOpeBRepDS_Interference)& I)
231 const
232 {
233   return (myGeometryType == I->myGeometryType && myGeometry == I->myGeometry);
234 }
235