// Created on: 1996-03-07 // 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 #include #include #include #include #include #include #include #include #include #include #include #ifdef OCCT_DEBUG Standard_EXPORT void debfctwes(const Standard_Integer /*i*/) {} Standard_EXPORT void debfctwesmess(const Standard_Integer i,const TCollection_AsciiString& s = "") {cout<<"+ + + debfctwes "<FaceCurves(F1)); myFaceReference = TopoDS::Face(F1); myFaceToFill = TopoDS::Face(F1); //modified by NIZHNY-MZV Thu Feb 24 09:15:33 2000 //sometimes by the problem of tolerances we have intersection //lines between SameDomain faces, but Same domain faces can not //have intersection lines other than by its original edges //so we skip it if we find that two SameDomain faces have //new intersection edge Standard_Boolean hsd = myDataStructure->HasSameDomain(F1); TopTools_IndexedMapOfShape aSDMap; if(hsd) { TopTools_ListIteratorOfListOfShape it = myDataStructure -> SameDomain(F1); for(; it.More(); it.Next()) { const TopoDS_Shape& SDF = it.Value(); aSDMap.Add(SDF); } } //End modified by NIZHNY-MZV Thu Feb 24 09:21:08 2000 for (; FCit.More(); FCit.Next()) { if ( ShapeInterf != TopAbs_SHAPE ) { const Handle(TopOpeBRepDS_Interference)& I = FCit.Value(); const TopOpeBRepDS_Transition& T = I->Transition(); TopAbs_ShapeEnum shab = T.ShapeBefore(),shaa = T.ShapeAfter(); if ( (shaa != ShapeInterf) || (shab != ShapeInterf) ) continue; //modified by NIZHNY-MZV Thu Feb 24 09:14:31 2000 Standard_Integer si = I -> Support(); TopoDS_Shape SS = myDataStructure -> Shape(si); //see comment above if(aSDMap.Contains(SS)) continue; //End modified by NIZHNY-MZV Thu Feb 24 09:21:34 2000 } GFillCurveTopologyWES(FCit,G1,WES); } return; } // GFillCurveTopologyWES //======================================================================= //function : GFillCurveTopologyWES //purpose : //======================================================================= void TopOpeBRepBuild_Builder::GFillCurveTopologyWES(const TopOpeBRepDS_CurveIterator& FCit,const TopOpeBRepBuild_GTopo& G1,TopOpeBRepBuild_WireEdgeSet& WES) const { Standard_Boolean more = FCit.More(); if (!more) return; TopAbs_State TB1,TB2; G1.StatesON(TB1,TB2); TopOpeBRepDS_Config Conf = G1.Config1(); TopAbs_State TB = TB1; if ( Conf == TopOpeBRepDS_DIFFORIENTED ) { // -jyl980525 // if (TB1 == TopAbs_OUT) TB = TopAbs_IN; // else if (TB1 == TopAbs_IN ) TB = TopAbs_OUT; } TopoDS_Face& WESF = *((TopoDS_Face*)((void*)&WES.Face())); TopoDS_Face& FTF = *((TopoDS_Face*)((void*)&myFaceToFill)); #ifdef OCCT_DEBUG // Standard_Boolean FTFeqWESF = myFaceReference.IsEqual(WESF); #endif #ifdef OCCT_DEBUG Standard_Integer iWESF = myDataStructure->Shape(WESF); Standard_Integer iref = myDataStructure->Shape(myFaceReference); Standard_Integer ifil = myDataStructure->Shape(myFaceToFill); #endif Standard_Boolean opeCut = Opec12() || Opec21(); Standard_Boolean ComOfCut = opeCut && (TB1 == TB2)&& (TB1 == TopAbs_IN); const TopOpeBRepDS_Transition& T = FCit.Value()->Transition(); TopAbs_Orientation neworiE = T.Orientation(TB); Standard_Boolean samegeom = TopOpeBRepBuild_FUN_aresamegeom(FTF,WESF); if (!samegeom) { neworiE = TopAbs::Complement(neworiE); } #ifdef OCCT_DEBUG Standard_Boolean tSPS = GtraceSPS(iWESF); if(tSPS){ cout<<"ifil : "<