Back to index

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

#include <GEOMAlgo_GlueAnalyser.hxx>

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

List of all members.

Public Member Functions

Standard_EXPORT GEOMAlgo_GlueAnalyser ()
virtual Standard_EXPORT ~GEOMAlgo_GlueAnalyser ()
virtual Standard_EXPORT void Perform ()
Standard_EXPORT Standard_Boolean HasSolidsToGlue () const
Standard_EXPORT const
GEOMAlgo_ListOfCoupleOfShapes
SolidsToGlue () const
Standard_EXPORT Standard_Boolean HasSolidsAlone () const
Standard_EXPORT const
TopTools_ListOfShape & 
SolidsAlone () const
Standard_EXPORT void SetCheckGeometry (const Standard_Boolean aFlag)
Standard_EXPORT Standard_Boolean CheckGeometry () const
Standard_EXPORT void SetKeepNonSolids (const Standard_Boolean aFlag)
Standard_EXPORT Standard_Boolean KeepNonSolids () const
Standard_EXPORT Standard_Integer AloneShapes () const
Standard_EXPORT const
TopTools_ListOfShape & 
Modified (const TopoDS_Shape &S)
Standard_EXPORT const
TopTools_ListOfShape & 
Generated (const TopoDS_Shape &S)
Standard_EXPORT Standard_Boolean IsDeleted (const TopoDS_Shape &S)
Standard_EXPORT const
TopTools_DataMapOfShapeListOfShape & 
Images () const
Standard_EXPORT const
TopTools_DataMapOfShapeShape & 
Origins () const
Standard_EXPORT void SetContext (const Handle(IntTools_Context)&theContext)
 Sets cashed geometrical tools

Standard_EXPORT const
Handle_IntTools_Context & 
Context () const
 Returns cashed geometrical tools

Standard_EXPORT void SetShape (const TopoDS_Shape &aS)
Standard_EXPORT void SetTolerance (const Standard_Real aT)
Standard_EXPORT const
TopoDS_Shape & 
Shape () const
Standard_EXPORT Standard_Real Tolerance () const
Standard_EXPORT const
TopoDS_Shape & 
Result () 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.

Protected Member Functions

Standard_EXPORT void DetectVertices ()
Standard_EXPORT void DetectEdges ()
Standard_EXPORT void DetectFaces ()
Standard_EXPORT void DetectShapes (const TopAbs_ShapeEnum aType)
Standard_EXPORT void DetectSolids ()
virtual Standard_EXPORT void CheckData ()
virtual Standard_EXPORT void CheckResult ()
Standard_EXPORT void MakeVertices ()
Standard_EXPORT void MakeEdges ()
Standard_EXPORT void MakeFaces ()
Standard_EXPORT void MakeShapes (const TopAbs_ShapeEnum aType)
Standard_EXPORT void MakeShells ()
Standard_EXPORT void MakeSolids ()
Standard_EXPORT void InnerTolerance ()
Standard_EXPORT void EdgePassKey (const TopoDS_Edge &aE, GEOMAlgo_PassKeyShape &aPK)
Standard_EXPORT void FacePassKey (const TopoDS_Face &aF, GEOMAlgo_PassKeyShape &aPK)
Standard_EXPORT void MakeVertex (const TopTools_ListOfShape &aLV, TopoDS_Vertex &aNewV)
Standard_EXPORT void MakeEdge (const TopoDS_Edge &aEdge, TopoDS_Edge &aNewEdge)
Standard_EXPORT void MakeFace (const TopoDS_Face &aFace, TopoDS_Face &aNewEdge)
Standard_EXPORT Standard_Boolean IsToReverse (const TopoDS_Face &aFR, const TopoDS_Face &aF)
Standard_EXPORT Standard_Boolean HasNewSubShape (const TopoDS_Shape &aS) const
Standard_EXPORT void MakeSubShapes (const TopoDS_Shape &aS, TopTools_MapOfShape &aM, TopoDS_Compound &aC)

Protected Attributes

GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue
TopTools_ListOfShape mySolidsAlone
Standard_Boolean myCheckGeometry
Standard_Boolean myKeepNonSolids
Standard_Real myTol
TopTools_DataMapOfShapeListOfShape myImages
TopTools_DataMapOfShapeShape myOrigins
Standard_Integer myNbAlone
TopTools_ListOfShape myGenerated
TopoDS_Shape myShape
Standard_Real myTolerance
TopoDS_Shape myResult
Handle_IntTools_Context myContext
Standard_Integer myErrorStatus
Standard_Integer myWarningStatus
Standard_Boolean myComputeInternalShapes

Detailed Description

Definition at line 42 of file GEOMAlgo_GlueAnalyser.hxx.


Constructor & Destructor Documentation

Definition at line 67 of file GEOMAlgo_GlueAnalyser.cxx.

Definition at line 75 of file GEOMAlgo_GlueAnalyser.cxx.

{}

Member Function Documentation

Standard_Integer GEOMAlgo_Gluer::AloneShapes ( ) const [inherited]

Definition at line 158 of file GEOMAlgo_Gluer.cxx.

{
  return myNbAlone;
}
void GEOMAlgo_Gluer::CheckData ( ) [protected, virtual, inherited]

Reimplemented from GEOMAlgo_Algo.

Definition at line 753 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  if (myShape.IsNull()) {
    myErrorStatus=5;
    return;
  }
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_Gluer::CheckGeometry ( ) const [inherited]

Definition at line 134 of file GEOMAlgo_Gluer.cxx.

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

Reimplemented from GEOMAlgo_Algo.

Definition at line 702 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  if (myResult.IsNull()) {
    myErrorStatus=6;
    return;
  }
  //
  Standard_Boolean bFound;
  Standard_Integer i, j, aNbS, aNbFS, aNbSx;
  TopTools_IndexedMapOfShape aMS, aMFS;
  TopTools_IndexedDataMapOfShapeListOfShape aMFR;
  //
  TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFR);
  TopExp::MapShapes(myResult, TopAbs_SOLID, aMS);
  //

  myNbAlone=0;
  aNbS=aMS.Extent();
  for (i=1; i<=aNbS; ++i) {
    const TopoDS_Shape& aSolid=aMS(i);
    //
    aMFS.Clear();
    TopExp::MapShapes(aSolid, TopAbs_FACE, aMFS);
    //
    bFound=Standard_False;
    aNbFS=aMFS.Extent();
    for (j=1; j<=aNbFS; ++j) {
      const TopoDS_Shape& aFS=aMFS(j);
      if (aMFR.Contains(aFS)) {
       const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS);
       aNbSx=aLSx.Extent();
       if (aNbSx==2) {
         bFound=!bFound;
         break;
       }
      }
    }
    //
    if (!bFound) {
      myWarningStatus=1;
      ++myNbAlone;
      //break;
    }
  }
}

Here is the call graph for this function:

Here is the caller 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:

Standard_EXPORT const Handle_IntTools_Context& GEOMAlgo_ShapeAlgo::Context ( ) const [inherited]

Returns cashed geometrical tools

void GEOMAlgo_GlueAnalyser::DetectEdges ( ) [protected]

Definition at line 253 of file GEOMAlgo_GlueAnalyser.cxx.

