// File: TopOpeBRepBuild_Area1dBuilder.cxx // Created: Thu Dec 21 17:07:40 1995 // Author: Jean Yves LEBEY // // Copyright: Matra Datavision 1995 #include #include #include #include #include #include #include #ifdef DEB Standard_IMPORT Standard_Boolean TopOpeBRepBuild_GettraceAREA(); Standard_IMPORT Standard_Boolean TopOpeBRepDS_GettraceSTRANGE(); #endif //======================================================================= //function : DumpList //purpose : //======================================================================= void TopOpeBRepBuild_Area1dBuilder::DumpList(const TopOpeBRepBuild_ListOfLoop& LOL) { #ifdef DEB Standard_Integer iLOL; TopOpeBRepBuild_ListIteratorOfListOfLoop itLOL; for (iLOL = 0, itLOL.Initialize(LOL); itLOL.More(); iLOL++, itLOL.Next()) { if (iLOL) cout<<" "; else cout<<"DUMP_AREA : "; const Handle(TopOpeBRepBuild_Loop)& L = itLOL.Value(); L->Dump();cout<IsShape(); #ifdef DEB if (TopOpeBRepBuild_GettraceAREA()) { cout<<"++++ new loop : "; L->Dump(); if (boundaryL) cout<<" is bound"; else cout<<" is not bound"; cout<IsShape(); REM_Loop_FROM_LISTOFLoop (LoopIter,AreaIter.Value(),(void*)("loop of cur. area, cur. area")); } else { LoopIter.Next(); } } // insert the loop in the area ADD_Loop_TO_LISTOFLoop(L,aArea,(void*)("area = current")); if ( ! removedLoops.IsEmpty() ) { if ( allShape ) { ADD_LISTOFLoop_TO_LISTOFLoop (removedLoops,boundaryloops, (void*)("allShape = 1"),(void*)("removedLoops"),(void*)("boundaryloops")); } else { // make a new area with the removed loops TopOpeBRepBuild_ListOfLoop thelist; myArea.Append(thelist); ADD_LISTOFLoop_TO_LISTOFLoop (removedLoops,myArea.Last(), (void*)("allShape = 0"),(void*)("removedLoops"),(void*)("new area")); } } } // Loopinside == True else { Standard_Integer ashapeinside,ablockinside; TopOpeBRepBuild_ListOfLoop thelist1; myArea.Append(thelist1); TopOpeBRepBuild_ListOfLoop& newArea0 = myArea.Last(); ADD_Loop_TO_LISTOFLoop(L,newArea0,(void*)("new area")); LoopIter.Initialize(boundaryloops); while ( LoopIter.More() ) { ashapeinside = ablockinside = Standard_False; state = LC.Compare(LoopIter.Value(),L); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); ashapeinside = (state == TopAbs_IN); if (ashapeinside) { state = LC.Compare(L,LoopIter.Value()); if (state == TopAbs_UNKNOWN) Atomize(state,TopAbs_IN); ablockinside = (state == TopAbs_IN); } if ( ashapeinside && ablockinside ) { const Handle(TopOpeBRepBuild_Loop)& curL = LoopIter.Value(); ADD_Loop_TO_LISTOFLoop (curL,newArea0,(void*)("ashapeinside && ablockinside, new area")); REM_Loop_FROM_LISTOFLoop (LoopIter,boundaryloops,(void*)("loop of boundaryloops, boundaryloops")); } else { LoopIter.Next(); } } // end of boundaryloops scan } // Loopinside == False } // end of block loop } // end of LoopSet LS scan #ifdef DEB if (TopOpeBRepBuild_GettraceAREA()) { if ( ! myArea.IsEmpty() ) { cout<<"------- Areas -------"<Dump(); cout<Dump(); cout<