Back to index

salome-geom  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
GEOMAlgo_Gluer2 Class Reference

#include <GEOMAlgo_Gluer2.hxx>

Inheritance diagram for GEOMAlgo_Gluer2:
Inheritance graph
[legend]
Collaboration diagram for GEOMAlgo_Gluer2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT GEOMAlgo_Gluer2 ()
virtual Standard_EXPORT ~GEOMAlgo_Gluer2 ()
Standard_EXPORT void SetShapesToGlue (const TopTools_DataMapOfShapeListOfShape &aM)
Standard_EXPORT const
TopTools_DataMapOfShapeListOfShape & 
ShapesToGlue () const
Standard_EXPORT void SetKeepNonSolids (const Standard_Boolean theFlag)
Standard_EXPORT Standard_Boolean KeepNonSolids () const
virtual Standard_EXPORT void Clear ()
virtual Standard_EXPORT void Perform ()
virtual Standard_EXPORT void CheckData ()
Standard_EXPORT void Detect ()
Standard_EXPORT const
TopTools_DataMapOfShapeListOfShape & 
ShapesDetected () const
Standard_EXPORT const
TopTools_DataMapOfShapeListOfShape & 
ImagesToWork () const
virtual Standard_EXPORT const
TopTools_ListOfShape & 
Generated (const TopoDS_Shape &theS)
 Returns the list of shapes generated from the
shape theS.

virtual Standard_EXPORT const
TopTools_ListOfShape & 
Modified (const TopoDS_Shape &theS)
 Returns the list of shapes modified from the
shape theS.

virtual Standard_EXPORT
Standard_Boolean 
IsDeleted (const TopoDS_Shape &theS)
 Returns true if the shape theS has been deleted.

Standard_EXPORT const
TopTools_IndexedDataMapOfShapeListOfShape & 
StickedShapes ()
virtual Standard_EXPORT void SetArgument (const TopoDS_Shape &theShape)
Standard_EXPORT const
TopoDS_Shape & 
Argument () const
Standard_EXPORT void SetTolerance (const Standard_Real aT)
Standard_EXPORT Standard_Real Tolerance () const
Standard_EXPORT void SetCheckGeometry (const Standard_Boolean aFlag)
Standard_EXPORT Standard_Boolean CheckGeometry () const
Standard_EXPORT void SetContext (const Handle(IntTools_Context)&)
Standard_EXPORT const Handle (IntTools_Context)&Context()
Standard_EXPORT const
TopTools_DataMapOfShapeListOfShape & 
Images () const
Standard_EXPORT const
TopTools_DataMapOfShapeShape & 
Origins () const
Standard_EXPORT const
TopoDS_Shape & 
Shape () const
 Returns the result of algorithm

Standard_EXPORT Standard_Boolean HasDeleted () const
 Returns true if the at least one shape(or sub-shape)
of arguments has been deleted.

Standard_EXPORT Standard_Boolean HasGenerated () const
 Returns true if the at least one shape(or sub-shape)
of arguments has generated shapes.

Standard_EXPORT Standard_Boolean HasModified () const
 Returns true if the at least one shape(or sub-shape)
of arguments has modified shapes.

Standard_EXPORT const
TopTools_IndexedDataMapOfShapeListOfShape & 
ImagesResult () const
Standard_EXPORT Standard_Integer ErrorStatus () const
Standard_EXPORT Standard_Integer WarningStatus () const
Standard_EXPORT void ComputeInternalShapes (const Standard_Boolean theFlag)
 Allows to omit of creation of internal shapes (manifold topology).
Needed for the SALOME/TRIPOLI module.

Static Public Member Functions

static Standard_EXPORT void MakeVertex (const TopTools_ListOfShape &theLV, TopoDS_Vertex &theV)
static Standard_EXPORT void MapBRepShapes (const TopoDS_Shape &theS, TopTools_MapOfShape &theM)
static Standard_EXPORT void MapShapes (const TopoDS_Shape &theS, TopTools_MapOfShape &theM)

Protected Member Functions

Standard_EXPORT void PerformShapesToWork ()
Standard_EXPORT void FillVertices ()
Standard_EXPORT void FillEdges ()
Standard_EXPORT void FillWires ()
Standard_EXPORT void FillFaces ()
Standard_EXPORT void FillShells ()
Standard_EXPORT void FillSolids ()
Standard_EXPORT void FillCompSolids ()
Standard_EXPORT void FillCompounds ()
Standard_EXPORT void BuildResult ()
Standard_EXPORT void FillBRepShapes (const TopAbs_ShapeEnum theType)
Standard_EXPORT void FillContainers (const TopAbs_ShapeEnum theType)
Standard_EXPORT void FillCompound (const TopoDS_Shape &theC)
virtual Standard_EXPORT void PrepareHistory ()
 Prepare information for history support

Standard_EXPORT Standard_Boolean HasImage (const TopoDS_Shape &theC)
Standard_EXPORT void MakeBRepShapes (const TopoDS_Shape &theS, TopoDS_Shape &theSnew)
Standard_EXPORT void MakeEdge (const TopoDS_Edge &theE, TopoDS_Edge &theEnew)
Standard_EXPORT void MakeFace (const TopoDS_Face &theF, TopoDS_Face &theFnew)
Standard_EXPORT void TreatPair (const NMTTools_CoupleOfShape &theCS, NMTTools_ListOfCoupleOfShape &theLCS)
 Handle (IntTools_Context) myContext
virtual Standard_EXPORT void CheckResult ()

Protected Attributes

TopTools_DataMapOfShapeListOfShape myShapesToGlue
TopTools_DataMapOfShapeListOfShape myImagesDetected
TopTools_DataMapOfShapeShape myOriginsDetected
TopTools_DataMapOfShapeListOfShape myImagesToWork
TopTools_DataMapOfShapeShape myOriginsToWork
Standard_Boolean myKeepNonSolids
GEOMAlgo_GlueDetector myDetector
TopoDS_Shape myArgument
Standard_Real myTolerance
Standard_Boolean myCheckGeometry
TopTools_DataMapOfShapeListOfShape myImages
TopTools_DataMapOfShapeShape myOrigins
TopoDS_Shape myShape
TopTools_ListOfShape myHistShapes
TopTools_MapOfShape myMapShape
Standard_Boolean myHasDeleted
Standard_Boolean myHasGenerated
Standard_Boolean myHasModified
TopTools_IndexedDataMapOfShapeListOfShape myImagesResult
Standard_Integer myErrorStatus
Standard_Integer myWarningStatus
Standard_Boolean myComputeInternalShapes

Detailed Description

Definition at line 49 of file GEOMAlgo_Gluer2.hxx.


Constructor & Destructor Documentation

Definition at line 54 of file GEOMAlgo_Gluer2.cxx.

Definition at line 65 of file GEOMAlgo_Gluer2.cxx.

{
}

Member Function Documentation

const TopoDS_Shape & GEOMAlgo_GluerAlgo::Argument ( ) const [inherited]

Definition at line 59 of file GEOMAlgo_GluerAlgo.cxx.

{
  return myArgument;
}
void GEOMAlgo_Gluer2::BuildResult ( ) [protected]

Definition at line 578 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Boolean bHasImage;
  TopoDS_Shape aCnew, aCXnew;
  TopoDS_Iterator aItC;
  BRep_Builder aBB;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  aItC.Initialize(myArgument);
  for (; aItC.More(); aItC.Next()) {
    const TopoDS_Shape& aCx=aItC.Value();
    bHasImage=HasImage(aCx);
    if (bHasImage) {
      break;
    }
  }
  //
  if (!bHasImage) {
    myShape=myArgument;
    return;
  }
  //
  GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew);
  //
  aItC.Initialize(myArgument);
  for (; aItC.More(); aItC.Next()) {
    const TopoDS_Shape& aCX=aItC.Value();
    if (myOrigins.IsBound(aCX)) {
      aCXnew=myOrigins.Find(aCX);
      aCXnew.Orientation(aCX.Orientation());
      aBB.Add(aCnew, aCXnew);
    }
    else {
      aBB.Add(aCnew, aCX);
    }
  }
  //
  if (!myKeepNonSolids) {
    Standard_Integer i, aNb;
    TopoDS_Shape aCnew1;
    TopTools_IndexedMapOfShape aM;
    //
    GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew1);
    //
    TopExp::MapShapes(aCnew, TopAbs_SOLID, aM);

    aNb=aM.Extent();
    for (i=1; i<=aNb; ++i) {
      const TopoDS_Shape& aS=aM(i);
      aBB.Add(aCnew1, aS);
    }
    aCnew=aCnew1;
  }
  //
  myShape=aCnew;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::CheckData ( ) [virtual]

Reimplemented from GEOMAlgo_Algo.

Definition at line 231 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Integer aNbSG, i;
  TopAbs_ShapeEnum aType, aTypeX;
  TopTools_ListIteratorOfListOfShape aItLS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  aNbSG=myShapesToGlue.Extent();
  if (aNbSG) {
    // Check myShapesToGlue
    aItDMSLS.Initialize(myShapesToGlue);
    for (; aItDMSLS.More(); aItDMSLS.Next()) {
      //const TopoDS_Shape& aSkey=aItDMSLS.Key();
      const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
      aItLS.Initialize(aLSG);
      for (i=0; aItLS.More(); aItLS.Next(), ++i) {
        const TopoDS_Shape& aSG=aItLS.Value();
        aTypeX=aSG.ShapeType();
        if (!i) {
          aType=aTypeX;
          if (!(aType==TopAbs_VERTEX ||
                aType==TopAbs_EDGE ||
                aType==TopAbs_FACE)) {
            myErrorStatus=21;// non-brep shapes
            return;
          }
          continue;
        }
        if (aTypeX!=aType) {
          myErrorStatus=20;// non-homogeneous shapes
          return;
        }
      }
    }
  }// if (aNbSG) {
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry ( ) const [inherited]

Definition at line 92 of file GEOMAlgo_GluerAlgo.cxx.

{
  return myCheckGeometry;
}
void GEOMAlgo_Algo::CheckResult ( ) [protected, virtual, inherited]

Reimplemented in GEOMAlgo_Gluer.

Definition at line 59 of file GEOMAlgo_Algo.cxx.

void GEOMAlgo_Gluer2::Clear ( ) [virtual]

Reimplemented from GEOMAlgo_GluerAlgo.

Definition at line 72 of file GEOMAlgo_Gluer2.cxx.

{
  myErrorStatus=0;
  myWarningStatus=0;
  //
  GEOMAlgo_GluerAlgo::Clear();
  //
  myImagesDetected.Clear();
  myOriginsDetected.Clear();
  myShapesToGlue.Clear();
  myImagesToWork.Clear();
  myOriginsToWork.Clear();
  myKeepNonSolids=Standard_False;
  //modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f
  myDetector.Clear();
  //modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t
}

Here is the call graph for this function:

void GEOMAlgo_Algo::ComputeInternalShapes ( const Standard_Boolean  theFlag) [inherited]

Allows to omit of creation of internal shapes (manifold topology).
Needed for the SALOME/TRIPOLI module.

Definition at line 87 of file GEOMAlgo_Algo.cxx.

{
  myComputeInternalShapes = theFlag;
}

Here is the caller graph for this function:

Definition at line 65 of file GEOMAlgo_Gluer2_3.cxx.

