Back to index

salome-geom  6.5.0
Functions
NMTDS_Tools.cxx File Reference
#include <NMTDS_Tools.hxx>
#include <TopoDS_Vertex.hxx>
#include <gp_Pnt.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Builder.hxx>

Go to the source code of this file.

Functions

void CopySource (const TopoDS_Shape &aS, TopTools_IndexedDataMapOfShapeShape &aMapSS, TopoDS_Shape &aSC)

Function Documentation

void CopySource ( const TopoDS_Shape &  aS,
TopTools_IndexedDataMapOfShapeShape &  aMapSS,
TopoDS_Shape &  aSC 
)

Definition at line 63 of file NMTDS_Tools.cxx.

{
  Standard_Boolean bFree;
  TopAbs_ShapeEnum aT;
  TopoDS_Iterator aIt;
  TopoDS_Shape aSF;
  BRep_Builder BB;
  //
  aT=aS.ShapeType();
  //
  if (aMapSS.Contains(aS)) {
    aSC=aMapSS.ChangeFromKey(aS);
    aSC.Orientation(aS.Orientation());
    return;
  }
  else {
    aSC=aS.EmptyCopied();
    aMapSS.Add(aS, aSC);
  }
  //
  bFree=aSC.Free();
  aSC.Free(Standard_True);
  aSF=aS;
  if (aT==TopAbs_EDGE){
    TopAbs_Orientation aOr;
    //
    aOr=aS.Orientation();
    if(aOr==TopAbs_INTERNAL) {
      aSF.Orientation(TopAbs_FORWARD);
    }
  }
  aIt.Initialize(aSF);
  for (; aIt.More();  aIt.Next()) {
    TopoDS_Shape aSCx;
    //
    const TopoDS_Shape& aSx=aIt.Value();
    //
    CopySource (aSx, aMapSS, aSCx);
    //
    aSCx.Orientation(aSx.Orientation());
    BB.Add(aSC, aSCx);
  }
  aSC.Free(bFree);
}

Here is the caller graph for this function: