0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / TopOpeBRep / TopOpeBRep_FaceEdgeFiller_DEB.cxx
1 // Created on: 1995-06-16
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1995-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 #ifdef OCCT_DEBUG
18
19 #include <TCollection_AsciiString.hxx>
20 #include <TopOpeBRep_FaceEdgeIntersector.hxx>
21 #include <TopOpeBRepDS_DataStructure.hxx>
22 #include <TopOpeBRepDS.hxx>
23 #include <TopOpeBRepDS_Transition.hxx>
24 #include <TopoDS_Shape.hxx>
25 #include <TopAbs.hxx>
26 #include <TopAbs_State.hxx>
27 #include <TopAbs_Orientation.hxx>
28 #include <gp_Pnt.hxx>
29 #include <gp_Pnt2d.hxx>
30
31 //------------------------------------------------------------------
32 void FEINT_DUMPPOINTS(TopOpeBRep_FaceEdgeIntersector& FEINT,
33                       const TopOpeBRepDS_DataStructure& BDS)
34 {
35   FEINT.InitPoint(); 
36   if ( ! FEINT.MorePoint() ) return;
37   
38   std::cout<<std::endl;
39   std::cout<<"---------- F/E : "<<FEINT.NbPoints()<<" p ";
40   std::cout<<std::endl;
41   
42   const TopoDS_Shape& FF = FEINT.Shape(1);
43   const TopoDS_Shape& EE = FEINT.Shape(2);
44   
45   Standard_Integer FFindex = BDS.Shape(FF);
46   Standard_Integer EEindex = BDS.Shape(EE);
47   
48   TopAbs_Orientation FFori = FF.Orientation();
49   TopAbs_Orientation EEori = EE.Orientation();
50   std::cout<<"FF = "<<FFindex<<" ";TopAbs::Print(FFori,std::cout);
51   std::cout<<", ";
52   std::cout<<"EE = "<<EEindex<<" ";TopAbs::Print(EEori,std::cout);
53   std::cout<<std::endl;
54   
55   Standard_Integer ip = 1;
56   for (; FEINT.MorePoint(); FEINT.NextPoint(), ip++ ) {
57     gp_Pnt2d      pUV; FEINT.UVPoint(pUV);
58     TopAbs_State  sta = FEINT.State();
59     Standard_Real parE = FEINT.Parameter();
60     
61     TopOpeBRepDS_Transition T1,T2;
62     T1 = FEINT.Transition(1,EEori); // EEori bidon
63     T2 = FEINT.Transition(2,FFori);
64     
65     TopoDS_Vertex V1;
66     Standard_Boolean isvertexF = FEINT.IsVertex(1,V1);
67     TopoDS_Vertex V2;
68     Standard_Boolean isvertexE = FEINT.IsVertex(2,V2);
69     
70     std::cout<<std::endl;
71     std::cout<<"P"<<ip<<" : "; 
72     gp_Pnt P3D = FEINT.Value(); 
73     std::cout<<"\t"<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z()<<std::endl;
74     
75     std::cout<<"\t"; if (isvertexF) std::cout<<"IS VERTEX, ";
76     std::cout<<" pUV = "<<pUV.X()<<" "<<pUV.Y()<<std::endl;
77     std::cout<<" sta = "; TopAbs::Print(sta,std::cout);std::cout<<std::endl;
78     
79     std::cout<<"\t"; if (isvertexE) std::cout<<"IS VERTEX, ";
80     std::cout<<" parE = "<<parE<<std::endl;
81   }
82 }
83
84 #endif