0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / TopOpeBRep / TopOpeBRep_FaceEdgeFiller_DEB.cxx
CommitLineData
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//------------------------------------------------------------------
32void FEINT_DUMPPOINTS(TopOpeBRep_FaceEdgeIntersector& FEINT,
33 const TopOpeBRepDS_DataStructure& BDS)
34{
35 FEINT.InitPoint();
36 if ( ! FEINT.MorePoint() ) return;
37
04232180 38 std::cout<<std::endl;
39 std::cout<<"---------- F/E : "<<FEINT.NbPoints()<<" p ";
40 std::cout<<std::endl;
7fd59977 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();
04232180 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;
7fd59977 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
04232180 70 std::cout<<std::endl;
71 std::cout<<"P"<<ip<<" : ";
7fd59977 72 gp_Pnt P3D = FEINT.Value();
04232180 73 std::cout<<"\t"<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z()<<std::endl;
7fd59977 74
04232180 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;
7fd59977 78
04232180 79 std::cout<<"\t"; if (isvertexE) std::cout<<"IS VERTEX, ";
80 std::cout<<" parE = "<<parE<<std::endl;
7fd59977 81 }
82}
83
84#endif