Back to index

salome-geom  6.5.0
Functions
GEOMAlgo_Splitter.cxx File Reference
#include <GEOMAlgo_Splitter.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp.hxx>
#include <BRep_Builder.hxx>
#include <BRepLib.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BOP_CorrectTolerances.hxx>

Go to the source code of this file.

Functions

static void TreatCompound (const TopoDS_Shape &aC, TopTools_ListOfShape &aLSX)

Function Documentation

void TreatCompound ( const TopoDS_Shape &  aC,
TopTools_ListOfShape &  aLSX 
) [static]

Definition at line 290 of file GEOMAlgo_Splitter.cxx.

{
  Standard_Integer aNbC1;
  TopAbs_ShapeEnum aType;
  TopTools_ListOfShape aLC, aLC1;
  TopTools_ListIteratorOfListOfShape aIt, aIt1;
  TopoDS_Iterator aItC;
  //
  aLC.Append (aC1);
  while(1) {
    aLC1.Clear();
    aIt.Initialize(aLC);
    for (; aIt.More(); aIt.Next()) {
      const TopoDS_Shape& aC=aIt.Value(); //C is compound
      //
      aItC.Initialize(aC);
      for (; aItC.More(); aItC.Next()) {
        const TopoDS_Shape& aS=aItC.Value();
        aType=aS.ShapeType();
        if (aType==TopAbs_COMPOUND) {
          aLC1.Append(aS);
        }
        else {
          aLSX.Append(aS);
        }
      }
    }
    //
    aNbC1=aLC1.Extent();
    if (!aNbC1) {
      break;
    }
    //
    aLC.Clear();
    aIt.Initialize(aLC1);
    for (; aIt.More(); aIt.Next()) {
      const TopoDS_Shape& aSC=aIt.Value();
      aLC.Append(aSC);
    }
  }// while(1)
}

Here is the caller graph for this function: