Back to index

salome-geom  6.5.0
Functions
GEOMAlgo_GlueDetector.cxx File Reference
#include <GEOMAlgo_GlueDetector.hxx>
#include <Bnd_Box.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopExp.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepBndLib.hxx>
#include <NMTDS_BndSphereTree.hxx>
#include <NMTDS_BndSphere.hxx>
#include <NMTDS_IndexedDataMapOfShapeBndSphere.hxx>
#include <GEOMAlgo_IndexedDataMapOfIntegerShape.hxx>
#include <GEOMAlgo_PassKeyShape.hxx>
#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
#include <GEOMAlgo_Tools.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopExp_Explorer.hxx>

Go to the source code of this file.

Functions

static Standard_Integer CheckAncesstors (const TopoDS_Shape &aVSD, const TopTools_MapOfShape &aMVSD, const TopTools_IndexedDataMapOfShapeListOfShape &aMVE, const TopTools_IndexedDataMapOfShapeListOfShape &aMEV, TopTools_IndexedDataMapOfShapeListOfShape &aMEVZ)

Function Documentation

Standard_Integer CheckAncesstors ( const TopoDS_Shape &  aVSD,
const TopTools_MapOfShape &  aMVSD,
const TopTools_IndexedDataMapOfShapeListOfShape &  aMVE,
const TopTools_IndexedDataMapOfShapeListOfShape &  aMEV,
TopTools_IndexedDataMapOfShapeListOfShape &  aMEVZ 
) [static]

Definition at line 550 of file GEOMAlgo_GlueDetector.cxx.

{
  Standard_Address pLE, pLV, pLVZ;
  Standard_Integer iRet, aNbVX;
  TopTools_ListIteratorOfListOfShape aItLE, aItLV;
  TopTools_MapOfShape aMFence;
  TopTools_ListOfShape aLVX;
  //
  iRet=0;
  //
  pLE=aMVE.FindFromKey1(aVSD);
  if (!pLE) {
    return iRet;
  }
  //
  const TopTools_ListOfShape& aLE=*((TopTools_ListOfShape*)pLE);
  aItLE.Initialize(aLE);
  for (; aItLE.More(); aItLE.Next()) {
    const TopoDS_Shape& aE=aItLE.Value();
    //
    pLV=aMEV.FindFromKey1(aE);
    if (!pLV) {
      continue; // it should be not so
    }
    //
    aLVX.Clear();
    const TopTools_ListOfShape& aLV=*((TopTools_ListOfShape*)pLV);
    aItLV.Initialize(aLV);
    for (; aItLV.More(); aItLV.Next()) {
      const TopoDS_Shape& aV=aItLV.Value();
      if (!aV.IsSame(aVSD)) {
        if (aMVSD.Contains(aV)) {
          if (aMFence.Add(aV)) {
            aLVX.Append(aV);
          }
        }
      }
    }
    //
    aNbVX=aLVX.Extent();
    if (!aNbVX) {
      continue;
    }
    //
    iRet=1;
    //
    pLVZ=aMEVZ.FindFromKey1(aE);
    if (!pLVZ) {
      aMEVZ.Add(aE, aLVX);
    }
    else {
      TopTools_ListOfShape& aLVZ=*((TopTools_ListOfShape*)pLVZ);
      aLVZ.Append(aLVX);
    }
  }
  //
  return iRet;
}

Here is the caller graph for this function: