Back to index

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

#include <NMTTools_CommonBlock.hxx>

List of all members.

Public Member Functions

Standard_EXPORT NMTTools_CommonBlock ()
Standard_EXPORT void AddPaveBlock (const BOPTools_PaveBlock &aPB)
Standard_EXPORT void AddFace (const Standard_Integer aF)
Standard_EXPORT void AddFaces (const TColStd_ListOfInteger &aLF)
Standard_EXPORT const
BOPTools_ListOfPaveBlock & 
PaveBlocks () const
Standard_EXPORT const
TColStd_ListOfInteger & 
Faces () const
Standard_EXPORT const
BOPTools_PaveBlock & 
PaveBlock1 () const
Standard_EXPORT
BOPTools_PaveBlock & 
PaveBlock1 (const Standard_Integer anIx)
Standard_EXPORT
BOPTools_PaveBlock & 
PaveBlockOnEdge (const Standard_Integer anIndex)
Standard_EXPORT Standard_Boolean IsPaveBlockOnFace (const Standard_Integer anIndex) const
Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge (const Standard_Integer anIndex) const
Standard_EXPORT Standard_Boolean IsEqual (const NMTTools_CommonBlock &aCB) const
Standard_EXPORT Standard_Boolean Contains (const BOPTools_PaveBlock &aPB) const

Protected Attributes

BOPTools_ListOfPaveBlock myPaveBlocks
TColStd_ListOfInteger myFaces

Detailed Description

Definition at line 45 of file NMTTools_CommonBlock.hxx.


Constructor & Destructor Documentation

Definition at line 37 of file NMTTools_CommonBlock.cxx.

{
}

Member Function Documentation

void NMTTools_CommonBlock::AddFace ( const Standard_Integer  aF)

Definition at line 52 of file NMTTools_CommonBlock.cxx.

{
  myFaces.Append(aF);
}

Here is the caller graph for this function:

void NMTTools_CommonBlock::AddFaces ( const TColStd_ListOfInteger &  aLF)

Definition at line 60 of file NMTTools_CommonBlock.cxx.

{
  TColStd_ListIteratorOfListOfInteger aIt(aLF);
  //
  for (; aIt.More(); aIt.Next()) {
    myFaces.Append(aIt.Value());
  }
}

Here is the caller graph for this function:

void NMTTools_CommonBlock::AddPaveBlock ( const BOPTools_PaveBlock &  aPB)

Definition at line 44 of file NMTTools_CommonBlock.cxx.

{
  myPaveBlocks.Append(aPB);
}

Here is the caller graph for this function:

Standard_Boolean NMTTools_CommonBlock::Contains ( const BOPTools_PaveBlock &  aPB) const

Definition at line 194 of file NMTTools_CommonBlock.cxx.

{
  Standard_Boolean bFound=Standard_False;
  Standard_Integer aNb1;
  BOPTools_ListIteratorOfListOfPaveBlock anIt;
  //
  aNb1=myPaveBlocks.Extent();
  //
  if (!aNb1) {
    return bFound;
  }
  //
  anIt.Initialize(myPaveBlocks);
  for (; anIt.More(); anIt.Next()) {
    const BOPTools_PaveBlock& aPB=anIt.Value();
    if (aPB.IsEqual(aPBx)) {
      return !bFound;
    }
  }
  return bFound;
}
const TColStd_ListOfInteger & NMTTools_CommonBlock::Faces ( ) const

Definition at line 80 of file NMTTools_CommonBlock.cxx.

{
  return myFaces;
}

Here is the caller graph for this function:

Standard_Boolean NMTTools_CommonBlock::IsEqual ( const NMTTools_CommonBlock aCB) const

Definition at line 160 of file NMTTools_CommonBlock.cxx.

{
  Standard_Boolean bFound=Standard_True;
  Standard_Integer aNb1, aNb2;
  BOPTools_ListIteratorOfListOfPaveBlock anIt;
  //
  aNb1=myPaveBlocks.Extent();
  aNb2=aOther.myPaveBlocks.Extent();
  //
  if (!aNb1 && !aNb2) {
    return bFound;
  }
  if (!aNb1) {
    return !bFound;
  }
  if (!aNb2) {
    return !bFound;
  }
  //
  const BOPTools_PaveBlock& aPB=PaveBlock1();
  //
  anIt.Initialize(aOther.myPaveBlocks);
  for (; anIt.More(); anIt.Next()) {
    const BOPTools_PaveBlock& aPBOther=anIt.Value();
    if (aPB.IsEqual(aPBOther)){
      return bFound;
    }
  }
  return !bFound;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge ( const Standard_Integer  anIndex) const

Definition at line 141 of file NMTTools_CommonBlock.cxx.

{
  Standard_Boolean bFound=Standard_False;
  Standard_Integer aIOr;
  BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks);
  //
  for (; anIt.More(); anIt.Next()) {
    const BOPTools_PaveBlock& aPB=anIt.Value();
    aIOr=aPB.OriginalEdge();
    if (aIOr==aIx){
      return !bFound;
    }
  }
  return bFound;
}
Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace ( const Standard_Integer  anIndex) const

Definition at line 123 of file NMTTools_CommonBlock.cxx.

{
  Standard_Boolean bFound=Standard_False;
  Standard_Integer nF;
  TColStd_ListIteratorOfListOfInteger anIt(myFaces);
  //
  for (; anIt.More(); anIt.Next()) {
    nF=anIt.Value();
    if (nF==aIx){
      return !bFound;
    }
  }
  return bFound;
}

Here is the caller graph for this function:

const BOPTools_PaveBlock & NMTTools_CommonBlock::PaveBlock1 ( ) const

Definition at line 88 of file NMTTools_CommonBlock.cxx.

{
  return myPaveBlocks.First();
}

Here is the caller graph for this function:

BOPTools_PaveBlock & NMTTools_CommonBlock::PaveBlock1 ( const Standard_Integer  anIx)

Definition at line 96 of file NMTTools_CommonBlock.cxx.

{
  return PaveBlockOnEdge(aIx);
}

Here is the call graph for this function:

BOPTools_PaveBlock & NMTTools_CommonBlock::PaveBlockOnEdge ( const Standard_Integer  anIndex)

Definition at line 104 of file NMTTools_CommonBlock.cxx.

{
  static BOPTools_PaveBlock aPBs;
  Standard_Integer aIOr;
  BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks);
  //
  for (; anIt.More(); anIt.Next()) {
    BOPTools_PaveBlock& aPB=anIt.Value();
    aIOr=aPB.OriginalEdge();
    if (aIOr==aIx){
      return aPB;
    }
  }
  return aPBs;
}

Here is the caller graph for this function:

const BOPTools_ListOfPaveBlock & NMTTools_CommonBlock::PaveBlocks ( ) const

Definition at line 72 of file NMTTools_CommonBlock.cxx.

{
  return myPaveBlocks;
}

Here is the caller graph for this function:


Member Data Documentation

TColStd_ListOfInteger NMTTools_CommonBlock::myFaces [protected]

Definition at line 88 of file NMTTools_CommonBlock.hxx.

BOPTools_ListOfPaveBlock NMTTools_CommonBlock::myPaveBlocks [protected]

Definition at line 87 of file NMTTools_CommonBlock.hxx.


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