{
  DetectShapes(TopAbs_EDGE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_GlueAnalyser::DetectFaces ( ) [protected]

Definition at line 245 of file GEOMAlgo_GlueAnalyser.cxx.

{
  DetectShapes(TopAbs_FACE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_GlueAnalyser::DetectShapes ( const TopAbs_ShapeEnum  aType) [protected]

Definition at line 261 of file GEOMAlgo_GlueAnalyser.cxx.

{
  myErrorStatus=0;
  //
  Standard_Integer i, aNbF, aNbSDF, iErr;
  TopoDS_Shape aNewShape;
  TopTools_IndexedMapOfShape aMF;
  TopTools_ListIteratorOfListOfShape aItS;
  GEOMAlgo_PassKeyShape aPKF;
  GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
  //
  TopExp::MapShapes(myShape, aType, aMF);
  //
  aNbF=aMF.Extent();
  for (i=1; i<=aNbF; ++i) {
    const TopoDS_Shape& aS=aMF(i);
    //
    //aPKF.Clear();//qft
    if (aType==TopAbs_FACE) {
      const TopoDS_Face& aF=TopoDS::Face(aS);
      FacePassKey(aF, aPKF);
    }
    else if (aType==TopAbs_EDGE) {
      const TopoDS_Edge& aE=TopoDS::Edge(aS);
      EdgePassKey(aE, aPKF);
    }
    //
    if (myErrorStatus) {
      return;
    }
    //
    if (aMPKLF.Contains(aPKF)) {
      TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
      aLSDF.Append(aS);
    }
    else {
      TopTools_ListOfShape aLSDF;
      //
      aLSDF.Append(aS);
      aMPKLF.Add(aPKF, aLSDF);
    }
  }
  // check geometric coincidence
  if (myCheckGeometry) {
    iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); //XX
    if (iErr) {
      myErrorStatus=200;
      return;
    }
  }
  //
  // Images/Origins
  aNbF=aMPKLF.Extent();
  for (i=1; i<=aNbF; ++i) {
    const TopTools_ListOfShape& aLSDF=aMPKLF(i);
    aNbSDF=aLSDF.Extent();
    if (!aNbSDF) {
      myErrorStatus=4; // it must not be
    }
    //
    const TopoDS_Shape& aS1=aLSDF.First();
    aNewShape=aS1;
    //
    myImages.Bind(aNewShape, aLSDF);
    // origins
    aItS.Initialize(aLSDF);
    for (; aItS.More(); aItS.Next()) {
      const TopoDS_Shape& aFSD=aItS.Value();
      if (!myOrigins.IsBound(aFSD)) {
        myOrigins.Bind(aFSD, aNewShape);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 339 of file GEOMAlgo_GlueAnalyser.cxx.

{
  myErrorStatus=0;
  //
  Standard_Integer i, aNbF, aNbS, aNbC, aNbX;
  TopoDS_Compound aCmp;
  BRep_Builder aBB;
  TopTools_IndexedDataMapOfShapeListOfShape aMFS;
  TopTools_IndexedMapOfShape aMx, aMS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
  GEOMAlgo_CoupleOfShapes aCS;
  //
  GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS;
  GEOMAlgo_PassKeyShape aPKSx;
  //
  aBB.MakeCompound(aCmp);
  //
  TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
  //
  aItIm.Initialize(myImages);
  for (; aItIm.More(); aItIm.Next()) {
    const TopoDS_Shape& aIm=aItIm.Key();
    if (aIm.ShapeType()!=TopAbs_FACE) {
      continue;
    }
    //
    const TopTools_ListOfShape& aLF=aItIm.Value();
    aNbF=aLF.Extent();
    if (aNbF!=2) {
      continue;
    }
    //
    TopoDS_Shape aSx[2], aFx[2];
    //
    aFx[0]=aLF.First();
    aFx[1]=aLF.Last();
    for (i=0; i<2; ++i) {
      if (!aMFS.Contains(aFx[i])) {
        continue;// it must not be so
      }
      //
      const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]);
      aNbS=aLS.Extent();
      if (aNbS!=1) {
        continue;
      }
      aSx[i]=aLS.First();
    }
    //
    if (aSx[0].IsNull() || aSx[1].IsNull()) {
      continue;
    }
    //
    //aPKSx.Clear();//qft
    //qf
    //aPKSx.SetIds(aSx[0], aSx[1]);
    aPKSx.SetShapes(aSx[0], aSx[1]);
    //qt
    //
    if (!aMPKLS.Contains(aPKSx)) {
      TopTools_ListOfShape aLSx;
      //
      aLSx.Append(aSx[0]);
      aLSx.Append(aSx[1]);
      //
      aMPKLS.Add(aPKSx, aLSx);
    }
  }
  //
  mySolidsToGlue.Clear();
  mySolidsAlone.Clear();

  //
  aNbC=aMPKLS.Extent();
  if (!aNbC) {
    return;
  }
  //
  for (i=1; i<=aNbC; ++i) {
    const TopTools_ListOfShape& aLSx=aMPKLS(i);
    const TopoDS_Shape& aSx1=aLSx.First();
    const TopoDS_Shape& aSx2=aLSx.Last();
    aCS.SetShape1(aSx1);
    aCS.SetShape2(aSx2);
    mySolidsToGlue.Append(aCS);
    //
    if (!aMx.Contains(aSx1)) {
      aBB.Add(aCmp, aSx1);
      aMx.Add(aSx1);
    }
    if (!aMx.Contains(aSx2)) {
      aBB.Add(aCmp, aSx2);
      aMx.Add(aSx2);
    }
  }
  myResult=aCmp;
  //
  // check alone solids
  TopExp::MapShapes(myShape, TopAbs_SOLID, aMS);
  //
  aNbX=aMx.Extent();
  for (i=1; i<=aNbX; ++i) {
    const TopoDS_Shape& aSx=aMx(i);
    if (!aMS.Contains(aSx)) {
      mySolidsAlone.Append(aSx);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 158 of file GEOMAlgo_GlueAnalyser.cxx.

{
  myErrorStatus=0;
  //
  Standard_Integer j, i, aNbV, aIndex, aNbVSD;
  TColStd_ListIteratorOfListOfInteger aIt;
  Handle(Bnd_HArray1OfBox) aHAB;
  Bnd_BoundSortBox aBSB;
  TopoDS_Shape aSTmp, aVF;
  TopoDS_Vertex aVnew;
  TopTools_IndexedMapOfShape aMV, aMVProcessed;
  TopTools_ListIteratorOfListOfShape aItS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
  GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
  GEOMAlgo_IndexedDataMapOfShapeBox aMSB;
  //
  TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV);
  aNbV=aMV.Extent();
  if (!aNbV) {
    myErrorStatus=2; // no vertices in source shape
    return;
  }
  //
  aHAB=new Bnd_HArray1OfBox(1, aNbV);
  //
  for (i=1; i<=aNbV; ++i) {
    const TopoDS_Shape& aV=aMV(i);
    Bnd_Box aBox;
    //
    aBox.SetGap(myTol);
    BRepBndLib::Add(aV, aBox);
    aHAB->SetValue(i, aBox);
    aMIS.Add(i, aV);
    aMSB.Add(aV, aBox);
  }
  //
  aBSB.Initialize(aHAB);
  //
  for (i=1; i<=aNbV; ++i) {
    const TopoDS_Shape& aV=aMV(i);
    //
    if (aMVProcessed.Contains(aV)) {
      continue;
    }
    //
    const Bnd_Box& aBoxV=aMSB.FindFromKey(aV);
    const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV);
    aNbVSD=aLI.Extent();
    if (!aNbVSD) {
      myErrorStatus=3; // it must not be
      return;
    }
    //
    // Images
    TopTools_ListOfShape aLVSD;
    //
    aIt.Initialize(aLI);
    for (j=0; aIt.More(); aIt.Next(), ++j) {
      aIndex=aIt.Value();
      const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex);
      if(!j) {
        aVF=aVx;
      }
      aLVSD.Append(aVx);
      aMVProcessed.Add(aVx);
    }
    myImages.Bind(aVF, aLVSD);
  }
  // Origins
  aItIm.Initialize(myImages);
  for (; aItIm.More(); aItIm.Next()) {
    const TopoDS_Shape& aV=aItIm.Key();
    const TopTools_ListOfShape& aLVSD=aItIm.Value();
    //
    aItS.Initialize(aLVSD);
    for (; aItS.More(); aItS.Next()) {
      const TopoDS_Shape& aVSD=aItS.Value();
      if (!myOrigins.IsBound(aVSD)) {
        myOrigins.Bind(aVSD, aV);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::EdgePassKey ( const TopoDS_Edge &  aE,
GEOMAlgo_PassKeyShape aPK 
) [protected, inherited]

Definition at line 824 of file GEOMAlgo_Gluer.cxx.

{
  TopoDS_Vertex aV1, aV2;
  //
  TopExp::Vertices(aE, aV1, aV2);
  //
  if (!myOrigins.IsBound(aV1) || !myOrigins.IsBound(aV2) ) {
     myErrorStatus=100;
     return;
  }
  const TopoDS_Shape& aVR1=myOrigins.Find(aV1);
  const TopoDS_Shape& aVR2=myOrigins.Find(aV2);
  aPK.SetShapes(aVR1, aVR2);
}

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_Gluer::FacePassKey ( const TopoDS_Face &  aF,
GEOMAlgo_PassKeyShape aPK 
) [protected, inherited]

Definition at line 799 of file GEOMAlgo_Gluer.cxx.

{
  Standard_Integer i, aNbE;
  TopTools_ListOfShape aLE;
  TopTools_IndexedMapOfShape aME;
  //
  TopExp::MapShapes(aF, TopAbs_EDGE, aME);
  aNbE=aME.Extent();
  //
  for (i=1; i<=aNbE; ++i) {
    const TopoDS_Shape& aE=aME(i);
    if (!myOrigins.IsBound(aE)) {
      myErrorStatus=102;
      return;
    }
    const TopoDS_Shape& aER=myOrigins.Find(aE);
    aLE.Append(aER);
  }
  aPK.SetShapes(aLE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TopTools_ListOfShape & GEOMAlgo_Gluer::Generated ( const TopoDS_Shape &  S) [inherited]

Definition at line 1143 of file GEOMAlgo_Gluer.cxx.

{
  myGenerated.Clear();
  return myGenerated;
}
Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape ( const TopoDS_Shape &  aS) const [protected, inherited]

Definition at line 1059 of file GEOMAlgo_Gluer.cxx.

{
  Standard_Boolean bRet;
  Standard_Integer i, aNbSS;
  TopTools_IndexedMapOfShape aMSS;
  //
  GetSubShapes(aS, aMSS);
  //
  bRet=Standard_False;
  aNbSS=aMSS.Extent();
  for (i=1; i<=aNbSS; ++i) {
    const TopoDS_Shape& aSS=aMSS(i);
    if (aSS.ShapeType()==TopAbs_WIRE) {
      continue;
    }
    //
    bRet=!myOrigins.IsBound(aSS);
    if (bRet) {
      return bRet;
    }
    //
    const TopoDS_Shape& aSSIm=myOrigins.Find(aSS);
    bRet=!aSSIm.IsSame(aSS);
    if (bRet) {
      return bRet;
    }
  }
  return bRet;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone ( ) const

Definition at line 89 of file GEOMAlgo_GlueAnalyser.cxx.

{
  return !mySolidsAlone.IsEmpty();
}
Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue ( ) const

Definition at line 81 of file GEOMAlgo_GlueAnalyser.cxx.

{
  return !mySolidsToGlue.IsEmpty();
}

Here is the caller graph for this function:

const TopTools_DataMapOfShapeListOfShape & GEOMAlgo_Gluer::Images ( ) const [inherited]

Definition at line 166 of file GEOMAlgo_Gluer.cxx.

{
  return myImages;
}
void GEOMAlgo_Gluer::InnerTolerance ( ) [protected, inherited]

Definition at line 766 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  /*
  Standard_Integer i;
  Standard_Real aX[3][2], dH, dHmin, aCoef, aTolTresh;
  Bnd_Box aBox;
  //
  BRepBndLib::Add(myShape, aBox);
  aBox.Get(aX[0][0], aX[1][0], aX[2][0], aX[0][1], aX[1][1], aX[2][1]);
  //
  dHmin=aX[0][1]-aX[0][0];
  for (i=1; i<3; ++i) {
    dH=aX[i][1]-aX[i][0];
    if (dH<dHmin) {
      dHmin=dH;
    }
  }
  //
  myTol=myTolerance;
  aCoef=0.01;
  aTolTresh=aCoef*dHmin;
  if (myTol>aTolTresh) {
    myTol=aTolTresh;
  }
  */
  myTol=myTolerance;
}

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_Gluer::IsDeleted ( const TopoDS_Shape &  S) [inherited]

Definition at line 1152 of file GEOMAlgo_Gluer.cxx.

{
  Standard_Boolean bRet=Standard_False;
  //
  const TopTools_ListOfShape& aL=Modified(aS);
  bRet=!aL.IsEmpty();
  //
  return bRet;
}

Here is the call graph for this function:

Standard_Boolean GEOMAlgo_Gluer::IsToReverse ( const TopoDS_Face &  aFR,
const TopoDS_Face &  aF 
) [protected, inherited]

Definition at line 1013 of file GEOMAlgo_Gluer.cxx.

{
  Standard_Boolean bRet;
  Standard_Real aT, aT1, aT2, aTR, aScPr;
  TopExp_Explorer aExp;
  Handle(Geom_Curve)aC3D;
  gp_Pnt aP;
  gp_Dir aDNF, aDNFR;
  //
  bRet=Standard_False;
  //
  aExp.Init(aF, TopAbs_EDGE);
  for (; aExp.More(); aExp.Next()) {
    const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
    //
    if (BRep_Tool::Degenerated(aE)) {
      continue;
    }
    //
    const TopoDS_Edge& aER=TopoDS::Edge(myOrigins.Find(aE));
    //
    aC3D=BRep_Tool::Curve(aE, aT1, aT2);
    aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2);
    aC3D->D0(aT, aP);
    myContext->ProjectPointOnEdge(aP, aER, aTR);
    //
    BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNF);
    if (aF.Orientation()==TopAbs_REVERSED) {
      aDNF.Reverse();
    }
    //
    BOPTools_Tools3D::GetNormalToFaceOnEdge (aER, aFR, aTR, aDNFR);
    if (aFR.Orientation()==TopAbs_REVERSED) {
      aDNFR.Reverse();
    }
    //
    aScPr=aDNF*aDNFR;
    return (aScPr<0.);
  }
  return bRet;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids ( ) const [inherited]

Definition at line 150 of file GEOMAlgo_Gluer.cxx.

{
  return myKeepNonSolids;
}
void GEOMAlgo_Gluer::MakeEdge ( const TopoDS_Edge &  aEdge,
TopoDS_Edge &  aNewEdge 
) [protected, inherited]

Definition at line 889 of file GEOMAlgo_Gluer.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=TopoDS::Vertex(myOrigins.Find(aV1));
  aVR1.Orientation(TopAbs_FORWARD);
  aVR2=TopoDS::Vertex(myOrigins.Find(aV2));
  aVR2.Orientation(TopAbs_REVERSED);
  //
  if (bIsDE) {
    Standard_Real aTol;
    BRep_Builder aBB;
    TopoDS_Edge E;
    TopAbs_Orientation anOrE;
    //
    anOrE=aE.Orientation();
    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;
  }
  //
  else {
    BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeEdges ( ) [protected, inherited]

Definition at line 588 of file GEOMAlgo_Gluer.cxx.

{
  MakeShapes(TopAbs_EDGE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeFace ( const TopoDS_Face &  aFace,
TopoDS_Face &  aNewEdge 
) [protected, inherited]

Definition at line 943 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  Standard_Boolean bIsToReverse, bIsUPeriodic;
  Standard_Real aTol, aUMin, aUMax, aVMin, aVMax;
  TopoDS_Edge aER;
  TopoDS_Wire newWire;
  TopoDS_Face aFFWD, newFace;
  TopLoc_Location aLoc;
  Handle(Geom_Surface) aS;
  Handle(Geom2d_Curve) aC2D;
  TopExp_Explorer aExpW, aExpE;
  BRep_Builder aBB;
  //
  aFFWD=aF;
  aFFWD.Orientation(TopAbs_FORWARD);
  //
  aS=BRep_Tool::Surface(aFFWD, aLoc);
  bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS);
  aTol=BRep_Tool::Tolerance(aFFWD);
  BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
  //
  aBB.MakeFace (newFace, aS, aLoc, aTol);
  //
  aExpW.Init(aFFWD, TopAbs_WIRE);
  for (; aExpW.More(); aExpW.Next()) {
    aBB.MakeWire(newWire);
    const TopoDS_Wire& aW=TopoDS::Wire(aExpW.Current());
    aExpE.Init(aW, TopAbs_EDGE);
    for (; aExpE.More(); aExpE.Next()) {
      const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
      aER=TopoDS::Edge(myOrigins.Find(aE));
      //
      aER.Orientation(TopAbs_FORWARD);
      if (!BRep_Tool::Degenerated(aER)) {
       // build p-curve
       if (bIsUPeriodic) {
         GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
       }
       BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);

       // orient image
       bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
       if (bIsToReverse) {
         aER.Reverse();
       }
      }
      else {
       aER.Orientation(aE.Orientation());
      }
      //
      aBB.Add(newWire, aER);
    }
    // xf
    TopTools_ListOfShape aLW;
    //
    aLW.Append(aW);
    myImages.Bind(newWire, aLW);
    myOrigins.Bind(aW, newWire);
    // xt
    aBB.Add(newFace, newWire);
  }
  aNewFace=newFace;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeFaces ( ) [protected, inherited]

Definition at line 580 of file GEOMAlgo_Gluer.cxx.

{
  MakeShapes(TopAbs_FACE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeShapes ( const TopAbs_ShapeEnum  aType) [protected, inherited]

Definition at line 596 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  Standard_Boolean bHasNewSubShape;
  Standard_Integer i, aNbF, aNbSDF, iErr;
  TopoDS_Shape aNewShape;
  TopTools_IndexedMapOfShape aMF;
  TopTools_ListIteratorOfListOfShape aItS;
  GEOMAlgo_PassKeyShape aPKF;
  GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
  //
  TopExp::MapShapes(myShape, aType, aMF);
  //
  aNbF=aMF.Extent();
  for (i=1; i<=aNbF; ++i) {
    const TopoDS_Shape& aS=aMF(i);
    //
    if (aType==TopAbs_FACE) {
      const TopoDS_Face& aF=TopoDS::Face(aS);
      FacePassKey(aF, aPKF);
    }
    else if (aType==TopAbs_EDGE) {
      const TopoDS_Edge& aE=TopoDS::Edge(aS);
      EdgePassKey(aE, aPKF);
    }
    //
    if (myErrorStatus) {
      return;
    }
    //
    if (aMPKLF.Contains(aPKF)) {
      TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
      aLSDF.Append(aS);
    }
    else {
      TopTools_ListOfShape aLSDF;
      //
      aLSDF.Append(aS);
      aMPKLF.Add(aPKF, aLSDF);
    }
  }
  // check geometric coincidence
  if (myCheckGeometry) {
    iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext);
    if (iErr) {
      myErrorStatus=200;
      return;
    }
  }
  //
  // Images/Origins
  //
  aNbF=aMPKLF.Extent();
  for (i=1; i<=aNbF; ++i) {
    const TopTools_ListOfShape& aLSDF=aMPKLF(i);
    aNbSDF=aLSDF.Extent();
    if (!aNbSDF) {
      myErrorStatus=4; // it must not be
    }
    //
    const TopoDS_Shape& aS1=aLSDF.First();
    //
    bHasNewSubShape=Standard_True;
    // prevent creation of a new shape if there are not
    // new sub-shapes of aSS among the originals
    if (aNbSDF==1) {
      bHasNewSubShape=HasNewSubShape(aS1);
      if (!bHasNewSubShape) {
       aNewShape=aS1;
       aNewShape.Orientation(TopAbs_FORWARD);
      }
    }
    //
    if (bHasNewSubShape) {
      if (aType==TopAbs_FACE) {
       TopoDS_Face aNewFace;
       //
       const TopoDS_Face& aF1=TopoDS::Face(aS1);
       MakeFace(aF1, aNewFace);
       aNewShape=aNewFace;
      }
      else if (aType==TopAbs_EDGE) {
       TopoDS_Edge aNewEdge;
       //
       const TopoDS_Edge& aE1=TopoDS::Edge(aS1);
       MakeEdge(aE1, aNewEdge);
       aNewShape=aNewEdge;
      }
    }
    //
    myImages.Bind(aNewShape, aLSDF);
    // origins
    aItS.Initialize(aLSDF);
    for (; aItS.More(); aItS.Next()) {
      const TopoDS_Shape& aFSD=aItS.Value();
      if (!myOrigins.IsBound(aFSD)) {
       myOrigins.Bind(aFSD, aNewShape);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeShells ( ) [protected, inherited]

Definition at line 532 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  Standard_Boolean bIsToReverse;
  Standard_Integer i, aNbS;
  TopAbs_Orientation anOr;
  TopoDS_Shell aNewShell;
  TopoDS_Face aFR;
  TopTools_IndexedMapOfShape aMS;
  TopExp_Explorer aExp;
  BRep_Builder aBB;
  //
  TopExp::MapShapes(myShape, TopAbs_SHELL, aMS);
  //
  aNbS=aMS.Extent();
  for (i=1; i<=aNbS; ++i) {
    const TopoDS_Shell& aShell=TopoDS::Shell(aMS(i));
    anOr=aShell.Orientation();
    //
    aBB.MakeShell(aNewShell);
    aNewShell.Orientation(anOr);
    aExp.Init(aShell, TopAbs_FACE);
    for (; aExp.More(); aExp.Next()) {
      const TopoDS_Face& aF=TopoDS::Face(aExp.Current());
      aFR=TopoDS::Face(myOrigins.Find(aF));
      if (aFR.IsSame(aF)) {
       aBB.Add(aNewShell, aF);
       continue;
      }
      bIsToReverse=IsToReverse(aFR, aF);
      if (bIsToReverse) {
       aFR.Reverse();
      }
      aBB.Add(aNewShell, aFR);
    }
    //
    TopTools_ListOfShape aLS;
    //
    aLS.Append(aShell);
    myImages.Bind(aNewShell, aLS);
    myOrigins.Bind(aShell, aNewShell);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeSolids ( ) [protected, inherited]

Definition at line 508 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  BRep_Builder aBB;
  TopoDS_Compound aCmp;
  TopTools_MapOfShape aMS;
  //
  aBB.MakeCompound(aCmp);
  //
  // Add images of all initial sub-shapes in the result.
  // If myKeepNonSolids==false, add only solids images.
  MakeSubShapes(myShape, aMS, aCmp);
  //
  myResult=aCmp;
  //
  if (aMS.Extent()) {
    BOP_CorrectTolerances::CorrectCurveOnSurface(myResult);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeSubShapes ( const TopoDS_Shape &  aS,
TopTools_MapOfShape &  aM,
TopoDS_Compound &  aC 
) [protected, inherited]

Definition at line 403 of file GEOMAlgo_Gluer.cxx.

{
  if (theMS.Contains(theShape))
    return;
  //
  BRep_Builder aBB;
  //
  theMS.Add(theShape);
  //
  if (theShape.ShapeType() == TopAbs_COMPOUND ||
      theShape.ShapeType() == TopAbs_COMPSOLID)  {
    TopoDS_Iterator It (theShape, Standard_True, Standard_True);
    for (; It.More(); It.Next())    {
      MakeSubShapes(It.Value(), theMS, theResult);
    }
  }
  else if (theShape.ShapeType() == TopAbs_SOLID)  {
    // build a solid
    TopoDS_Solid aNewSolid;
    TopExp_Explorer aExpS, aExp;
    //
    const TopoDS_Solid& aSolid = TopoDS::Solid(theShape);
    //
    TopAbs_Orientation anOr = aSolid.Orientation();
    //
    aBB.MakeSolid(aNewSolid);
    aNewSolid.Orientation(anOr);
    //
    aExp.Init(aSolid, TopAbs_SHELL);
    for (; aExp.More(); aExp.Next())
    {
      const TopoDS_Shape& aShell=aExp.Current();
      const TopoDS_Shape& aShellR=myOrigins.Find(aShell);
      aBB.Add(aNewSolid, aShellR);
    }
    //
    TopTools_ListOfShape aLS;
    //
    aLS.Append(aSolid);
    myImages.Bind(aNewSolid, aLS);
    myOrigins.Bind(aSolid, aNewSolid);
    //
    aBB.Add(theResult, aNewSolid);
  }
  else if (theShape.ShapeType() == TopAbs_WIRE)  {
    if (myKeepNonSolids)    {
      // just add image
      if (!myOrigins.IsBound(theShape))   {
        // build wire
        const TopoDS_Wire& aW=TopoDS::Wire(theShape);
        //
        TopoDS_Wire newWire;
        aBB.MakeWire(newWire);
        //
        TopExp_Explorer aExpE (aW, TopAbs_EDGE);
        for (; aExpE.More(); aExpE.Next()) {
          const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
          TopoDS_Edge aER=TopoDS::Edge(myOrigins.Find(aE));
          //
          aER.Orientation(TopAbs_FORWARD);
          if (!BRep_Tool::Degenerated(aER)) {
            // build p-curve
            //if (bIsUPeriodic) {
            //  GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
            //}
            //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD);
            //
            // orient image
            Standard_Boolean bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext);
            if (bIsToReverse) {
              aER.Reverse();
            }
          }
          else {
            aER.Orientation(aE.Orientation());
          }
          //
          aBB.Add(newWire, aER);
        }
        // xf
        TopTools_ListOfShape aLW;
        //
        aLW.Append(aW);
        myImages.Bind(newWire, aLW);
        myOrigins.Bind(aW, newWire);
      }
      const TopoDS_Shape& aShapeR = myOrigins.Find(theShape);
      aBB.Add(theResult, aShapeR);
    }
  }
  else
  {
    if (myKeepNonSolids)    {
      // just add image
      const TopoDS_Shape& aShapeR = myOrigins.Find(theShape);
      aBB.Add(theResult, aShapeR);
    }
  }
}

Here is the caller graph for this function:

void GEOMAlgo_Gluer::MakeVertex ( const TopTools_ListOfShape &  aLV,
TopoDS_Vertex &  aNewV 
) [protected, inherited]

Definition at line 843 of file GEOMAlgo_Gluer.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_Gluer::MakeVertices ( ) [protected, inherited]

Definition at line 212 of file GEOMAlgo_Gluer.cxx.

{
  myErrorStatus=0;
  //
  Standard_Integer j, i, aNbV, aNbVSD;
  Standard_Real aTolV;
  gp_Pnt aPV;
  TColStd_ListIteratorOfListOfInteger aIt;
  TopoDS_Shape aVF;
  TopoDS_Vertex aVnew;
  TopTools_IndexedMapOfShape aMV, aMVProcessed;
  TopTools_ListIteratorOfListOfShape aItS;
  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
  TopTools_DataMapOfShapeListOfShape aMVV;
  GEOMAlgo_IndexedDataMapOfIntegerShape aMIS;
  //modified by NIZNHY-PKV Thu Jan 21 10:03:07 2010f
  //GEOMAlgo_IndexedDataMapOfShapeBox aMSB;
  NMTDS_IndexedDataMapOfShapeBndSphere aMSB;
  //modified by NIZNHY-PKV Thu Jan 21 10:03:10 2010t
  //
  NMTDS_BndSphereTreeSelector aSelector;
  NMTDS_BndSphereTree aBBTree;
  NCollection_UBTreeFiller <Standard_Integer, NMTDS_BndSphere> aTreeFiller(aBBTree);
  //
  TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV);
  aNbV=aMV.Extent();
  if (!aNbV) {
    myErrorStatus=2; // no vertices in source shape
    return;
  }
  //
  for (i=1; i<=aNbV; ++i) {
    NMTDS_BndSphere aBox;
    //
    const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
    aPV=BRep_Tool::Pnt(aV);
    aTolV=BRep_Tool::Tolerance(aV);
    //
    aBox.SetGap(myTol);
    aBox.SetCenter(aPV);
    aBox.SetRadius(aTolV);
    //
    aTreeFiller.Add(i, aBox);
    //
    aMIS.Add(i, aV);
    aMSB.Add(aV, aBox);
  }
  //
  aTreeFiller.Fill();
  //
  //------------------------------
  // Chains
  for (i=1; i<=aNbV; ++i) {
    const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i));
    //
    if (aMVProcessed.Contains(aV)) {
      continue;
    }
    //
    Standard_Integer aNbIP, aIP, aNbIP1, aIP1;
    TopTools_ListOfShape aLVSD;
    TColStd_MapOfInteger aMIP, aMIP1, aMIPC;
    TColStd_MapIteratorOfMapOfInteger aIt1;
    //
    aMIP.Add(i);
    while(1) {
      aNbIP=aMIP.Extent();
      aIt1.Initialize(aMIP);
      for(; aIt1.More(); aIt1.Next()) {
       aIP=aIt1.Key();
       if (aMIPC.Contains(aIP)) {
         continue;
       }
       //
       const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
       //modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f
       const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP);
       //const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP);
       //modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t
       //
       aSelector.Clear();
       aSelector.SetBox(aBoxVP);
       //
       aNbVSD=aBBTree.Select(aSelector);
       if (!aNbVSD) {
         continue;  // it must not be
       }
       //
       const TColStd_ListOfInteger& aLI=aSelector.Indices();
       //
       aIt.Initialize(aLI);
       for (; aIt.More(); aIt.Next()) {
         aIP1=aIt.Value();
         if (aMIP.Contains(aIP1)) {
           continue;
         }
         aMIP1.Add(aIP1);
       } //for (; aIt.More(); aIt.Next()) {
      }//for(; aIt1.More(); aIt1.Next()) {
      //
      aNbIP1=aMIP1.Extent();
      if (!aNbIP1) {
       break;
      }
      //
      aIt1.Initialize(aMIP);
      for(; aIt1.More(); aIt1.Next()) {
       aIP=aIt1.Key();
       aMIPC.Add(aIP);
      }
      //
      aMIP.Clear();
      aIt1.Initialize(aMIP1);
      for(; aIt1.More(); aIt1.Next()) {
       aIP=aIt1.Key();
       aMIP.Add(aIP);
      }
      aMIP1.Clear();
    }// while(1)
    //
    // Fill myImages
    aNbIP=aMIPC.Extent();
    //
    if (!aNbIP) {// no SD vertices founded
      aVF=aV;
      aLVSD.Append(aV);
      aMVProcessed.Add(aV);
    }
    else { // SD vertices founded [ aMIPC ]
      aIt1.Initialize(aMIPC);
      for(j=0; aIt1.More(); aIt1.Next(), ++j) {
       aIP=aIt1.Key();
       const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP);
       if (!j) {
         aVF=aVP;
       }
       aLVSD.Append(aVP);
       aMVProcessed.Add(aVP);
      }
    }
    myImages.Bind(aVF, aLVSD);
  }// for (i=1; i<=aNbV; ++i) {
  //------------------------------
  //
  // Make new vertices
  aMV.Clear();
  aItIm.Initialize(myImages);
  for (; aItIm.More(); aItIm.Next()) {
    const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aItIm.Key());
    const TopTools_ListOfShape& aLVSD=aItIm.Value();
    aNbVSD=aLVSD.Extent();
    if (aNbVSD>1) {
      aMV.Add(aV);
      MakeVertex(aLVSD, aVnew);
      aMVV.Bind(aVnew, aLVSD);
    }
  }
  //
  // UnBind old vertices
  aNbV=aMV.Extent();
  for (i=1; i<=aNbV; ++i) {
    const TopoDS_Shape& aV=aMV(i);
    myImages.UnBind(aV);
  }
  //
  // Bind new vertices
  aItIm.Initialize(aMVV);
  for (; aItIm.More(); aItIm.Next()) {
    const TopoDS_Shape& aV=aItIm.Key();
    const TopTools_ListOfShape& aLVSD=aItIm.Value();
    myImages.Bind(aV, aLVSD);
  }
  //
  // Origins
  aItIm.Initialize(myImages);
  for (; aItIm.More(); aItIm.Next()) {
    const TopoDS_Shape& aV=aItIm.Key();
    const TopTools_ListOfShape& aLVSD=aItIm.Value();
    aItS.Initialize(aLVSD);
    for (; aItS.More(); aItS.Next()) {
      const TopoDS_Shape& aVSD=aItS.Value();
      if (!myOrigins.IsBound(aVSD)) {
       myOrigins.Bind(aVSD, aV);
      }
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TopTools_ListOfShape & GEOMAlgo_Gluer::Modified ( const TopoDS_Shape &  S) [inherited]

Definition at line 1116 of file GEOMAlgo_Gluer.cxx.

{
  TopAbs_ShapeEnum aType;
  //
  myGenerated.Clear();
  //
  aType=aS.ShapeType();
  if (aType==TopAbs_VERTEX ||
      aType==TopAbs_EDGE   ||
      aType==TopAbs_WIRE   ||
      aType==TopAbs_FACE   ||
      aType==TopAbs_SHELL  ||
      aType==TopAbs_SOLID) {
    if(myOrigins.IsBound(aS)) {
      const TopoDS_Shape& aSnew=myOrigins.Find(aS);
      if (!aSnew.IsSame(aS)) {
       myGenerated.Append(aSnew);
      }
    }
  }
  //
  return myGenerated;
}

Here is the caller graph for this function:

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

Definition at line 174 of file GEOMAlgo_Gluer.cxx.

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

Reimplemented from GEOMAlgo_Gluer.

Definition at line 113 of file GEOMAlgo_GlueAnalyser.cxx.

{
  myErrorStatus=0;
  myWarningStatus=0;
  //
  mySolidsToGlue.Clear();
  mySolidsAlone.Clear();
  //
  CheckData();
  if (myErrorStatus) {
    return;
  }
  //
  // Initialize the context
  GEOMAlgo_ShapeAlgo::Perform();
  //
  InnerTolerance();
  if (myErrorStatus) {
    return;
  }
  //
  DetectVertices();
  if (myErrorStatus) {
    return;
  }
  //
  DetectEdges();
  if (myErrorStatus) {
    return;
  }
  //
  DetectFaces();
  if (myErrorStatus) {
    return;
  }
  //
  DetectSolids();
  if (myErrorStatus) {
    return;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TopoDS_Shape & GEOMAlgo_ShapeAlgo::Result ( ) const [inherited]

Definition at line 101 of file GEOMAlgo_ShapeAlgo.cxx.

{
  return myResult;
}
void GEOMAlgo_Gluer::SetCheckGeometry ( const Standard_Boolean  aFlag) [inherited]

Definition at line 126 of file GEOMAlgo_Gluer.cxx.

{
  myCheckGeometry=aFlag;
}

Here is the caller graph for this function:

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

Sets cashed geometrical tools

Definition at line 53 of file GEOMAlgo_ShapeAlgo.cxx.

{
  myContext=theContext;
}
void GEOMAlgo_Gluer::SetKeepNonSolids ( const Standard_Boolean  aFlag) [inherited]

Definition at line 142 of file GEOMAlgo_Gluer.cxx.

{
  myKeepNonSolids=aFlag;
}
void GEOMAlgo_ShapeAlgo::SetShape ( const TopoDS_Shape &  aS) [inherited]

Definition at line 69 of file GEOMAlgo_ShapeAlgo.cxx.

{
  myShape=aS;
}

Here is the caller graph for this function:

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

Definition at line 85 of file GEOMAlgo_ShapeAlgo.cxx.

{
  myTolerance=aT;
}

Here is the caller graph for this function:

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

Definition at line 77 of file GEOMAlgo_ShapeAlgo.cxx.

{
  return myShape;
}
const TopTools_ListOfShape & GEOMAlgo_GlueAnalyser::SolidsAlone ( ) const

Definition at line 105 of file GEOMAlgo_GlueAnalyser.cxx.

{
  return mySolidsAlone;
}

Definition at line 97 of file GEOMAlgo_GlueAnalyser.cxx.

{
  return mySolidsToGlue;
}

Here is the caller graph for this function:

Standard_Real GEOMAlgo_ShapeAlgo::Tolerance ( ) const [inherited]

Definition at line 93 of file GEOMAlgo_ShapeAlgo.cxx.

{
  return myTolerance;
}

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

Standard_Boolean GEOMAlgo_Gluer::myCheckGeometry [protected, inherited]

Definition at line 156 of file GEOMAlgo_Gluer.hxx.

Standard_Boolean GEOMAlgo_Algo::myComputeInternalShapes [protected, inherited]

Definition at line 73 of file GEOMAlgo_Algo.hxx.

Handle_IntTools_Context GEOMAlgo_ShapeAlgo::myContext [protected, inherited]

Definition at line 83 of file GEOMAlgo_ShapeAlgo.hxx.

Standard_Integer GEOMAlgo_Algo::myErrorStatus [protected, inherited]

Definition at line 71 of file GEOMAlgo_Algo.hxx.

TopTools_ListOfShape GEOMAlgo_Gluer::myGenerated [protected, inherited]

Definition at line 162 of file GEOMAlgo_Gluer.hxx.

TopTools_DataMapOfShapeListOfShape GEOMAlgo_Gluer::myImages [protected, inherited]

Definition at line 159 of file GEOMAlgo_Gluer.hxx.

Standard_Boolean GEOMAlgo_Gluer::myKeepNonSolids [protected, inherited]

Definition at line 157 of file GEOMAlgo_Gluer.hxx.

Standard_Integer GEOMAlgo_Gluer::myNbAlone [protected, inherited]

Definition at line 161 of file GEOMAlgo_Gluer.hxx.

TopTools_DataMapOfShapeShape GEOMAlgo_Gluer::myOrigins [protected, inherited]

Definition at line 160 of file GEOMAlgo_Gluer.hxx.

TopoDS_Shape GEOMAlgo_ShapeAlgo::myResult [protected, inherited]

Definition at line 82 of file GEOMAlgo_ShapeAlgo.hxx.

TopoDS_Shape GEOMAlgo_ShapeAlgo::myShape [protected, inherited]

Definition at line 80 of file GEOMAlgo_ShapeAlgo.hxx.

TopTools_ListOfShape GEOMAlgo_GlueAnalyser::mySolidsAlone [protected]

Definition at line 84 of file GEOMAlgo_GlueAnalyser.hxx.

Definition at line 83 of file GEOMAlgo_GlueAnalyser.hxx.

Standard_Real GEOMAlgo_Gluer::myTol [protected, inherited]

Definition at line 158 of file GEOMAlgo_Gluer.hxx.

Standard_Real GEOMAlgo_ShapeAlgo::myTolerance [protected, inherited]

Definition at line 81 of file GEOMAlgo_ShapeAlgo.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: