// file: TopOpeBRepBuild_ffwesk.cxx // Created: Thu Mar 7 10:49:33 1996 // Author: Jean Yves LEBEY // #include #include #include #include #include #include #include #ifdef DEB Standard_EXPORT void debfctwesmess(const Standard_Integer i,const TCollection_AsciiString& s = ""); Standard_EXPORT void debffwesON(const Standard_Integer i); Standard_EXPORT void debffwesk(const Standard_Integer i) {cout<<"++ debffwesk "<DS(); const TopoDS_Shape& F1 = LS1.First(); myFaceReference = TopoDS::Face(F1); #ifdef DEB Standard_Integer iF1 = #endif BDS.Shape(F1); Standard_Integer iref = BDS.SameDomainRef(F1); TopAbs_Orientation oref = BDS.Shape(iref).Orientation(); #ifdef DEB Standard_Boolean tSPS = GtraceSPS(F1,iF1); if(tSPS) cout<<"\n%%%%%%%%%%%%% K = "<Shape(S); Standard_Boolean tomerge = !IsMerged(S,TB); if (!tomerge) continue; // lors de l'insertion des composantes (edges splitees) de S dans le WES : // - faces de meme orientation geometrique : // la grille indique l'orientation des composantes // - faces d'orientation geometrique != : // les aretes de S sont exprimees dans une surface // d'orientation opposee a la surface de la face de reference. // Leur orientation dans la face resultat (reference) est le contraire // de la grille. // Modified by Sergey KHROMOV - Sat Apr 27 14:40:35 2002 Begin // const TopoDS_Shape& Fref = WES.Face(); // const TopoDS_Shape& F = S; // Standard_Boolean samegeom = ::TopOpeBRepBuild_FUN_aresamegeom(Fref,F); // Standard_Boolean r = gistoreverse1; // if ( !samegeom ) { r = !r; G.SetReverse(r); } // Standard_Boolean rev = Standard_False; // Modified by Sergey KHROMOV - Sat Apr 27 14:40:36 2002 End TopAbs_Orientation oS = BDS.Shape(iS).Orientation(); TopOpeBRepDS_Config conf = BDS.SameDomainOri(S); Standard_Boolean b1 = (conf == TopOpeBRepDS_DIFFORIENTED && (oS == oref)); Standard_Boolean b2 = (conf == TopOpeBRepDS_SAMEORIENTED && (oS != oref)); Standard_Boolean b = b1 || b2; // Modified by Sergey KHROMOV - Sat Apr 27 14:40:01 2002 Begin // if (b) { // rev = Standard_True; // G.SetReverse(rev); // } if (b) G.SetReverse(!gistoreverse1); // Modified by Sergey KHROMOV - Sat Apr 27 14:40:03 2002 End if (Kfill == 1) { GFillFaceWES(S,LS2,G,WES); } else if (Kfill == 2) { #ifdef DEB if (tSPS) debfctwesmess(iF1); #endif GFillCurveTopologyWES(S,G,WES); } else if (Kfill == 3) { #ifdef DEB if (tSPS) debffwesON(iF1); #endif GFillONPartsWES(S,G,LS2,WES); } else { // error } } // it(LS1) G = G1.CopyPermuted(); gistoreverse1 = G.IsToReverse1(); TB = TB2; it.Initialize(LS2); #ifdef DEB if(tSPS){ cout<<"\n^^^^^^^^ GFillFacesWESK : traitement de 2/1"; TopAbs_State TB12,TB22; G.StatesON(TB12,TB22); cout<<" TB = ";TopAbs::Print(TB,cout); cout<<" "; cout<<"(TB1 = ";TopAbs::Print(TB12,cout);cout<<","; cout<<" TB2 = ";TopAbs::Print(TB22,cout);cout<<")\n\n"; } #endif for (; it.More(); it.Next()) { const TopoDS_Shape& S = it.Value(); Standard_Integer iS = myDataStructure->Shape(S); Standard_Boolean tomerge = !IsMerged(S,TB); if (!tomerge) continue; // Modified by Sergey KHROMOV - Sat Apr 27 14:38:33 2002 Begin // const TopoDS_Shape& Fref = WES.Face(); // const TopoDS_Shape& F = S; // Standard_Boolean samegeom = ::TopOpeBRepBuild_FUN_aresamegeom(Fref,F); // Standard_Boolean r = gistoreverse1; // if ( !samegeom ) { r = !r; G.SetReverse(r); } // Standard_Boolean rev = Standard_False; // Modified by Sergey KHROMOV - Sat Apr 27 14:38:30 2002 End TopAbs_Orientation oS = BDS.Shape(iS).Orientation(); TopOpeBRepDS_Config conf = BDS.SameDomainOri(S); Standard_Boolean b1 = (conf == TopOpeBRepDS_DIFFORIENTED && (oS == oref)); Standard_Boolean b2 = (conf == TopOpeBRepDS_SAMEORIENTED && (oS != oref)); Standard_Boolean b = b1 || b2; // Modified by Sergey KHROMOV - Sat Apr 27 14:39:04 2002 Begin // if (b) { // rev = Standard_True; // G.SetReverse(rev); // } if (b) G.SetReverse(!gistoreverse1); // Modified by Sergey KHROMOV - Sat Apr 27 14:39:08 2002 End if (Kfill == 1) { GFillFaceWES(S,LS1,G,WES); } else if (Kfill == 2) { GFillCurveTopologyWES(S,G,WES); } else if (Kfill == 3) { #ifdef DEB if(tSPS) debffwesON(iF1); #endif GFillONPartsWES(S,G,LS1,WES); } else { } } // it(LS2) } // GFillFacesWESK