// File: TopOpeBRep_FFDumper.cxx // Created: Wed Oct 23 14:54:04 1996 // Author: Jean Yves LEBEY // Copyright: OPEN CASCADE 1996 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef DEB Standard_IMPORT Standard_Boolean TopOpeBRepDS_GettraceDSNC(); Standard_IMPORT Standard_Boolean TopOpeBRepDS_GettraceDSF(); Standard_IMPORT Standard_Boolean TopOpeBRepDS_GettraceDSFK(); static TCollection_AsciiString PRODINP("dinp "); #endif //======================================================================= //function : TopOpeBRep_FFDumper //purpose : //======================================================================= #ifndef DEB TopOpeBRep_FFDumper::TopOpeBRep_FFDumper(const TopOpeBRep_PFacesFiller& ) { #else TopOpeBRep_FFDumper::TopOpeBRep_FFDumper(const TopOpeBRep_PFacesFiller& PFF) { Init(PFF); #endif } //======================================================================= //function : Init //purpose : //======================================================================= #ifndef DEB void TopOpeBRep_FFDumper::Init(const TopOpeBRep_PFacesFiller& ) { #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 DEB 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 DEB 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); cout<ChangeFacesIntersector().IsRestriction(Erest); cout<<"++++ line restriction"; if (FIisrest) { cout<<" edge restriction"; Standard_Integer iErest = 0; if (myPFF->ChangeDataStructure().HasShape(Erest)) iErest = myPFF->ChangeDataStructure().Shape(Erest); cout<<" "<Line().Direction(); TopOpeBRep::Print(LI.TypeLineCurve(),cout); Standard_Real x,y,z; D.Coord(x,y,z); cout<<" dir : "<HDataStructure(); const TopoDS_Edge& E = TopoDS::Edge(VP.Edge(ISI)); Standard_Real Epar = VP.EdgeParameter(ISI); TopAbs_Orientation O = E.Orientation(); TopOpeBRepDS_Transition T = 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) cout<<"is vertex of "<HDataStructure(); Standard_Real tol; if (GK == TopOpeBRepDS_VERTEX) tol = BRep_Tool::Tolerance(TopoDS::Vertex(HDS->Shape(G))); else if (GK == TopOpeBRepDS_POINT) tol = HDS->Point(G).Tolerance(); cout<<" tol = "<