{
  Standard_Boolean bCheckGeometry;
  Standard_Integer iErr, aNbSD;
  TopTools_ListIteratorOfListOfShape aItLS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
  //GEOMAlgo_GlueDetector aDetector;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  myImagesDetected.Clear();
  myOriginsDetected.Clear();
  //
  bCheckGeometry=Standard_True;
  //
  //modified by NIZNHY-PKV Tue Mar 13 13:33:35 2012f
  myDetector.Clear();
  myDetector.SetContext(myContext);
  //modified by NIZNHY-PKV Tue Mar 13 13:33:38 2012t
  myDetector.SetArgument(myArgument);
  myDetector.SetTolerance(myTolerance);
  myDetector.SetCheckGeometry(bCheckGeometry);
  //
  myDetector.Perform();
  iErr=myDetector.ErrorStatus();
  if (iErr) {
    // Detector is failed
    myErrorStatus=11;
    return;
  }
  //modified by NIZNHY-PKV Tue Mar 13 13:40:36 2012f
  iErr=myDetector.WarningStatus();
  if (iErr) {
    // Sticked shapes are detected
    myWarningStatus=2;
  }
  //modified by NIZNHY-PKV Tue Mar 13 13:40:39 2012t
  //
  const TopTools_DataMapOfShapeListOfShape& aImages=myDetector.Images();
  aItDMSLS.Initialize(aImages);
  for (; aItDMSLS.More(); aItDMSLS.Next()) {
    const TopoDS_Shape& aSkey=aItDMSLS.Key();
    const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
    aNbSD=aLSD.Extent();
    myImagesDetected.Bind(aSkey, aLSD);
  }
  //
  aItDMSLS.Initialize(myImagesDetected);
  for (; aItDMSLS.More(); aItDMSLS.Next()) {
    const TopoDS_Shape& aSkey=aItDMSLS.Key();
    const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
    aItLS.Initialize(aLSD);
    for (; aItLS.More(); aItLS.Next()) {
      const TopoDS_Shape& aSx=aItLS.Value();
      myOriginsDetected.Bind(aSx, aSkey);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Integer GEOMAlgo_Algo::ErrorStatus ( ) const [inherited]

Definition at line 67 of file GEOMAlgo_Algo.cxx.

{
  return myErrorStatus;
}

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillBRepShapes ( const TopAbs_ShapeEnum  theType) [protected]

Definition at line 357 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Boolean bHasImage, bIsToWork;
  Standard_Integer i, aNbE;
  TopoDS_Iterator aItS;
  TopoDS_Shape aEnew;
  TopTools_IndexedMapOfShape aME;
  TopTools_MapOfShape aMFence;
  TopTools_ListIteratorOfListOfShape aItLS;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  TopExp::MapShapes(myArgument, theType, aME);
  //
  aNbE=aME.Extent();
  for (i=1; i<=aNbE; ++i) {
    const TopoDS_Shape& aE=aME(i);
    //
    if (!aMFence.Add(aE)) {
      continue;
    }
    //
    bIsToWork=myOriginsToWork.IsBound(aE);
    bHasImage=HasImage(aE);
    if (!bHasImage && !bIsToWork) {
      continue;
    }
    //
    MakeBRepShapes(aE, aEnew);
    //
    //myImages / myOrigins
    if (bIsToWork) {
      const TopoDS_Shape& aSkey=myOriginsToWork.Find(aE);
      const TopTools_ListOfShape& aLSD=myImagesToWork.Find(aSkey);
      //
      myImages.Bind(aEnew, aLSD);
      //
      aItLS.Initialize(aLSD);
      for (; aItLS.More(); aItLS.Next()) {
        const TopoDS_Shape& aEx=aItLS.Value();
        myOrigins.Bind(aEx, aEnew);
        //
        aMFence.Add(aEx);
      }
    }
    else {
      TopTools_ListOfShape aLSD;
      //
      aLSD.Append(aE);
      myImages.Bind(aEnew, aLSD);
      myOrigins.Bind(aE, aEnew);
    }
  }//for (i=1; i<=aNbF; ++i) {
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillCompound ( const TopoDS_Shape &  theC) [protected]

Definition at line 499 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Boolean bHasImage;
  TopAbs_ShapeEnum aType;
  TopoDS_Shape aCnew, aCXnew;
  TopoDS_Iterator aItC;
  BRep_Builder aBB;
  //
  bHasImage=HasImage(aC);
  if (!bHasImage) {
    return;
  }
  //
  GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew);
  //
  aItC.Initialize(aC);
  for (; aItC.More(); aItC.Next()) {
    const TopoDS_Shape& aCX=aItC.Value();
    aType=aCX.ShapeType();
    //
    if (aType==TopAbs_COMPOUND) {
      FillCompound(aCX);
    }
    //
    if (myOrigins.IsBound(aCX)) {
      aCXnew=myOrigins.Find(aCX);
      aCXnew.Orientation(aCX.Orientation());
      aBB.Add(aCnew, aCXnew);
    }
    else {
      aBB.Add(aCnew, aCX);
    }
  }
  //
  //myImages / myOrigins
  TopTools_ListOfShape aLSD;
  //
  aLSD.Append(aC);
  myImages.Bind(aCnew, aLSD);
  myOrigins.Bind(aC, aCnew);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillCompounds ( ) [protected]

Definition at line 478 of file GEOMAlgo_Gluer2.cxx.

{
  TopAbs_ShapeEnum aType;
  TopoDS_Iterator aItC;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  aItC.Initialize(myArgument);
  for (; aItC.More(); aItC.Next()) {
    const TopoDS_Shape& aCx=aItC.Value();
    aType=aCx.ShapeType();
    if (aType==TopAbs_COMPOUND) {
      FillCompound(aCx);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillCompSolids ( ) [protected]

Definition at line 314 of file GEOMAlgo_Gluer2.cxx.

{
  FillContainers(TopAbs_COMPSOLID);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillContainers ( const TopAbs_ShapeEnum  theType) [protected]

Definition at line 416 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Boolean bHasImage, bToReverse;
  Standard_Integer i, aNbW;
  TopoDS_Shape aWnew, aEnew;
  TopoDS_Iterator aItS;
  BRep_Builder aBB;
  TopTools_IndexedMapOfShape aMW;
  TopTools_MapOfShape aMFence;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  TopExp::MapShapes(myArgument, aType, aMW);
  //
  aNbW=aMW.Extent();
  for (i=1; i<=aNbW; ++i) {
    const TopoDS_Shape& aW=aMW(i);
    //
    if (!aMFence.Add(aW)) {
      continue;
    }
    //
    bHasImage=HasImage(aW);
    if (!bHasImage) {
      continue;
    }
    //
    GEOMAlgo_Tools3D::MakeContainer(aType, aWnew);
    aWnew.Orientation(aW.Orientation());
    //
    aItS.Initialize(aW);
    for (; aItS.More(); aItS.Next()) {
      const TopoDS_Shape& aE=aItS.Value();
      if (myOrigins.IsBound(aE)) {
        aEnew=myOrigins.Find(aE);
        //
        bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aEnew, aE, myContext);
        if (bToReverse) {
          aEnew.Reverse();
        }
        //
        aBB.Add(aWnew, aEnew);
      }
      else {
        aBB.Add(aWnew, aE);
      }
    }
    //
    //myImages / myOrigins
    TopTools_ListOfShape aLSD;
    //
    aLSD.Append(aW);
    myImages.Bind(aWnew, aLSD);
    myOrigins.Bind(aW, aWnew);
    //
  }//for (i=1; i<=aNbE; ++i) {
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillEdges ( ) [protected]

Definition at line 274 of file GEOMAlgo_Gluer2.cxx.

{
  FillBRepShapes(TopAbs_EDGE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillFaces ( ) [protected]

Definition at line 282 of file GEOMAlgo_Gluer2.cxx.

{
  FillBRepShapes(TopAbs_FACE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillShells ( ) [protected]

Definition at line 298 of file GEOMAlgo_Gluer2.cxx.

{
  FillContainers(TopAbs_SHELL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillSolids ( ) [protected]

Definition at line 306 of file GEOMAlgo_Gluer2.cxx.

{
  FillContainers(TopAbs_SOLID);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillVertices ( ) [protected]

Definition at line 322 of file GEOMAlgo_Gluer2.cxx.

{
  TopAbs_ShapeEnum aType;
  TopoDS_Vertex aVnew;
  TopTools_ListIteratorOfListOfShape aItLS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  aItDMSLS.Initialize(myImagesToWork);
  for (; aItDMSLS.More(); aItDMSLS.Next()) {
    const TopoDS_Shape& aSkey=aItDMSLS.Key();
    aType=aSkey.ShapeType();
    if (aType!=TopAbs_VERTEX) {
      continue;
    }
    //
    const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
    //
    GEOMAlgo_Gluer2::MakeVertex(aLSD, aVnew);
    //
    myImages.Bind(aVnew, aLSD);
    //
    aItLS.Initialize(aLSD);
    for (; aItLS.More(); aItLS.Next()) {
      const TopoDS_Shape& aV=aItLS.Value();
      myOrigins.Bind(aV, aVnew);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::FillWires ( ) [protected]

Definition at line 290 of file GEOMAlgo_Gluer2.cxx.

{
  FillContainers(TopAbs_WIRE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TopTools_ListOfShape & GEOMAlgo_Gluer2::Generated ( const TopoDS_Shape &  theS) [virtual]

Returns the list of shapes generated from the
shape theS.

Reimplemented from GEOMAlgo_BuilderShape.

Definition at line 59 of file GEOMAlgo_Gluer2_2.cxx.

{
  myHistShapes.Clear();
  return myHistShapes;
}
Standard_EXPORT const GEOMAlgo_GluerAlgo::Handle ( IntTools_Context  ) [inherited]

Here is the caller graph for this function:

GEOMAlgo_GluerAlgo::Handle ( IntTools_Context  ) [protected, inherited]
Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted ( ) const [inherited]

Returns true if the at least one shape(or sub-shape)
of arguments has been deleted.

Definition at line 89 of file GEOMAlgo_BuilderShape.cxx.

{
  return myHasDeleted;
}
Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated ( ) const [inherited]

Returns true if the at least one shape(or sub-shape)
of arguments has generated shapes.

Definition at line 97 of file GEOMAlgo_BuilderShape.cxx.

{
  return myHasGenerated;
}
Standard_Boolean GEOMAlgo_Gluer2::HasImage ( const TopoDS_Shape &  theC) [protected]

Definition at line 544 of file GEOMAlgo_Gluer2.cxx.

{
  Standard_Boolean bRet;
  TopAbs_ShapeEnum aType;
  TopoDS_Iterator aItC;
  //
  bRet=Standard_False;
  aItC.Initialize(aC);
  for (; aItC.More(); aItC.Next()) {
    const TopoDS_Shape& aCx=aItC.Value();
    aType=aCx.ShapeType();
    //
    if (aType==TopAbs_COMPOUND) {
      bRet=HasImage(aCx);
      if (bRet) {
        return bRet;
      }
    }
    else {
      bRet=myOrigins.IsBound(aCx);
      if (bRet) {
        return bRet;
      }
    }
  }
  //
  bRet=myOrigins.IsBound(aC);
  //
  return bRet;
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_BuilderShape::HasModified ( ) const [inherited]

Returns true if the at least one shape(or sub-shape)
of arguments has modified shapes.

Definition at line 105 of file GEOMAlgo_BuilderShape.cxx.

{
  return myHasModified;
}
const TopTools_DataMapOfShapeListOfShape & GEOMAlgo_GluerAlgo::Images ( ) const [inherited]

Definition at line 116 of file GEOMAlgo_GluerAlgo.cxx.

{
  return myImages;
}

Here is the caller graph for this function:

const TopTools_IndexedDataMapOfShapeListOfShape & GEOMAlgo_BuilderShape::ImagesResult ( ) const [inherited]

Definition at line 129 of file GEOMAlgo_BuilderShape.cxx.

{
  return myImagesResult;
}

Here is the caller graph for this function:

const TopTools_DataMapOfShapeListOfShape & GEOMAlgo_Gluer2::ImagesToWork ( ) const

Definition at line 144 of file GEOMAlgo_Gluer2.cxx.

{
  return myImagesToWork;
}
Standard_Boolean GEOMAlgo_Gluer2::IsDeleted ( const TopoDS_Shape &  theS) [virtual]

Returns true if the shape theS has been deleted.

Reimplemented from GEOMAlgo_BuilderShape.

Definition at line 115 of file GEOMAlgo_Gluer2_2.cxx.

{
  Standard_Boolean bRet, bContains, bHasImage;
  //
  bRet=Standard_False;
  //
  if (theS.IsNull()) {
    return !bRet; //true
  }
  //
  bContains=myMapShape.Contains(theS);
  if (bContains) {
    return bRet; //false
  }
  //
  bHasImage=myOrigins.IsBound(theS);
  if (bHasImage) {
    const TopoDS_Shape& aSim=myOrigins.Find(theS);
    bContains=myMapShape.Contains(aSim);
    if (bContains) {
      return bRet; //false
    }
  }
  //
  return !bRet; //true
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids ( ) const

Definition at line 128 of file GEOMAlgo_Gluer2.cxx.

{
  return myKeepNonSolids;
}
void GEOMAlgo_Gluer2::MakeBRepShapes ( const TopoDS_Shape &  theS,
TopoDS_Shape &  theSnew 
) [protected]

Definition at line 64 of file GEOMAlgo_Gluer2_1.cxx.

{
  TopAbs_ShapeEnum aType;
  //
  aType=theS.ShapeType();
  if (aType==TopAbs_EDGE) {
    TopoDS_Edge aEE, aEEnew;
    //
    aEE=*((TopoDS_Edge*)&theS);
    MakeEdge(aEE, aEEnew);
    if (myErrorStatus) {
      return;
    }
    //
    theSnew=aEEnew;
  }
  else if (aType==TopAbs_FACE) {
    TopoDS_Face aFF, aFFnew;
    //
    aFF=*((TopoDS_Face*)&theS);
    MakeFace(aFF, aFFnew);
    if (myErrorStatus) {
      return;
    }
    //
    theSnew=aFFnew;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::MakeEdge ( const TopoDS_Edge &  theE,
TopoDS_Edge &  theEnew 
) [protected]

Definition at line 194 of file GEOMAlgo_Gluer2_1.cxx.

{
  myErrorStatus=0;
  //
  Standard_Boolean bIsDE;
  Standard_Real aT1, aT2;
  TopoDS_Vertex aV1, aV2, aVR1, aVR2;
  TopoDS_Edge aEx;
  //
  bIsDE=BRep_Tool::Degenerated(aE);
  //
  aEx=aE;
  aEx.Orientation(TopAbs_FORWARD);
  //
  TopExp::Vertices(aEx, aV1, aV2);
  //
  aT1=BRep_Tool::Parameter(aV1, aEx);
  aT2=BRep_Tool::Parameter(aV2, aEx);
  //
  aVR1=aV1;
  if (myOrigins.IsBound(aV1)) {
    aVR1=*((TopoDS_Vertex*)&myOrigins.Find(aV1));
  }
  aVR1.Orientation(TopAbs_FORWARD);
  //
  aVR2=aV2;
  if (myOrigins.IsBound(aV2)) {
    aVR2=*((TopoDS_Vertex*)&myOrigins.Find(aV2));
  }
  aVR2.Orientation(TopAbs_REVERSED);
  //
  if (!bIsDE) {
    BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
  }
  else {
    Standard_Real aTol;
    BRep_Builder aBB;
    TopoDS_Edge E;
    //
    aTol=BRep_Tool::Tolerance(aE);
    //
    E=aEx;
    E.EmptyCopy();
    //
    aBB.Add  (E, aVR1);
    aBB.Add  (E, aVR2);
    aBB.Range(E, aT1, aT2);
    aBB.Degenerated(E, Standard_True);
    aBB.UpdateEdge(E, aTol);
    //
    aNewEdge=E;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::MakeFace ( const TopoDS_Face &  theF,
TopoDS_Face &  theFnew 
) [protected]

Definition at line 97 of file GEOMAlgo_Gluer2_1.cxx.

{
  Standard_Boolean bIsToReverse, bIsUPeriodic;
  Standard_Integer iRet;
  Standard_Real aTol, aUMin, aUMax, aVMin, aVMax;
  TopAbs_Orientation aOrE;
  Handle(Geom_Surface) aS;
  TopLoc_Location aLoc;
  TopoDS_Shape aW, aWr;
  TopoDS_Edge aEx;
  TopoDS_Face aFF, aFnew;
  TopoDS_Iterator aItW, aItE;
  BRep_Builder aBB;
  TopTools_ListOfShape aLEr;
  TopTools_ListIteratorOfListOfShape aItLE;
  //
  myErrorStatus=0;
  //
  aFF=theF;
  aFF.Orientation(TopAbs_FORWARD);
  //
  aTol=BRep_Tool::Tolerance(aFF);
  aS=BRep_Tool::Surface(aFF, aLoc);
  bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS);
  BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax);
  //
  aBB.MakeFace (aFnew, aS, aLoc, aTol);
  //
  aItW.Initialize(aFF);
  for (; aItW.More(); aItW.Next()) {
    const TopoDS_Shape& aW=aItW.Value();
    //
    if (!myOrigins.IsBound(aW)) {
      aBB.Add(aFnew, aW);
      continue;
    }
    //
    aWr=myOrigins.Find(aW);
    //
    // clear contents of Wr
    aLEr.Clear();
    aItE.Initialize(aWr);
    for (; aItE.More(); aItE.Next()) {
      const TopoDS_Shape& aEr=aItE.Value();
      aLEr.Append(aEr);
    }
    //
    aItLE.Initialize(aLEr);
    for (; aItLE.More(); aItLE.Next()) {
      const TopoDS_Shape& aEr=aItLE.Value();
      aBB.Remove(aWr, aEr);
    }
    //
    // refill contents of Wr
    aItE.Initialize(aW);
    for (; aItE.More(); aItE.Next()) {
      const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aItE.Value()));
      //
      aEx=aE;
      if (myOrigins.IsBound(aE)) {
        aEx=*((TopoDS_Edge*)(&myOrigins.Find(aE)));
      }
      //
      if (!BRep_Tool::Degenerated(aEx)) {
        aEx.Orientation(TopAbs_FORWARD);
        if (bIsUPeriodic) {
          GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aEx, aFF, aUMin, aUMax);
        }
        //
        //modified by NIZNHY-PKV Fri Feb 03 11:18:17 2012f
        iRet=GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(aE, aEx, aFF, myContext);
        if (iRet) {
          continue;
        }
        //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aEx, aFF);
        //modified by NIZNHY-PKV Fri Feb 03 11:18:20 2012t
        //
        bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aEx, aE, myContext);
        if (bIsToReverse) {
          aEx.Reverse();
        }
      }
      else {
        aEx.Orientation(aE.Orientation());
      }
      aBB.Add(aWr, aEx);
    }// for (; aItE.More(); aItE.Next()) {
    //
    aBB.Add(aFnew, aWr);
  }// for (; aItW.More(); aItW.Next()) {
  theFnew=aFnew;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::MakeVertex ( const TopTools_ListOfShape &  theLV,
TopoDS_Vertex &  theV 
) [static]

Definition at line 252 of file GEOMAlgo_Gluer2_1.cxx.

{
  Standard_Integer aNbV;
  Standard_Real aTolV, aD, aDmax;
  gp_XYZ aGC;
  gp_Pnt aP3D, aPGC;
  TopoDS_Vertex aVx;
  BRep_Builder aBB;
  TopTools_ListIteratorOfListOfShape aIt;
  //
  aNbV=aLV.Extent();
  if (!aNbV) {
    return;
  }
  //
  // center of gravity
  aGC.SetCoord(0.,0.,0.);
  aIt.Initialize(aLV);
  for (; aIt.More(); aIt.Next()) {
    aVx=*((TopoDS_Vertex*)(&aIt.Value()));
    aP3D=BRep_Tool::Pnt(aVx);
    aGC+=aP3D.XYZ();
  }
  aGC/=(Standard_Real)aNbV;
  aPGC.SetXYZ(aGC);
  //
  // tolerance value
  aDmax=-1.;
  aIt.Initialize(aLV);
  for (; aIt.More(); aIt.Next()) {
    aVx=*((TopoDS_Vertex*)(&aIt.Value()));
    aP3D=BRep_Tool::Pnt(aVx);
    aTolV=BRep_Tool::Tolerance(aVx);
    aD=aPGC.Distance(aP3D)+aTolV;
    if (aD>aDmax) {
      aDmax=aD;
    }
  }
  //
  aBB.MakeVertex (aNewVertex, aPGC, aDmax);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::MapBRepShapes ( const TopoDS_Shape &  theS,
TopTools_MapOfShape &  theM 
) [static]

Definition at line 298 of file GEOMAlgo_Gluer2_1.cxx.

{
  //Standard_Boolean bHasBRep;
  TopAbs_ShapeEnum aType;
  TopoDS_Iterator aIt;
  //
  aType=aS.ShapeType();
  if (aType==TopAbs_VERTEX ||
      aType==TopAbs_EDGE ||
      aType==TopAbs_FACE) {
    aM.Add(aS);
  }
  //
  aIt.Initialize(aS);
  for(; aIt.More(); aIt.Next()) {
    const TopoDS_Shape& aSx=aIt.Value();
    aType=aSx.ShapeType();
    GEOMAlgo_Gluer2::MapBRepShapes(aSx, aM);
  }
}
void GEOMAlgo_Gluer2::MapShapes ( const TopoDS_Shape &  theS,
TopTools_MapOfShape &  theM 
) [static]

Definition at line 145 of file GEOMAlgo_Gluer2_2.cxx.

{
  TopoDS_Iterator aIt;
  //
  theM.Add(theS);
  aIt.Initialize(theS);
  for (; aIt.More(); aIt.Next()) {
    const TopoDS_Shape& aSx=aIt.Value();
    GEOMAlgo_Gluer2::MapShapes(aSx, theM);
  }
}

Here is the caller graph for this function:

const TopTools_ListOfShape & GEOMAlgo_Gluer2::Modified ( const TopoDS_Shape &  theS) [virtual]

Returns the list of shapes modified from the
shape theS.

Reimplemented from GEOMAlgo_BuilderShape.

Definition at line 68 of file GEOMAlgo_Gluer2_2.cxx.

{
  Standard_Boolean bIsDeleted, bHasImage, bToReverse;
  TopAbs_ShapeEnum aType;
  TopoDS_Shape aSim;
  //
  myHistShapes.Clear();
  //
  aType=theS.ShapeType();
  if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE ||
       aType==TopAbs_FACE || aType==TopAbs_SOLID)) {
    return myHistShapes;
  }
  //
  bIsDeleted=IsDeleted(theS);
  if (bIsDeleted) {
    return myHistShapes;
  }
  //
  bHasImage=myOrigins.IsBound(theS);
  if (!bHasImage) {
    return myHistShapes;
  }
  //
  aSim=myOrigins.Find(theS);
  if (aSim.IsSame(theS)){
    return myHistShapes;
  }
  //
  if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) {
    aSim.Orientation(theS.Orientation());
  }
  else {
    bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSim, theS, myContext);
    if (bToReverse) {
      aSim.Reverse();
    }
  }
  //
  myHistShapes.Append(aSim);
  //
  return myHistShapes;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TopTools_DataMapOfShapeShape & GEOMAlgo_GluerAlgo::Origins ( ) const [inherited]

Definition at line 124 of file GEOMAlgo_GluerAlgo.cxx.

{
  return myOrigins;
}
void GEOMAlgo_Gluer2::Perform ( ) [virtual]

Reimplemented from GEOMAlgo_GluerAlgo.

Definition at line 152 of file GEOMAlgo_Gluer2.cxx.

{
  myErrorStatus=0;
  myWarningStatus=0;
  //
  CheckData();
  if (myErrorStatus) {
    return;
  }
  //
  // Initialize the context
  GEOMAlgo_GluerAlgo::Perform();
  //
  PerformShapesToWork();
  if (myErrorStatus) {
    return;
  }
  if (myWarningStatus==1) {
    // no shapes to glue
    myShape=myArgument;
    return;
  }
  //
  FillVertices();
  if (myErrorStatus) {
    return;
  }
  //
  FillEdges();
  if (myErrorStatus) {
    return;
  }
  //
  FillWires();
  if (myErrorStatus) {
    return;
  }
  //
  FillFaces();
  if (myErrorStatus) {
    return;
  }
  //
  FillShells();
  if (myErrorStatus) {
    return;
  }
  //
  FillSolids();
  if (myErrorStatus) {
    return;
  }
  //
  FillCompSolids();
  if (myErrorStatus) {
    return;
  }
  //
  FillCompounds();
  if (myErrorStatus) {
    return;
  }
  //
  BuildResult();
  if (myErrorStatus) {
    return;
  }
  //
  PrepareHistory();
  if (myErrorStatus) {
    return;
  }
  //
  BRepLib::SameParameter(myShape, myTolerance, Standard_True);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 128 of file GEOMAlgo_Gluer2_3.cxx.

{
  Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD;
  TopTools_ListIteratorOfListOfShape aItLS1, aItLS2;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
  NMTTools_CoupleOfShape aCS;
  NMTTools_ListOfCoupleOfShape aLCS;
  NMTTools_ListIteratorOfListOfCoupleOfShape aItCS;
  //
  myErrorStatus=0;
  myWarningStatus=0;
  //
  myImagesToWork.Clear();
  myOriginsToWork.Clear();
  //
  aNbSD=myImagesDetected.Extent();
  if (!aNbSD) {// no shapes to glue detected
    myWarningStatus=1;
    return;
  }
  //
  aNbSG=myShapesToGlue.Extent();
  if (!aNbSG) {
    // glue all possible
    myImagesToWork=myImagesDetected;
    //
    aItDMSLS.Initialize(myImagesToWork);
    for (; aItDMSLS.More(); aItDMSLS.Next()) {
      const TopoDS_Shape& aSkey=aItDMSLS.Key();
      const TopTools_ListOfShape& aLSD=aItDMSLS.Value();
      aItLS1.Initialize(aLSD);
      for (; aItLS1.More(); aItLS1.Next()) {
        const TopoDS_Shape& aSx=aItLS1.Value();
        myOriginsToWork.Bind(aSx, aSkey);
      }
    }
    return;
  }// if (!aNbSG) {
  //
  // 1. Make pairs
  aItDMSLS.Initialize(myShapesToGlue);
  for (k=0; aItDMSLS.More(); aItDMSLS.Next(), ++k) {
    //const TopoDS_Shape& aSkey=aItDMSLS.Key();
    const TopTools_ListOfShape& aLSG=aItDMSLS.Value();
    aItLS1.Initialize(aLSG);
    for (i=0; aItLS1.More(); aItLS1.Next(), ++i) {
      aItLS2.Initialize(aLSG);
      for (j=0; aItLS2.More(); aItLS2.Next(), ++j) {
        if (j>i) {
          const TopoDS_Shape& aSG1=aItLS1.Value();
          const TopoDS_Shape& aSG2=aItLS2.Value();
          aCS.SetShape1(aSG1);
          aCS.SetShape2(aSG2);
          TreatPair(aCS, aLCS);
        }
      }
    }
  }
  //
  // 2. Find Chains
  TopTools_ListOfShape aLSX;
  NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
  //
  NMTTools_Tools::FindChains(aLCS, aMC);
  //
  // 3. myImagesToWork, myOriginsToWork
  aNbC=aMC.Extent();
  for (i=1; i<=aNbC; ++i) {
    const TopoDS_Shape& aSkey=aMC.FindKey(i);
    const TopTools_IndexedMapOfShape& aM=aMC(i);
    aLSX.Clear();
    aNb=aM.Extent();
    for (j=1; j<=aNb; ++j) {
      const TopoDS_Shape& aS=aM(j);
      aLSX.Append(aS);
      myOriginsToWork.Bind(aS, aSkey);
    }
    myImagesToWork.Bind(aSkey, aLSX);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::PrepareHistory ( ) [protected, virtual]

Prepare information for history support

Reimplemented from GEOMAlgo_BuilderShape.

Definition at line 41 of file GEOMAlgo_Gluer2_2.cxx.

{
  //Standard_Boolean bHasImage, bContainsSD;
  //
  // 1. Clearing
  GEOMAlgo_BuilderShape::PrepareHistory();
  //
  if(myShape.IsNull()) {
    return;
  }
  //
  GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape);
  //
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_GluerAlgo::SetArgument ( const TopoDS_Shape &  theShape) [virtual, inherited]

Definition at line 51 of file GEOMAlgo_GluerAlgo.cxx.

{
  myArgument=theShape;
}

Here is the caller graph for this function:

void GEOMAlgo_GluerAlgo::SetCheckGeometry ( const Standard_Boolean  aFlag) [inherited]

Definition at line 84 of file GEOMAlgo_GluerAlgo.cxx.

{
  myCheckGeometry=aFlag;
}

Here is the caller graph for this function:

void GEOMAlgo_GluerAlgo::SetContext ( const Handle(IntTools_Context)&  theContext) [inherited]

Definition at line 100 of file GEOMAlgo_GluerAlgo.cxx.

{
  myContext=theContext;
}

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::SetKeepNonSolids ( const Standard_Boolean  theFlag)

Definition at line 120 of file GEOMAlgo_Gluer2.cxx.

{
  myKeepNonSolids=aFlag;
}

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::SetShapesToGlue ( const TopTools_DataMapOfShapeListOfShape &  aM)

Definition at line 104 of file GEOMAlgo_Gluer2.cxx.

Here is the caller graph for this function:

void GEOMAlgo_GluerAlgo::SetTolerance ( const Standard_Real  aT) [inherited]

Definition at line 67 of file GEOMAlgo_GluerAlgo.cxx.

{
  myTolerance=aT;
}

Here is the caller graph for this function:

const TopoDS_Shape & GEOMAlgo_BuilderShape::Shape ( ) const [inherited]

Returns the result of algorithm

Definition at line 51 of file GEOMAlgo_BuilderShape.cxx.

{
  return myShape;
}

Here is the caller graph for this function:

const TopTools_DataMapOfShapeListOfShape & GEOMAlgo_Gluer2::ShapesDetected ( ) const

Definition at line 136 of file GEOMAlgo_Gluer2.cxx.

{
  return myImagesDetected;
}

Here is the caller graph for this function:

const TopTools_DataMapOfShapeListOfShape & GEOMAlgo_Gluer2::ShapesToGlue ( ) const

Definition at line 112 of file GEOMAlgo_Gluer2.cxx.

{
  return myShapesToGlue;
}
const TopTools_IndexedDataMapOfShapeListOfShape & GEOMAlgo_Gluer2::StickedShapes ( )

Definition at line 95 of file GEOMAlgo_Gluer2.cxx.

{
  return myDetector.StickedShapes();
}

Here is the call graph for this function:

Standard_Real GEOMAlgo_GluerAlgo::Tolerance ( ) const [inherited]

Definition at line 75 of file GEOMAlgo_GluerAlgo.cxx.

{
  return myTolerance;
}

Here is the caller graph for this function:

void GEOMAlgo_Gluer2::TreatPair ( const NMTTools_CoupleOfShape theCS,
NMTTools_ListOfCoupleOfShape theLCS 
) [protected]

Definition at line 212 of file GEOMAlgo_Gluer2_3.cxx.

{
  if (myErrorStatus) {
    return;
  }
  //
  Standard_Integer i, aNbS1, aNbS2, aNbS;
  TopAbs_ShapeEnum aType, aTypeS;
  TopTools_ListIteratorOfListOfShape aItLS;
  TopTools_IndexedMapOfShape aMS1, aMS2;
  TopTools_DataMapOfShapeListOfShape aDMSLS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS;
  NMTTools_CoupleOfShape aCSS;
  //
  // 1. Checking the pair on whether it can be glued at all
  // 1.1
  const TopoDS_Shape& aS1=aCS.Shape1();
  if (!myOriginsDetected.IsBound(aS1)) {
    myErrorStatus=30;
    return;
  }
  const TopoDS_Shape& aSkey1=myOriginsDetected.Find(aS1);
  // 1.2
  const TopoDS_Shape& aS2=aCS.Shape2();
  if (!myOriginsDetected.IsBound(aS2)) {
    myErrorStatus=30;
    return;
  }
  const TopoDS_Shape& aSkey2=myOriginsDetected.Find(aS2);
  // 1.3
  if (!aSkey1.IsSame(aSkey2)) {
    myErrorStatus=33;
    return;
  }
  //
  // 2. Append the pair to the aLCS
  aLCS.Append(aCS);
  //
  // 3. Treatment the sub-shapes of the pair
  aType=aS1.ShapeType();
  if (aType==TopAbs_VERTEX) {
    return;
  }
  aTypeS=TopAbs_EDGE;
  if (aType==aTypeS) {
    aTypeS=TopAbs_VERTEX;
  }
  //
  MapShapes1(aS1, aTypeS, aMS1);
  MapShapes1(aS2, aTypeS, aMS2);
  //
  aNbS1=aMS1.Extent();
  aNbS2=aMS2.Extent();
  if (aNbS1!=aNbS2) {
    myErrorStatus=31;
    return;
  }
  //
  // 1.
  for (i=1; i<=aNbS1; ++i) {
    const TopoDS_Shape& aSS1=aMS1(i);
    if (aMS2.Contains(aSS1)) {
      continue;
    }
    //
    if (!myOriginsDetected.IsBound(aSS1)) {
      myErrorStatus=30;
      return;
    }
    //
    const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS1);
    if (aDMSLS.IsBound(aSkey)) {
      TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey);
      aLS.Append(aSS1);
    }
    else {
      TopTools_ListOfShape aLS;
      //
      aLS.Append(aSS1);
      aDMSLS.Bind(aSkey, aLS);
    }
  }
  //
  // 2.
  for (i=1; i<=aNbS2; ++i) {
    const TopoDS_Shape& aSS2=aMS2(i);
    if (aMS1.Contains(aSS2)) {
      continue;
    }
    //
    if (!myOriginsDetected.IsBound(aSS2)) {
      myErrorStatus=30;
      return;
    }
    //
    const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS2);
    if (aDMSLS.IsBound(aSkey)) {
      TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey);
      aLS.Append(aSS2);
    }
    else {
      TopTools_ListOfShape aLS;
      //
      aLS.Append(aSS2);
      aDMSLS.Bind(aSkey, aLS);
    }
  }
  //
  // 3.
  aItDMSLS.Initialize(aDMSLS);
  for (; aItDMSLS.More(); aItDMSLS.Next()) {
    //const TopoDS_Shape& aSkey=aItDMSLS.Key();
    const TopTools_ListOfShape& aLS=aItDMSLS.Value();
    aNbS=aLS.Extent();
    if (aNbS!=2) {
      myErrorStatus=32;
      return;
    }
    //
    const TopoDS_Shape& aSS1=aLS.First();
    const TopoDS_Shape& aSS2=aLS.Last();
    aCSS.SetShape1(aSS1);
    aCSS.SetShape2(aSS2);
    TreatPair(aCSS, aLCS);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Integer GEOMAlgo_Algo::WarningStatus ( ) const [inherited]

Definition at line 75 of file GEOMAlgo_Algo.cxx.

{
  return myWarningStatus;
}

Here is the caller graph for this function:


Member Data Documentation

TopoDS_Shape GEOMAlgo_GluerAlgo::myArgument [protected, inherited]

Definition at line 89 of file GEOMAlgo_GluerAlgo.hxx.

Standard_Boolean GEOMAlgo_GluerAlgo::myCheckGeometry [protected, inherited]

Definition at line 91 of file GEOMAlgo_GluerAlgo.hxx.

Standard_Boolean GEOMAlgo_Algo::myComputeInternalShapes [protected, inherited]

Definition at line 73 of file GEOMAlgo_Algo.hxx.

Definition at line 184 of file GEOMAlgo_Gluer2.hxx.

Standard_Integer GEOMAlgo_Algo::myErrorStatus [protected, inherited]

Definition at line 71 of file GEOMAlgo_Algo.hxx.

Standard_Boolean GEOMAlgo_BuilderShape::myHasDeleted [protected, inherited]

Definition at line 100 of file GEOMAlgo_BuilderShape.hxx.

Standard_Boolean GEOMAlgo_BuilderShape::myHasGenerated [protected, inherited]

Definition at line 101 of file GEOMAlgo_BuilderShape.hxx.

Standard_Boolean GEOMAlgo_BuilderShape::myHasModified [protected, inherited]

Definition at line 102 of file GEOMAlgo_BuilderShape.hxx.

TopTools_ListOfShape GEOMAlgo_BuilderShape::myHistShapes [protected, inherited]

Definition at line 98 of file GEOMAlgo_BuilderShape.hxx.

TopTools_DataMapOfShapeListOfShape GEOMAlgo_GluerAlgo::myImages [protected, inherited]

Definition at line 93 of file GEOMAlgo_GluerAlgo.hxx.

TopTools_DataMapOfShapeListOfShape GEOMAlgo_Gluer2::myImagesDetected [protected]

Definition at line 178 of file GEOMAlgo_Gluer2.hxx.

TopTools_IndexedDataMapOfShapeListOfShape GEOMAlgo_BuilderShape::myImagesResult [protected, inherited]

Definition at line 103 of file GEOMAlgo_BuilderShape.hxx.

TopTools_DataMapOfShapeListOfShape GEOMAlgo_Gluer2::myImagesToWork [protected]

Definition at line 180 of file GEOMAlgo_Gluer2.hxx.

Standard_Boolean GEOMAlgo_Gluer2::myKeepNonSolids [protected]

Definition at line 182 of file GEOMAlgo_Gluer2.hxx.

TopTools_MapOfShape GEOMAlgo_BuilderShape::myMapShape [protected, inherited]

Definition at line 99 of file GEOMAlgo_BuilderShape.hxx.

TopTools_DataMapOfShapeShape GEOMAlgo_GluerAlgo::myOrigins [protected, inherited]

Definition at line 94 of file GEOMAlgo_GluerAlgo.hxx.

TopTools_DataMapOfShapeShape GEOMAlgo_Gluer2::myOriginsDetected [protected]

Definition at line 179 of file GEOMAlgo_Gluer2.hxx.

TopTools_DataMapOfShapeShape GEOMAlgo_Gluer2::myOriginsToWork [protected]

Definition at line 181 of file GEOMAlgo_Gluer2.hxx.

TopoDS_Shape GEOMAlgo_BuilderShape::myShape [protected, inherited]

Definition at line 97 of file GEOMAlgo_BuilderShape.hxx.

TopTools_DataMapOfShapeListOfShape GEOMAlgo_Gluer2::myShapesToGlue [protected]

Definition at line 177 of file GEOMAlgo_Gluer2.hxx.

Standard_Real GEOMAlgo_GluerAlgo::myTolerance [protected, inherited]

Definition at line 90 of file GEOMAlgo_GluerAlgo.hxx.

Standard_Integer GEOMAlgo_Algo::myWarningStatus [protected, inherited]

Definition at line 72 of file GEOMAlgo_Algo.hxx.


The documentation for this class was generated from the following files: