b311480e |
1 | // Created on: 1995-06-16 |
2 | // Created by: Jean Yves LEBEY |
3 | // Copyright (c) 1995-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 | |
0797d9d3 |
17 | #ifdef OCCT_DEBUG |
7fd59977 |
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 | cout<<endl; |
39 | cout<<"---------- F/E : "<<FEINT.NbPoints()<<" p "; |
40 | cout<<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 | cout<<"FF = "<<FFindex<<" ";TopAbs::Print(FFori,cout); |
51 | cout<<", "; |
52 | cout<<"EE = "<<EEindex<<" ";TopAbs::Print(EEori,cout); |
53 | cout<<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); |
7fd59977 |
69 | |
70 | cout<<endl; |
71 | cout<<"P"<<ip<<" : "; |
72 | gp_Pnt P3D = FEINT.Value(); |
73 | cout<<"\t"<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z()<<endl; |
74 | |
75 | cout<<"\t"; if (isvertexF) cout<<"IS VERTEX, "; |
7fd59977 |
76 | cout<<" pUV = "<<pUV.X()<<" "<<pUV.Y()<<endl; |
77 | cout<<" sta = "; TopAbs::Print(sta,cout);cout<<endl; |
78 | |
79 | cout<<"\t"; if (isvertexE) cout<<"IS VERTEX, "; |
7fd59977 |
80 | cout<<" parE = "<<parE<<endl; |
81 | } |
82 | } |
83 | |
84 | #endif |