// Created on: 1996-10-23 // Created by: Jean Yves LEBEY // Copyright (c) 1996-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRep_FFDumper,Standard_Transient) #ifdef OCCT_DEBUG static TCollection_AsciiString PRODINP("dinp "); #endif //======================================================================= //function : TopOpeBRep_FFDumper //purpose : //======================================================================= #ifndef OCCT_DEBUG TopOpeBRep_FFDumper::TopOpeBRep_FFDumper(const TopOpeBRep_PFacesFiller& ) { #else TopOpeBRep_FFDumper::TopOpeBRep_FFDumper(const TopOpeBRep_PFacesFiller& PFF) { Init(PFF); #endif } //======================================================================= //function : Init //purpose : //======================================================================= #ifndef OCCT_DEBUG void TopOpeBRep_FFDumper::Init(const TopOpeBRep_PFacesFiller& ) { // just shut up compiler warnings (void)myEn1; (void)myEn2; (void)myLineIndex; } #else void TopOpeBRep_FFDumper::Init(const TopOpeBRep_PFacesFiller& PFF) { myPFF = PFF; const TopoDS_Face& fpff1 = myPFF->Face(1); const TopoDS_Face& fpff2 = myPFF->Face(2); Standard_Boolean f1diff = (!myF1.IsEqual(fpff1)); Standard_Boolean f2diff = (!myF2.IsEqual(fpff2)); Standard_Boolean init = f1diff || f2diff; if (init) { myF1 = myPFF->Face(1); myF2 = myPFF->Face(2); myEM1.Clear(); myEn1 = 0; myEM2.Clear(); myEn2 = 0; TopExp_Explorer x; for (x.Init(myF1,TopAbs_EDGE);x.More();x.Next()) myEM1.Bind(x.Current(),++myEn1); for (x.Init(myF2,TopAbs_EDGE);x.More();x.Next()) myEM2.Bind(x.Current(),++myEn2); myLineIndex = 0; } } #endif //======================================================================= //function : DumpLine //purpose : //======================================================================= #ifndef OCCT_DEBUG void TopOpeBRep_FFDumper::DumpLine(const Standard_Integer ) { #else void TopOpeBRep_FFDumper::DumpLine(const Standard_Integer I) { const TopOpeBRep_LineInter& L = myPFF->ChangeFacesIntersector().ChangeLine(I); DumpLine(L); #endif } //======================================================================= //function : DumpLine //purpose : //======================================================================= #ifndef OCCT_DEBUG void TopOpeBRep_FFDumper::DumpLine(const TopOpeBRep_LineInter& ) { #else void TopOpeBRep_FFDumper::DumpLine(const TopOpeBRep_LineInter& LI) { Standard_Integer il = LI.Index(); myLineIndex = il; Standard_Integer nl = myPFF->ChangeFacesIntersector().NbLines(); Standard_Boolean HasVPonR = LI.HasVPonR(); Standard_Boolean IsVClosed = LI.IsVClosed(); Standard_Boolean IsPeriodic = LI.IsPeriodic(); Standard_Boolean isrest = (LI.TypeLineCurve() == TopOpeBRep_RESTRICTION); std::cout<ChangeFacesIntersector().IsRestriction(Erest); std::cout<<"++++ line restriction"; if (FIisrest) { std::cout<<" edge restriction"; Standard_Integer iErest = 0; if (myPFF->ChangeDataStructure().HasShape(Erest)) iErest = myPFF->ChangeDataStructure().Shape(Erest); std::cout<<" "<Line().Direction(); TopOpeBRep::Print(LI.TypeLineCurve(),std::cout); Standard_Real x,y,z; D.Coord(x,y,z); std::cout<<" dir : "<HDataStructure(); const TopoDS_Edge& E = TopoDS::Edge(VP.Edge(ISI)); Standard_Real Epar = VP.EdgeParameter(ISI); TopAbs_Orientation O = E.Orientation(); TopOpeBRep_FFTransitionTool::ProcessLineTransition(VP,ISI,O); const TopoDS_Face F = myPFF->Face(ISI); Standard_Boolean Closed = TopOpeBRepTool_ShapeTool::Closed(E,F); Standard_Boolean Degen = BRep_Tool::Degenerated(E); Standard_Integer exi = ExploreIndex(E,ISI); Standard_Integer dsi = (HDS->HasShape(E)) ? HDS->Shape(E) : 0; Standard_Boolean isv = VP.IsVertex(ISI); if (isv) std::cout<<"is vertex of "<HDataStructure(); Standard_Real tol = Precision::Confusion(); if (GK == TopOpeBRepDS_VERTEX) tol = BRep_Tool::Tolerance(TopoDS::Vertex(HDS->Shape(G))); else if (GK == TopOpeBRepDS_POINT) tol = HDS->Point(G).Tolerance(); std::cout<<" tol = "<