0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
[occt.git] / src / TopOpeBRep / TopOpeBRep_EdgesFiller.cxx
1 // Created on: 1994-10-12
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
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.
10 //
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.
13 //
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.
20
21
22 #include <TopOpeBRep_EdgesFiller.ixx>
23 #include <TopOpeBRep_PointGeomTool.hxx>
24 #include <TopOpeBRep_Point2d.hxx>
25
26 #include <TopOpeBRepDS_Transition.hxx>
27 #include <TopOpeBRepDS_Config.hxx>
28 #include <TopOpeBRepDS_Point.hxx>
29 #include <TopOpeBRepDS_EXPORT.hxx>
30 #include <TopOpeBRepDS_TKI.hxx>
31 #include <TopOpeBRepDS_InterferenceTool.hxx>
32 #include <TopOpeBRepTool_EXPORT.hxx>
33 #include <TopOpeBRepDS.hxx>
34 #include <BRep_Tool.hxx>
35 #include <TopoDS.hxx>
36
37 #include <TopOpeBRep_define.hxx>
38
39 #ifdef DEB
40 #include <TopOpeBRepDS_reDEB.hxx>
41 extern Standard_Boolean TopOpeBRepDS_GettraceEDSF();
42 extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
43 extern Standard_Boolean TopOpeBRep_GettraceEEFF();
44 Standard_EXPORT void debefre(const Standard_Integer IE) {cout<<"+++ debefre E"<<IE<<endl;}
45 Standard_EXPORT void debposesd(void) {/*cout<<"+++ debposesd"<<endl;*/}
46 Standard_EXPORT void debposnesd(void) {cout<<"+++ debposnesd"<<endl;}
47 Standard_EXPORT void debeeff() {}
48 #endif
49
50 #define M_REVERSED(O) (O == TopAbs_REVERSED)
51 #define M_FORWARD( O) (O == TopAbs_FORWARD)
52 #define M_INTERNAL(O) (O == TopAbs_INTERNAL)
53 #define M_EXTERNAL(O) (O == TopAbs_EXTERNAL)
54
55 //=======================================================================
56 //function : TopOpeBRep_EdgesFiller
57 //purpose  : 
58 //=======================================================================
59 TopOpeBRep_EdgesFiller::TopOpeBRep_EdgesFiller() : myPDS(NULL),myPEI(NULL) {}
60
61 void rototo() {}
62
63 //=======================================================================
64 //function : Insert
65 //purpose  : 
66 //=======================================================================
67 void TopOpeBRep_EdgesFiller::Insert(const TopoDS_Shape& E1,const TopoDS_Shape& E2,TopOpeBRep_EdgesIntersector& EDGINT,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
68 {
69   myPEI = &EDGINT;
70   myPDS = &(HDS->ChangeDS());
71   myE1 = TopoDS::Edge(E1);
72   myE2 = TopoDS::Edge(E2);
73   myLI1.Clear();
74   myLI2.Clear();
75   myHDS = HDS;
76  
77 #ifdef DEB
78   Standard_Boolean trc = TopOpeBRepDS_GettraceDSF();
79   trc = trc || TopOpeBRepDS_GettraceEDSF();
80   trc = trc || TopOpeBRep_GettraceEEFF();
81   if (trc) {
82     if (TopOpeBRep_GettraceEEFF()) debeeff();
83     TCollection_AsciiString str="EdgesFiller dim";str=str+myPEI->Dimension();
84     myPEI->Dump(str,myPDS->Shape(myE1),myPDS->Shape(myE2));
85   }
86 #endif
87   Standard_Boolean esd = myPEI->SameDomain();
88   if (esd) myPDS->FillShapesSameDomain(E1,E2);
89   
90   // exit if no point.
91   myPEI->InitPoint(); if ( !myPEI->MorePoint() ) return;
92
93   // --- Add <E1,E2> in BDS
94   Standard_Integer E1index = myPDS->AddShape(E1,1);
95   Standard_Integer E2index = myPDS->AddShape(E2,2);
96   
97   // --- get list of interferences connected to edges <E1>,<E2>
98   TopOpeBRepDS_ListOfInterference& EIL1 = myPDS->ChangeShapeInterferences(E1);
99   
100   Handle(TopOpeBRepDS_Interference) EPI;  //edge/point interference
101   Handle(TopOpeBRepDS_Interference) EVI;  //edge/vertex interference
102   
103 //  TopOpeBRepDS_Transition TposF,TposL;
104
105   for (; myPEI->MorePoint(); myPEI->NextPoint() ) {
106     const TopOpeBRep_Point2d P2D = myPEI->Point();
107     Standard_Real par1 = P2D.Parameter(1);
108     Standard_Real par2 = P2D.Parameter(2);
109     Standard_Integer if1 = 0; if ( ! myF1.IsNull() ) if1 = myPDS->AddShape(myF1,1);
110     Standard_Integer if2 = 0; if ( ! myF2.IsNull() ) if2 = myPDS->AddShape(myF2,2);
111
112 #ifdef DEB
113     Standard_Boolean pointofsegment = P2D.IsPointOfSegment();
114 #endif
115
116 #ifdef DEB
117     if (trc) {
118       if      (pointofsegment &&  esd) debposesd();
119       else if (pointofsegment && !esd) debposnesd();
120     }
121 #endif
122
123     TopOpeBRepDS_Transition T1 = P2D.Transition(1);
124     TopOpeBRepDS_Transition T2 = P2D.Transition(2);
125     
126     SetShapeTransition(P2D,T1,T2);
127     
128     Standard_Boolean isvertex1 = P2D.IsVertex(1);
129     TopoDS_Vertex V1; if (isvertex1) V1 = P2D.Vertex(1);
130     Standard_Boolean isvertex2 = P2D.IsVertex(2);
131     TopoDS_Vertex V2; if (isvertex2) V2 = P2D.Vertex(2);
132     Standard_Boolean isvertex = isvertex1 || isvertex2;
133
134 #ifdef DEB
135     if (isvertex1 && isvertex2) {
136       gp_Pnt P3D1 = BRep_Tool::Pnt(V1);
137       gp_Pnt P3D2 = BRep_Tool::Pnt(V2);
138       Standard_Real tol1 = BRep_Tool::Tolerance(V1);
139       Standard_Real tol2 = BRep_Tool::Tolerance(V2);
140       Standard_Real dpp = P3D1.Distance(P3D2);
141       if (dpp> tol1+tol2) {
142         cout<<endl;
143         cout<<"*** TopOpeBRep_EdgesFiller : isvertex1 && isvertex2 : P3D non confondus"<<endl;
144         cout<<"point PV1 "<<P3D1.X()<<" "<<P3D1.Y()<<" "<<P3D1.Z()<<endl;
145         cout<<"point PV2 "<<P3D2.X()<<" "<<P3D2.Y()<<" "<<P3D2.Z()<<endl;
146         cout<<endl;
147       }
148     }
149 #endif
150     
151     // xpu : 080498 : CTS20072 (e12,e3,p8) 
152     //       edgesintersector called for tolerances = 0.
153     //       facesintersector called for greater tolerances
154     //       we assume facesintersector's ouput data to be valid
155     //       and we use it for correcting edgesintersector's ouput data
156     TopOpeBRepDS_ListIteratorOfListOfInterference itloI1( myPDS->ShapeInterferences(E1) );
157     Standard_Integer G; TopOpeBRepDS_Kind K; 
158     Standard_Boolean found = GetGeometry(itloI1,P2D,G,K);
159     if (!found) MakeGeometry(P2D,G,K);
160
161     Standard_Boolean foundpoint  = (found)  && (K == TopOpeBRepDS_POINT);
162 #ifdef DEB
163     Standard_Boolean foundvertex = (found)  && (K == TopOpeBRepDS_VERTEX);
164 #endif
165     Standard_Boolean isnewpoint  = (!found) && (K == TopOpeBRepDS_POINT);
166     Standard_Boolean isnewvertex = (!found) && (K == TopOpeBRepDS_VERTEX);
167
168     Standard_Boolean faulty =  (isvertex && isnewpoint) || (!isvertex && isnewvertex);
169     if (faulty) {
170 #ifdef DEB
171       cout<<"- - - faulty EdgesFiller : G "<<G<<" K ";TopOpeBRepDS::Print(K,cout);cout.flush();
172       cout<<" isvertex="<<isvertex;cout.flush();
173       cout<<" isop="<<foundpoint<<" isov="<<foundvertex;cout.flush();
174       cout<<" isnp="<<isnewpoint<<" isnv="<<isnewvertex<<endl;cout.flush();
175 #endif
176     }
177
178     if (isvertex && foundpoint) {
179       Standard_Integer is = 1, ns = myPDS->NbShapes();
180       for (;is<=ns;is++) {
181         const TopoDS_Shape& s = myPDS->Shape(is);
182         if (s.ShapeType() != TopAbs_EDGE) continue;
183         const TopoDS_Edge& e = TopoDS::Edge(s);
184
185         TopOpeBRepDS_ListOfInterference linew;
186         TopOpeBRepDS_ListOfInterference& li = myPDS->ChangeShapeInterferences(e); TopOpeBRepDS_ListIteratorOfListOfInterference it(li);
187         while (it.More()) {
188
189           Handle(TopOpeBRepDS_Interference) I=it.Value(); TopOpeBRepDS_Kind ki=I->GeometryType(); Standard_Integer gi=I->Geometry();
190           Handle(Standard_Type) DTI = I->DynamicType();
191           Standard_Boolean iscpi = (DTI == STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference)) ;
192           Standard_Boolean condcpi = ((ki==TopOpeBRepDS_POINT) && (gi==G) && iscpi);
193           if (condcpi) { // remplacer G,K de I par le vertex courant
194
195 #ifdef DEB
196             rototo();
197 #endif
198             Handle(TopOpeBRepDS_CurvePointInterference) epi = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I);
199             const TopOpeBRepDS_Transition& tevi = epi->Transition();
200             Standard_Integer sevi = epi->Support();
201 #ifdef DEB
202             Standard_Integer gevi;
203 #else
204             Standard_Integer gevi=0;
205 #endif
206             if      (isvertex1) gevi = myPDS->AddShape(V1,1);
207             else if (isvertex2) gevi = myPDS->AddShape(V2,2);
208             Standard_Boolean bevi = Standard_False;
209             TopOpeBRepDS_Config cevi = TopOpeBRepDS_UNSHGEOMETRY;
210             Standard_Real pevi = epi->Parameter();
211
212             Handle(TopOpeBRepDS_Interference) evi;
213             evi = TopOpeBRepDS_InterferenceTool::MakeEdgeVertexInterference(tevi,sevi,gevi,bevi,cevi,pevi);
214             const TopOpeBRepDS_Kind& kevi = epi->SupportType();
215             evi->SupportType(kevi);
216
217 #ifdef DEB
218             TopOpeBRepDS::Print(K,G,cout,"TopOpeBRep_EdgesFiller : remplacer "," ");
219             TopOpeBRepDS::Print(TopOpeBRepDS_VERTEX,gevi,cout,"par "," dans les courbes NYI\n");
220 #endif
221             linew.Append(evi);
222             li.Remove(it);
223           } // cond
224           else {
225             it.Next();
226           }
227         } // it.More()
228         if (!linew.IsEmpty()) {
229           myHDS->StoreInterferences(linew,is,"EdgesFiller modif : ");
230         }
231       } // (is<=ns)
232     } // (isvertex && foundpoint)
233     
234     if (isvertex1) {
235       const TopoDS_Vertex& VV1 = V1;
236 //      const TopoDS_Vertex& VV1 = TopoDS::Vertex(V1);
237       const TopoDS_Edge& EE1 = TopoDS::Edge(E1);
238       par1 = BRep_Tool::Parameter(VV1,EE1);
239     }
240     
241     if (isvertex2) {
242       const TopoDS_Vertex& VV2 = V2;
243 //      const TopoDS_Vertex& VV2 = TopoDS::Vertex(V2);
244       const TopoDS_Edge& EE2 = TopoDS::Edge(E2);
245       par2 = BRep_Tool::Parameter(VV2,EE2);
246     }
247     
248     if ( isvertex1 && isvertex2 ) {
249       myPDS->FillShapesSameDomain(V1,V2);
250     }
251     
252     Standard_Integer DSPindex;
253     Standard_Boolean EPIfound;
254     
255     if ( ! isvertex ) {
256       
257       TopOpeBRepDS_Kind KKK;
258       TopOpeBRepDS_ListIteratorOfListOfInterference itEIL1(EIL1);
259       EPIfound = GetGeometry(itEIL1,P2D,DSPindex,KKK);
260       if ( ! EPIfound ) MakeGeometry(P2D,DSPindex,KKK);
261
262       SetShapeTransition(P2D,T1,T2);
263
264       if      (KKK == TopOpeBRepDS_POINT) {
265         EPI = StorePI(P2D,T1,E2index,DSPindex,par1,1);
266         EPI = StorePI(P2D,T2,E1index,DSPindex,par2,2);
267       }
268       else if ( KKK == TopOpeBRepDS_VERTEX) {
269         Standard_Integer Vindex = DSPindex;
270         Standard_Boolean bevi = Standard_False;
271         TopOpeBRepDS_Config cevi = TopOpeBRepDS_UNSHGEOMETRY;
272         EVI = StoreVI(P2D,T1,E2index,Vindex,bevi,cevi,par1,1);
273         EVI = StoreVI(P2D,T2,E1index,Vindex,bevi,cevi,par2,2);
274       }
275  
276     } // ( ! isvertex )
277     
278     else {
279       
280       SetShapeTransition(P2D,T1,T2);
281       
282       if (isvertex1) {
283         const TopoDS_Shape V = V1;
284         Standard_Integer Vindex = myPDS->AddShape(V,1);
285         TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
286         EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_True,SSC,par1,1);
287         EVI = StoreVI(P2D,T2,E1index,Vindex,Standard_False,SSC,par2,2);
288       }
289       
290       if (isvertex2) {
291         const TopoDS_Shape V = V2;
292         Standard_Integer Vindex = myPDS->AddShape(V,2);
293         TopOpeBRepDS_Config SSC = P2D.EdgesConfig();
294         EVI = StoreVI(P2D,T1,E2index,Vindex,Standard_False,SSC,par1,1);
295         EVI = StoreVI(P2D,T2,E1index,Vindex,Standard_True,SSC,par2,2);
296       }
297       
298     } // ( isvertex )
299     
300   } //  MorePoint()
301   
302   RecomputeInterferences(myE1,myLI1);
303   RecomputeInterferences(myE2,myLI2);
304   
305 } // Insert
306
307 // ===============
308 // private methods
309 // ===============
310
311 //=======================================================================
312 //function : SetShapeTransition
313 //purpose  : 
314 //=======================================================================
315 void TopOpeBRep_EdgesFiller::SetShapeTransition(const TopOpeBRep_Point2d& P2D,
316                                TopOpeBRepDS_Transition& T1,TopOpeBRepDS_Transition& T2) const
317 {
318   Standard_Boolean pointofsegment = P2D.IsPointOfSegment();
319   Standard_Boolean esd = myPEI->SameDomain();
320   Standard_Integer ie1=0,ie2=0,if1=0,if2=0;
321   
322   if      (pointofsegment && esd) {
323     T1.ShapeBefore(TopAbs_EDGE);T1.ShapeAfter(TopAbs_EDGE);
324     T2.ShapeBefore(TopAbs_EDGE);T2.ShapeAfter(TopAbs_EDGE);
325     if ( ! myE1.IsNull() ) ie1 = myPDS->AddShape(myE1,1);
326     if ( ! myE2.IsNull() ) ie2 = myPDS->AddShape(myE2,2);
327     if ( ! myE2.IsNull() ) T1.Index(ie2);
328     if ( ! myE1.IsNull() ) T2.Index(ie1);
329   }
330   else {
331     T1.ShapeBefore(TopAbs_FACE);T1.ShapeAfter(TopAbs_FACE);
332     T2.ShapeBefore(TopAbs_FACE);T2.ShapeAfter(TopAbs_FACE);
333     if ( ! myF1.IsNull() ) if1 = myPDS->AddShape(myF1,1);
334     if ( ! myF2.IsNull() ) if2 = myPDS->AddShape(myF2,2);
335     if ( ! myF1.IsNull() ) T2.Index(if1);
336     if ( ! myF2.IsNull() ) T1.Index(if2);
337   }
338 }
339
340 //=======================================================================
341 //function : GetGeometry
342 //purpose  : private
343 //=======================================================================
344 Standard_Boolean TopOpeBRep_EdgesFiller::GetGeometry(TopOpeBRepDS_ListIteratorOfListOfInterference& IT,const TopOpeBRep_Point2d& P2D,Standard_Integer& G,TopOpeBRepDS_Kind& K) const 
345                        
346 {
347   TopOpeBRepDS_Point DSP = TopOpeBRep_PointGeomTool::MakePoint(P2D);
348   Standard_Boolean b = myHDS->GetGeometry(IT,DSP,G,K);
349   return b;
350 }
351
352 //=======================================================================
353 //function : MakeGeometry
354 //purpose  : 
355 //=======================================================================
356 Standard_Boolean TopOpeBRep_EdgesFiller::MakeGeometry(const TopOpeBRep_Point2d& P2D,Standard_Integer& G,TopOpeBRepDS_Kind& K) const 
357 {
358   Standard_Boolean isvertex1 = P2D.IsVertex(1);
359   Standard_Boolean isvertex2 = P2D.IsVertex(2);
360   if (isvertex1 && isvertex2) {
361     Standard_Integer G1 = myPDS->AddShape(P2D.Vertex(1),1);
362     myPDS->AddShape(P2D.Vertex(2),2);
363     G = G1;
364     K = TopOpeBRepDS_VERTEX;
365   }
366   else if (isvertex1) {
367     G = myPDS->AddShape(P2D.Vertex(1),1);
368     K = TopOpeBRepDS_VERTEX;
369   }
370   else if (isvertex2) {
371     G = myPDS->AddShape(P2D.Vertex(2),2);
372     K = TopOpeBRepDS_VERTEX;
373   }
374   else {
375     G = myPDS->AddPoint(TopOpeBRep_PointGeomTool::MakePoint(P2D));
376     K = TopOpeBRepDS_POINT;
377   }
378   return Standard_True;
379 }
380
381 //=======================================================================
382 //function : Face
383 //purpose  : 
384 //=======================================================================
385 void TopOpeBRep_EdgesFiller::Face(const Standard_Integer ISI,const TopoDS_Shape& F)
386 {
387   if      (ISI == 1) myF1 = TopoDS::Face(F);
388   else if (ISI == 2) myF2 = TopoDS::Face(F);
389   else Standard_Failure::Raise("Face(i,f) : ISI incorrect");
390 }
391
392 //=======================================================================
393 //function : Face
394 //purpose  : 
395 //=======================================================================
396 const TopoDS_Shape& TopOpeBRep_EdgesFiller::Face(const Standard_Integer ISI) const
397 {
398   if      (ISI == 1) return myF1;
399   else if (ISI == 2) return myF2;
400   else Standard_Failure::Raise("Face(i) : ISI incorrect");
401   return myF1;
402 }
403
404 //=======================================================================
405 //function : StorePI
406 //purpose  : 
407 //=======================================================================
408 Handle(TopOpeBRepDS_Interference) TopOpeBRep_EdgesFiller::StorePI(const TopOpeBRep_Point2d& P2D,
409                      const TopOpeBRepDS_Transition& T,const Standard_Integer SI,const Standard_Integer GI,
410                      const Standard_Real param,const Standard_Integer IEmother)
411 {
412   Handle(TopOpeBRepDS_Interference) I = TopOpeBRepDS_InterferenceTool::MakeEdgeInterference(T,TopOpeBRepDS_EDGE,SI,TopOpeBRepDS_POINT,GI,param);
413   TopoDS_Shape Emother;
414   if      (IEmother == 1) Emother = myE1;
415   else if (IEmother == 2) Emother = myE2;
416   myHDS->StoreInterference(I,Emother);
417   Standard_Boolean b = ToRecompute(P2D,I,IEmother);
418   if (b) StoreRecompute(I,IEmother);
419   return I;
420 }
421
422 //=======================================================================
423 //function : StoreVI
424 //purpose  : 
425 //=======================================================================
426 Handle(TopOpeBRepDS_Interference) TopOpeBRep_EdgesFiller::StoreVI(const TopOpeBRep_Point2d& P2D,
427                      const TopOpeBRepDS_Transition& T,const Standard_Integer EI,const Standard_Integer VI,
428                      const Standard_Boolean VisB,const TopOpeBRepDS_Config C,
429                      const Standard_Real param,const Standard_Integer IEmother)
430 {
431   Handle(TopOpeBRepDS_Interference) I = TopOpeBRepDS_InterferenceTool::MakeEdgeVertexInterference(T,EI,VI,VisB,C,param);
432   TopoDS_Shape Emother;
433   if      (IEmother == 1) Emother = myE1;
434   else if (IEmother == 2) Emother = myE2;
435   myHDS->StoreInterference(I,Emother);
436   Standard_Boolean b = ToRecompute(P2D,I,IEmother);
437   if (b) StoreRecompute(I,IEmother);
438   return I;
439 }
440
441 //=======================================================================
442 //function : ToRecompute
443 //purpose  : 
444 //=======================================================================
445 Standard_Boolean TopOpeBRep_EdgesFiller::ToRecompute(const TopOpeBRep_Point2d& P2D,const Handle(TopOpeBRepDS_Interference)& I,const Standard_Integer IEmother)
446 {
447   Standard_Boolean b = Standard_True;
448   Standard_Boolean pointofsegment = P2D.IsPointOfSegment();
449   Standard_Boolean esd = myPEI->SameDomain();
450   b = b && (pointofsegment && !esd);
451   return b;
452 }
453
454 //=======================================================================
455 //function : StoreRecompute
456 //purpose  : 
457 //=======================================================================
458 void TopOpeBRep_EdgesFiller::StoreRecompute(const Handle(TopOpeBRepDS_Interference)& I,const Standard_Integer IEmother)
459 {
460   if      (IEmother == 1) myLI1.Append(I);
461   else if (IEmother == 2) myLI2.Append(I);
462 }
463
464 //=======================================================================
465 //function : RecomputeInterferences
466 //purpose  : 
467 //=======================================================================
468 void TopOpeBRep_EdgesFiller::RecomputeInterferences(const TopoDS_Edge& E,TopOpeBRepDS_ListOfInterference& LI)
469 {
470   if (LI.IsEmpty()) return;
471
472   TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LI);
473
474 #ifdef DEB
475   Standard_Integer EIX = myPDS->Shape(E); Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
476   if (TRC) cout<<endl<<"RecomputeInterferences E"<<EIX<<" <- "<<LI.Extent()<<endl;
477   if (TRC) tki.DumpTKIIterator("","\n");
478   if (TRC) debefre(EIX);
479 #endif
480
481   for (tki.Init(); tki.More(); tki.Next()) {
482     TopOpeBRepDS_Kind K; Standard_Integer G; tki.Value(K,G);
483     TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G); TopOpeBRepDS_ListOfInterference Rloi;
484     Standard_Integer nloi = loi.Extent();
485     if (nloi == 0) continue;
486
487 #ifdef DEB
488     if (nloi > 1) {cout<<"TopOpeBRep_EdgesFiller : > 1 I on UNUN/F on E"<<EIX<<" A FAIRE"<<endl;}
489 #endif
490
491     Handle(TopOpeBRepDS_Interference)& iloi = loi.First(); 
492     TopOpeBRepDS_Transition& TU = iloi->ChangeTransition();
493     Standard_Integer ifb = TU.IndexBefore();
494     Standard_Integer ifa = TU.IndexAfter();
495     const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb));
496
497 #ifdef DEB
498     if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<<EIX<<" NYI"<<endl;}
499 #endif
500
501     Standard_Real pE = FDS_Parameter(iloi); TopOpeBRepDS_Transition TN;
502     TN.ShapeBefore(TU.ShapeBefore());TN.IndexBefore(TU.IndexBefore());
503     TN.ShapeAfter(TU.ShapeAfter());TN.IndexAfter(TU.IndexAfter());
504
505 #ifdef DEB
506     Standard_Boolean ok =
507 #endif
508     FDS_stateEwithF2d(*myPDS,E,pE,K,G,fb,TN);
509
510 #ifdef DEB
511     if (TRC) {
512       TopOpeBRepDS_ListOfInterference l1;l1.Append(iloi);
513       TopOpeBRepDS_TKI dt;dt.FillOnGeometry(l1);dt.DumpTKIIterator("","");
514       if (ok) { 
515         cout<<"    ";TU.Dump(cout);cout<<endl;
516         cout<<"--> ";TN.Dump(cout);cout<<endl;
517       }
518       else {
519         cout<<"--> TN ko"<<endl;
520       }
521     }
522 #endif
523
524   } // tki.More
525 } // RecomputeInterferences