// file: TopOpeBRepBuild_fctwes.cxx // Created: Thu Mar 7 10:49:33 1996 // Author: Jean Yves LEBEY // #include #include #include #include #include #include #include #include #include #include #ifdef DEB 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 DEB // Standard_Boolean FTFeqWESF = myFaceReference.IsEqual(WESF); #endif #ifdef DEB 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 DEB Standard_Boolean tSPS = GtraceSPS(iWESF); if(tSPS){ cout<<"ifil : "<