//function :
//purpose :
//=======================================================================
- BOPDS_DS::BOPDS_DS()
+BOPDS_DS::BOPDS_DS()
:
myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
myArguments(myAllocator),
//function :
//purpose :
//=======================================================================
- BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
+BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
:
myAllocator(theAllocator),
myArguments(myAllocator),
//function : ~
//purpose :
//=======================================================================
- BOPDS_DS::~BOPDS_DS()
+BOPDS_DS::~BOPDS_DS()
{
Clear();
}
//function : Clear
//purpose :
//=======================================================================
- void BOPDS_DS::Clear()
+void BOPDS_DS::Clear()
{
myNbShapes=0;
myNbSourceShapes=0;
//function : SetArguments
//purpose :
//=======================================================================
- void BOPDS_DS::SetArguments(const BOPCol_ListOfShape& theLS)
+void BOPDS_DS::SetArguments(const BOPCol_ListOfShape& theLS)
{
myArguments=theLS;
}
//function : Arguments
//purpose :
//=======================================================================
- const BOPCol_ListOfShape& BOPDS_DS::Arguments()const
+const BOPCol_ListOfShape& BOPDS_DS::Arguments()const
{
return myArguments;
}
//function : Allocator
//purpose :
//=======================================================================
- const Handle(NCollection_BaseAllocator)& BOPDS_DS::Allocator()const
+const Handle(NCollection_BaseAllocator)& BOPDS_DS::Allocator()const
{
return myAllocator;
}
//function : NbShapes
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::NbShapes()const
+Standard_Integer BOPDS_DS::NbShapes()const
{
return myLines.Size();
}
//function : NbSourceShapes
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::NbSourceShapes()const
+Standard_Integer BOPDS_DS::NbSourceShapes()const
{
return myNbSourceShapes;
}
//function : NbRanges
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::NbRanges()const
+Standard_Integer BOPDS_DS::NbRanges()const
{
return myRanges.Size();
}
//function : Range
//purpose :
//=======================================================================
- const BOPDS_IndexRange& BOPDS_DS::Range(const Standard_Integer theI)const
+const BOPDS_IndexRange& BOPDS_DS::Range(const Standard_Integer theI)const
{
return myRanges(theI);
}
//function : Rank
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::Rank(const Standard_Integer theI)const
+Standard_Integer BOPDS_DS::Rank(const Standard_Integer theI)const
{
Standard_Integer i, aNb, iErr;
//
//function : IsNewShape
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::IsNewShape(const Standard_Integer theI)const
+Standard_Boolean BOPDS_DS::IsNewShape(const Standard_Integer theI)const
{
return theI>=NbSourceShapes();
}
//function : Append
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::Append(const BOPDS_ShapeInfo& theSI)
+Standard_Integer BOPDS_DS::Append(const BOPDS_ShapeInfo& theSI)
{
Standard_Integer iX;
//
//function : Append
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::Append(const TopoDS_Shape& theS)
+Standard_Integer BOPDS_DS::Append(const TopoDS_Shape& theS)
{
Standard_Integer iX;
//
//function : ShapeInfo
//purpose :
//=======================================================================
- const BOPDS_ShapeInfo& BOPDS_DS::ShapeInfo(const Standard_Integer theI)const
+const BOPDS_ShapeInfo& BOPDS_DS::ShapeInfo(const Standard_Integer theI)const
{
return myLines(theI);
}
//function : ChangeShapeInfo
//purpose :
//=======================================================================
- BOPDS_ShapeInfo& BOPDS_DS::ChangeShapeInfo(const Standard_Integer theI)
+BOPDS_ShapeInfo& BOPDS_DS::ChangeShapeInfo(const Standard_Integer theI)
{
BOPDS_ShapeInfo *pSI;
//
//function : Shape
//purpose :
//=======================================================================
- const TopoDS_Shape& BOPDS_DS::Shape(const Standard_Integer theI)const
+const TopoDS_Shape& BOPDS_DS::Shape(const Standard_Integer theI)const
{
const TopoDS_Shape& aS=ShapeInfo(theI).Shape();
return aS;
//function : Index
//purpose :
//=======================================================================
- Standard_Integer BOPDS_DS::Index(const TopoDS_Shape& theS)const
+Standard_Integer BOPDS_DS::Index(const TopoDS_Shape& theS)const
{
Standard_Integer iRet;
//
//function : Init
//purpose :
//=======================================================================
- void BOPDS_DS::Init()
+void BOPDS_DS::Init()
{
Standard_Integer i1, i2, j, aI, aNb, aNbS, aNbE, aNbSx, nV, nW, nE, aNbF;
Standard_Real aTol;
aIt.Initialize(myArguments);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
+ if (aMSI.IsBound(aS)) {
+ continue;
+ }
aI=Append(aS);
aMSI.Bind(aS, aI);
//
i1=i2+1;
}
//
- //aMSI.Clear();
- //
myNbSourceShapes=NbShapes();
//
// 2 Bounding Boxes
//function : InitShape
//purpose :
//=======================================================================
- void BOPDS_DS::InitShape(const Standard_Integer aI,
- const TopoDS_Shape& aS,
- Handle(NCollection_BaseAllocator)& theAllocator,
- BOPCol_DataMapOfShapeInteger& aMSI)
+void BOPDS_DS::InitShape(const Standard_Integer aI,
+ const TopoDS_Shape& aS,
+ Handle(NCollection_BaseAllocator)& theAllocator,
+ BOPCol_DataMapOfShapeInteger& aMSI)
{
Standard_Integer aIx;
TopoDS_Iterator aIt;
//function : HasInterf
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasInterf(const Standard_Integer theI) const
+Standard_Boolean BOPDS_DS::HasInterf(const Standard_Integer theI) const
{
Standard_Integer n1, n2;
Standard_Boolean bRet;
//function : HasInterfShapeSubShapes
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasInterfShapeSubShapes(const Standard_Integer theI1,
- const Standard_Integer theI2)const
+Standard_Boolean BOPDS_DS::HasInterfShapeSubShapes(const Standard_Integer theI1,
+ const Standard_Integer theI2)const
{
Standard_Boolean bRet;
Standard_Integer n2;
//function : HasInterfSubShapes
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasInterfSubShapes(const Standard_Integer theI1,
- const Standard_Integer theI2)const
+Standard_Boolean BOPDS_DS::HasInterfSubShapes(const Standard_Integer theI1,
+ const Standard_Integer theI2)const
{
Standard_Boolean bRet;
Standard_Integer n1;
//function : PaveBlocksPool
//purpose :
//=======================================================================
- const BOPDS_VectorOfListOfPaveBlock& BOPDS_DS::PaveBlocksPool()const
+const BOPDS_VectorOfListOfPaveBlock& BOPDS_DS::PaveBlocksPool()const
{
return myPaveBlocksPool;
}
//function : ChangePaveBlocksPool
//purpose :
//=======================================================================
- BOPDS_VectorOfListOfPaveBlock& BOPDS_DS::ChangePaveBlocksPool()
+BOPDS_VectorOfListOfPaveBlock& BOPDS_DS::ChangePaveBlocksPool()
{
return myPaveBlocksPool;
}
//function : HasPaveBlocks
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasPaveBlocks(const Standard_Integer theI)const
+Standard_Boolean BOPDS_DS::HasPaveBlocks(const Standard_Integer theI)const
{
return ShapeInfo(theI).HasReference();
}
//function : PaveBlocks
//purpose :
//=======================================================================
- const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks(const Standard_Integer theI)const
+const BOPDS_ListOfPaveBlock& BOPDS_DS::PaveBlocks(const Standard_Integer theI)const
{
static BOPDS_ListOfPaveBlock sLPB;
Standard_Integer aRef;
//function : ChangePaveBlocks
//purpose :
//=======================================================================
- BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks(const Standard_Integer theI)
+BOPDS_ListOfPaveBlock& BOPDS_DS::ChangePaveBlocks(const Standard_Integer theI)
{
Standard_Boolean bHasReference;
Standard_Integer aRef;
//function : InitPaveBlocks
//purpose :
//=======================================================================
- void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
+void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
{
Standard_Integer nV, iRef, aNbV, nVSD, i;
Standard_Real aT;
//function : UpdatePaveBlocks
//purpose :
//=======================================================================
- void BOPDS_DS::UpdatePaveBlocks()
+void BOPDS_DS::UpdatePaveBlocks()
{
Standard_Boolean bIsToUpdate;
Standard_Integer i, aNbPBP;
//function : UpdatePaveBlock
//purpose :
//=======================================================================
- void BOPDS_DS::UpdatePaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
+void BOPDS_DS::UpdatePaveBlock(const Handle(BOPDS_PaveBlock)& thePB)
{
if (!thePB->IsToUpdate()){
return;
//function : UpdateCommonBlock
//purpose :
//=======================================================================
- void BOPDS_DS::UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB)
+void BOPDS_DS::UpdateCommonBlock(const Handle(BOPDS_CommonBlock)& theCB)
{
Standard_Integer nE, iRef, n1, n2;
BOPDS_ListIteratorOfListOfPaveBlock aItPB, aItPBCB, aItPBN;
// function: RealPaveBlock
// purpose:
//=======================================================================
- Handle(BOPDS_PaveBlock) BOPDS_DS::RealPaveBlock
+Handle(BOPDS_PaveBlock) BOPDS_DS::RealPaveBlock
(const Handle(BOPDS_PaveBlock)& thePB) const
{
if (IsCommonBlock(thePB)) {
// function: IsCommonBlockOnEdge
// purpose:
//=======================================================================
- Standard_Boolean BOPDS_DS::IsCommonBlockOnEdge
+Standard_Boolean BOPDS_DS::IsCommonBlockOnEdge
(const Handle(BOPDS_PaveBlock)& thePB) const
{
if (IsCommonBlock(thePB)) {
//function : IsCommonBlock
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::IsCommonBlock
+Standard_Boolean BOPDS_DS::IsCommonBlock
(const Handle(BOPDS_PaveBlock)& thePB) const
{
return myMapPBCB.IsBound(thePB);
//function : CommonBlock
//purpose :
//=======================================================================
- const Handle(BOPDS_CommonBlock)& BOPDS_DS::CommonBlock
+const Handle(BOPDS_CommonBlock)& BOPDS_DS::CommonBlock
(const Handle(BOPDS_PaveBlock)& thePB) const
{
Handle(BOPDS_CommonBlock) aNullCB;
//function : SetCommonBlock
//purpose :
//=======================================================================
- void BOPDS_DS::SetCommonBlock(const Handle(BOPDS_PaveBlock)& thePB,
- const Handle(BOPDS_CommonBlock)& theCB)
+void BOPDS_DS::SetCommonBlock(const Handle(BOPDS_PaveBlock)& thePB,
+ const Handle(BOPDS_CommonBlock)& theCB)
{
if (IsCommonBlock(thePB)) {
Handle(BOPDS_CommonBlock)& aCB = myMapPBCB.ChangeFind(thePB);
//function : FaceInfoPool
//purpose :
//=======================================================================
- const BOPDS_VectorOfFaceInfo& BOPDS_DS::FaceInfoPool()const
+const BOPDS_VectorOfFaceInfo& BOPDS_DS::FaceInfoPool()const
{
return myFaceInfoPool;
}
//function : HasFaceInfo
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasFaceInfo(const Standard_Integer theI)const
+Standard_Boolean BOPDS_DS::HasFaceInfo(const Standard_Integer theI)const
{
return ShapeInfo(theI).HasReference();
}
//function : FaceInfo
//purpose :
//=======================================================================
- const BOPDS_FaceInfo& BOPDS_DS::FaceInfo(const Standard_Integer theI)const
+const BOPDS_FaceInfo& BOPDS_DS::FaceInfo(const Standard_Integer theI)const
{
static BOPDS_FaceInfo sFI;
Standard_Integer aRef;
//function : ChangeFaceInfo
//purpose :
//=======================================================================
- BOPDS_FaceInfo& BOPDS_DS::ChangeFaceInfo(const Standard_Integer theI)
+BOPDS_FaceInfo& BOPDS_DS::ChangeFaceInfo(const Standard_Integer theI)
{
Standard_Boolean bHasReference;
Standard_Integer aRef;
//function : InitFaceInfo
//purpose :
//=======================================================================
- void BOPDS_DS::InitFaceInfo(const Standard_Integer theI)
+void BOPDS_DS::InitFaceInfo(const Standard_Integer theI)
{
Standard_Integer iRef;
//
//function : UpdateFaceInfoIn
//purpose :
//=======================================================================
- void BOPDS_DS::UpdateFaceInfoIn(const Standard_Integer theI)
+void BOPDS_DS::UpdateFaceInfoIn(const Standard_Integer theI)
{
Standard_Integer iRef;
//
//function : UpdateFaceInfoOn
//purpose :
//=======================================================================
- void BOPDS_DS::UpdateFaceInfoOn(const Standard_Integer theI)
+void BOPDS_DS::UpdateFaceInfoOn(const Standard_Integer theI)
{
Standard_Integer iRef;
//
//function : FaceInfoOn
//purpose :
//=======================================================================
- void BOPDS_DS::FaceInfoOn(const Standard_Integer theF,
- BOPDS_IndexedMapOfPaveBlock& theMPB,
- BOPCol_MapOfInteger& theMI)
+void BOPDS_DS::FaceInfoOn(const Standard_Integer theF,
+ BOPDS_IndexedMapOfPaveBlock& theMPB,
+ BOPCol_MapOfInteger& theMI)
{
Standard_Integer nS, nSD, nV1, nV2;
BOPCol_ListIteratorOfListOfInteger aIt;
//function : FaceInfoIn
//purpose :
//=======================================================================
- void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
- BOPDS_IndexedMapOfPaveBlock& theMPB,
- BOPCol_MapOfInteger& theMI)
+void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
+ BOPDS_IndexedMapOfPaveBlock& theMPB,
+ BOPCol_MapOfInteger& theMI)
{
Standard_Integer i, aNbVF, aNbEF, nV, nE;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
//function : RefineFaceInfoOn
//purpose :
//=======================================================================
- void BOPDS_DS::RefineFaceInfoOn()
+void BOPDS_DS::RefineFaceInfoOn()
{
Standard_Integer i, aNb, nF, aNbPB, j;
BOPDS_IndexedMapOfPaveBlock aMPB;
//function : AloneVertices
//purpose :
//=======================================================================
- void BOPDS_DS::AloneVertices(const Standard_Integer theI,
- BOPCol_ListOfInteger& theLI)const
+void BOPDS_DS::AloneVertices(const Standard_Integer theI,
+ BOPCol_ListOfInteger& theLI)const
{
if (HasFaceInfo(theI)) {
//
//function : VerticesOnIn
//purpose :
//=======================================================================
- void BOPDS_DS::VerticesOnIn(const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPCol_MapOfInteger& aMI,
- BOPDS_MapOfPaveBlock& aMPB)const
+void BOPDS_DS::VerticesOnIn(const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPCol_MapOfInteger& aMI,
+ BOPDS_MapOfPaveBlock& aMPB)const
{
Standard_Integer nV, nV1, nV2;
BOPCol_MapIteratorOfMapOfInteger aIt;
//function : SharedEdges
//purpose :
//=======================================================================
- void BOPDS_DS::SharedEdges(const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPCol_ListOfInteger& theLI,
- const Handle(NCollection_BaseAllocator)& aAllocator)
+void BOPDS_DS::SharedEdges(const Standard_Integer nF1,
+ const Standard_Integer nF2,
+ BOPCol_ListOfInteger& theLI,
+ const Handle(NCollection_BaseAllocator)& aAllocator)
{
Standard_Integer nE, nSp;
BOPCol_ListIteratorOfListOfInteger aItLI;
//function : ShapesSD
//purpose :
//=======================================================================
- BOPCol_DataMapOfIntegerInteger& BOPDS_DS::ShapesSD()
+BOPCol_DataMapOfIntegerInteger& BOPDS_DS::ShapesSD()
{
return myShapesSD;
}
//function : AddShapeSD
//purpose :
//=======================================================================
- void BOPDS_DS::AddShapeSD(const Standard_Integer theIndex,
+void BOPDS_DS::AddShapeSD(const Standard_Integer theIndex,
const Standard_Integer theIndexSD)
{
myShapesSD.Bind(theIndex, theIndexSD);
//function : HasShapeSD
//purpose :
//=======================================================================
- Standard_Boolean BOPDS_DS::HasShapeSD(const Standard_Integer theIndex,
- Standard_Integer& theIndexSD)const
+Standard_Boolean BOPDS_DS::HasShapeSD(const Standard_Integer theIndex,
+ Standard_Integer& theIndexSD)const
{
Standard_Boolean bRet;
//
//function : Dump
//purpose :
//=======================================================================
- void BOPDS_DS::Dump()const
+void BOPDS_DS::Dump()const
{
Standard_Integer i, aNb, aNbSS;
//
// function: CheckCoincidence
// purpose:
//=======================================================================
- Standard_Boolean BOPDS_DS::CheckCoincidence(const Handle(BOPDS_PaveBlock)& aPB1,
- const Handle(BOPDS_PaveBlock)& aPB2)
+Standard_Boolean BOPDS_DS::CheckCoincidence(const Handle(BOPDS_PaveBlock)& aPB1,
+ const Handle(BOPDS_PaveBlock)& aPB2)
{
Standard_Boolean bRet;
Standard_Integer nE1, nE2, aNbPoints;
// function: SortPaveBlocks
// purpose:
//=======================================================================
- void BOPDS_DS::SortPaveBlocks(const Handle(BOPDS_CommonBlock)& aCB)
+void BOPDS_DS::SortPaveBlocks(const Handle(BOPDS_CommonBlock)& aCB)
{
Standard_Integer theI;
Standard_Boolean bToSort;
// function: IsToSort
// purpose:
//=======================================================================
- Standard_Boolean BOPDS_DS::IsToSort(const Handle(BOPDS_CommonBlock)& aCB,
- Standard_Integer& theI)
+Standard_Boolean BOPDS_DS::IsToSort(const Handle(BOPDS_CommonBlock)& aCB,
+ Standard_Integer& theI)
{
Standard_Boolean bRet;
bRet = Standard_False;
// function: IsSubShape
// purpose:
//=======================================================================
- Standard_Boolean BOPDS_DS::IsSubShape(const Standard_Integer theI1,
- const Standard_Integer theI2)
+Standard_Boolean BOPDS_DS::IsSubShape(const Standard_Integer theI1,
+ const Standard_Integer theI2)
{
Standard_Boolean bRet;
Standard_Integer nS;
// function: Paves
// purpose:
//=======================================================================
- void BOPDS_DS::Paves(const Standard_Integer theEdge,
- BOPDS_ListOfPave& theLP)
+void BOPDS_DS::Paves(const Standard_Integer theEdge,
+ BOPDS_ListOfPave& theLP)
{
Standard_Integer aNb, i;
BOPDS_Pave *pPaves;
// function: UpdateTolerance
// purpose:
//=======================================================================
- void BOPDS_DS::UpdateEdgeTolerance(const Standard_Integer nE,
- const Standard_Real aTol)
+void BOPDS_DS::UpdateEdgeTolerance(const Standard_Integer nE,
+ const Standard_Real aTol)
{
Standard_Integer nV;
Standard_Real aTolV;