#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPCol_DataMapOfIntegerListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_VectorOfPoint.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_DataMapOfShapeSet.hxx>
#include <BOPTools_ListOfCoupleOfShape.hxx>
#include <BOPTools_MapOfSet.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRepLib.hxx>
#include <BRep_Tool.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomLib.hxx>
#include <NCollection_IncAllocator.hxx>
+#include <NCollection_Vector.hxx>
#include <Precision.hxx>
#include <IntTools_Context.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <algorithm>
//
static
TopoDS_Face BuildDraftFace(const TopoDS_Face& theFace,
- const BOPCol_DataMapOfShapeListOfShape& theImages,
+ const TopTools_DataMapOfShapeListOfShape& theImages,
Handle(IntTools_Context)& theCtx);
//=======================================================================
Handle(IntTools_Context) myContext;
};
//
-typedef BOPCol_NCVector<BOPAlgo_PairOfShapeBoolean> \
+typedef NCollection_Vector<BOPAlgo_PairOfShapeBoolean> \
BOPAlgo_VectorOfPairOfShapeBoolean;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_PairOfShapeBoolean,
BOPAlgo_VectorOfPairOfShapeBoolean,
Handle(IntTools_Context),
- IntTools_Context> BOPCol_BuilderSDFaceFunctor;
+ IntTools_Context> BOPAlgo_BuilderSDFaceFunctor;
//
-typedef BOPCol_ContextCnt
- <BOPCol_BuilderSDFaceFunctor,
+typedef BOPTools_ContextCnt
+ <BOPAlgo_BuilderSDFaceFunctor,
BOPAlgo_VectorOfPairOfShapeBoolean,
Handle(IntTools_Context)> BOPAlgo_BuilderSDFaceCnt;
//
//=======================================================================
// BuilderFace
//
-typedef BOPCol_NCVector<BOPAlgo_BuilderFace> BOPAlgo_VectorOfBuilderFace;
+typedef NCollection_Vector<BOPAlgo_BuilderFace> BOPAlgo_VectorOfBuilderFace;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_BuilderFace,
BOPAlgo_VectorOfBuilderFace> BOPAlgo_BuilderFaceFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_BuilderFaceFunctor,
BOPAlgo_VectorOfBuilderFace> BOPAlgo_BuilderFaceCnt;
//
Handle(IntTools_Context) myContext;
};
//
-typedef BOPCol_NCVector<BOPAlgo_VFI> BOPAlgo_VectorOfVFI;
+typedef NCollection_Vector<BOPAlgo_VFI> BOPAlgo_VectorOfVFI;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_VFI,
BOPAlgo_VectorOfVFI,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_VFIFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_VFIFunctor,
BOPAlgo_VectorOfVFI,
Handle(IntTools_Context)> BOPAlgo_VFICnt;
TopoDS_Edge aSp, aEE;
TopAbs_Orientation anOriF, anOriE;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_ListOfInteger aLIAV;
- BOPCol_MapOfShape aMFence;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TColStd_ListOfInteger aLIAV;
+ TopTools_MapOfShape aMFence;
Handle(NCollection_BaseAllocator) aAllocator;
BOPAlgo_VectorOfBuilderFace aVBF;
//
aAllocator=
NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_ListOfShape aLE(aAllocator);
- BOPCol_MapOfShape aMDE(100, aAllocator);
+ TopTools_ListOfShape aLE(aAllocator);
+ TopTools_MapOfShape aMDE(100, aAllocator);
//
// Build temporary map of faces images to avoid rebuilding
// of the faces without any IN or section edges
- NCollection_IndexedDataMap<Standard_Integer, BOPCol_ListOfShape> aFacesIm;
+ NCollection_IndexedDataMap<Standard_Integer, TopTools_ListOfShape> aFacesIm;
//
aNbS=myDS->NbSourceShapes();
//
TopoDS_Face aFD = BuildDraftFace(aF, myImages, myContext);
if (!aFD.IsNull())
{
- aFacesIm(aFacesIm.Add(i, BOPCol_ListOfShape())).Append(aFD);
+ aFacesIm(aFacesIm.Add(i, TopTools_ListOfShape())).Append(aFD);
continue;
}
}
bIsDegenerated=BRep_Tool::Degenerated(aE);
- const BOPCol_ListOfShape& aLIE=myImages.Find(aE);
+ const TopTools_ListOfShape& aLIE=myImages.Find(aE);
aIt.Initialize(aLIE);
for (; aIt.More(); aIt.Next()) {
aSp=(*(TopoDS_Edge*)(&aIt.Value()));
BRepLib::BuildPCurveForEdgesOnPlane(aLE, aFF);
}
// 3 Build split faces
- BOPAlgo_BuilderFace& aBF=aVBF.Append1();
+ BOPAlgo_BuilderFace& aBF=aVBF.Appended();
aBF.SetFace(aF);
aBF.SetShapes(aLE);
aBF.SetRunParallel(myRunParallel);
BOPAlgo_BuilderFaceCnt::Perform(myRunParallel, aVBF);
//===================================================
//
- Standard_Integer aNbBF = aVBF.Extent();
+ Standard_Integer aNbBF = aVBF.Length();
for (k = 0; k < aNbBF; ++k)
{
BOPAlgo_BuilderFace& aBF = aVBF(k);
{
const TopoDS_Face& aF = TopoDS::Face(myDS->Shape(aFacesIm.FindKey(k)));
anOriF = aF.Orientation();
- const BOPCol_ListOfShape& aLFR = aFacesIm(k);
+ const TopTools_ListOfShape& aLFR = aFacesIm(k);
//
- BOPCol_ListOfShape* pLFIm = mySplits.Bound(aF, BOPCol_ListOfShape());
+ TopTools_ListOfShape* pLFIm = mySplits.Bound(aF, TopTools_ListOfShape());
aIt.Initialize(aLFR);
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape& aFR=aIt.ChangeValue();
//=======================================================================
typedef
NCollection_IndexedDataMap<BOPTools_Set,
- BOPCol_ListOfShape,
+ TopTools_ListOfShape,
BOPTools_SetMapHasher> BOPAlgo_IndexedDataMapOfSetListOfShape;
static void AddEdgeSet(const TopoDS_Shape& theS,
BOPTools_Set aSE;
aSE.Add(theS, TopAbs_EDGE);
// Add set to the map, keeping connection to the shape
- BOPCol_ListOfShape* pLF = theMap.ChangeSeek(aSE);
+ TopTools_ListOfShape* pLF = theMap.ChangeSeek(aSE);
if (!pLF)
- pLF = &theMap(theMap.Add(aSE, BOPCol_ListOfShape(theAllocator)));
+ pLF = &theMap(theMap.Add(aSE, TopTools_ListOfShape(theAllocator)));
pLF->Append(theS);
}
// It is necessary to analyze all Face/Face intersections
// and find all faces with equal sets of edges
const BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
- Standard_Integer aNbFFs = aFFs.Extent();
+ Standard_Integer aNbFFs = aFFs.Length();
if (!aNbFFs)
return;
// Vector to store the indices of faces for future sorting
// for making the SD face for the group from the face with
// smallest index in Data structure
- BOPCol_NCVector<Standard_Integer> aFIVec(256, aAllocator);
+ NCollection_Vector<Standard_Integer> aFIVec(256, aAllocator);
// Fence map to avoid repeated checks of the same face.
- BOPCol_MapOfInteger aMFence(1, aAllocator);
+ TColStd_MapOfInteger aMFence(1, aAllocator);
// Fill the vector with indices of faces
for (Standard_Integer i = 0; i < aNbFFs; ++i)
if (!aMFence.Add(nF[j]))
continue;
- aFIVec.Append1() = nF[j];
+ aFIVec.Appended() = nF[j];
}
}
// Data map of set of edges with all faces having this set
NCollection_IndexedDataMap<BOPTools_Set,
- BOPCol_ListOfShape,
+ TopTools_ListOfShape,
BOPTools_SetMapHasher> anESetFaces(1, aAllocator);
// Map of planar bounded faces. If such faces have the same Edge set
// they are considered Same domain, without additional check.
- BOPCol_MapOfShape aMFPlanar(1, aAllocator);
+ TopTools_MapOfShape aMFPlanar(1, aAllocator);
- Standard_Integer aNbF = aFIVec.Extent();
+ Standard_Integer aNbF = aFIVec.Length();
for (Standard_Integer i = 0; i < aNbF; ++i)
{
const Standard_Integer nF = aFIVec(i);
}
}
- const BOPCol_ListOfShape* pLFSp = mySplits.Seek(aF);
+ const TopTools_ListOfShape* pLFSp = mySplits.Seek(aF);
if (pLFSp)
{
- BOPCol_ListIteratorOfListOfShape aItLF(*pLFSp);
+ TopTools_ListIteratorOfListOfShape aItLF(*pLFSp);
for (; aItLF.More(); aItLF.Next())
{
AddEdgeSet(aItLF.Value(), anESetFaces, aAllocator);
BOPAlgo_VectorOfPairOfShapeBoolean aVPSB;
// Back and forth map of SD faces to make the blocks
- BOPCol_IndexedDataMapOfShapeListOfShape aDMSLS(1, aAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aDMSLS(1, aAllocator);
Standard_Integer aNbSets = anESetFaces.Extent();
for (Standard_Integer i = 1; i <= aNbSets; ++i)
{
- const BOPCol_ListOfShape& aLF = anESetFaces(i);
+ const TopTools_ListOfShape& aLF = anESetFaces(i);
if (aLF.Extent() < 2)
continue;
// All possible pairs from <aLF> should be checked
- BOPCol_ListIteratorOfListOfShape aIt1(aLF);
+ TopTools_ListIteratorOfListOfShape aIt1(aLF);
for (; aIt1.More(); aIt1.Next())
{
const TopoDS_Shape& aF1 = aIt1.Value();
Standard_Boolean bCheckPlanar = aMFPlanar.Contains(aF1);
- BOPCol_ListIteratorOfListOfShape aIt2 = aIt1;
+ TopTools_ListIteratorOfListOfShape aIt2 = aIt1;
for (aIt2.Next(); aIt2.More(); aIt2.Next())
{
const TopoDS_Shape& aF2 = aIt2.Value();
continue;
}
// Add pair for analysis
- BOPAlgo_PairOfShapeBoolean& aPSB = aVPSB.Append1();
+ BOPAlgo_PairOfShapeBoolean& aPSB = aVPSB.Appended();
aPSB.Shape1() = aF1;
aPSB.Shape2() = aF2;
aPSB.SetFuzzyValue(myFuzzyValue);
BOPAlgo_BuilderSDFaceCnt::Perform(myRunParallel, aVPSB, myContext);
//================================================================
- NCollection_List<BOPCol_ListOfShape> aMBlocks(aAllocator);
+ NCollection_List<TopTools_ListOfShape> aMBlocks(aAllocator);
// Fill map with SD faces to make the blocks
- Standard_Integer aNbPairs = aVPSB.Extent();
+ Standard_Integer aNbPairs = aVPSB.Length();
for (Standard_Integer i = 0; i < aNbPairs; ++i)
{
BOPAlgo_PairOfShapeBoolean& aPSB = aVPSB(i);
(aDMSLS, aMBlocks, aAllocator);
// Fill same domain faces map
- NCollection_List<BOPCol_ListOfShape>::Iterator aItB(aMBlocks);
+ NCollection_List<TopTools_ListOfShape>::Iterator aItB(aMBlocks);
for (; aItB.More(); aItB.Next())
{
- const BOPCol_ListOfShape& aLSD = aItB.Value();
+ const TopTools_ListOfShape& aLSD = aItB.Value();
// First face will be SD face for all faces in the group
const TopoDS_Shape& aFSD1 = aLSD.First();
- BOPCol_ListIteratorOfListOfShape aItLF(aLSD);
+ TopTools_ListIteratorOfListOfShape aItLF(aLSD);
for (; aItLF.More(); aItLF.Next())
{
const TopoDS_Shape& aFSD = aItLF.Value();
myShapesSD.Bind(aFSD, aFSD1);
// If the face has no splits but have an SD face, it is considered as being split
if (myDS->Index(aFSD) >= 0)
- mySplits.Bound(aFSD, BOPCol_ListOfShape())->Append(aFSD);
+ mySplits.Bound(aFSD, TopTools_ListOfShape())->Append(aFSD);
}
}
aMBlocks.Clear();
TopoDS_Face aFSD;
TopoDS_Vertex aVx;
BRep_Builder aBB;
- BOPCol_ListOfInteger aLIAV;
- BOPCol_ListOfShape aLFIm;
- BOPCol_ListIteratorOfListOfInteger aItV;
- BOPCol_ListIteratorOfListOfShape aItLS, aItF;
+ TColStd_ListOfInteger aLIAV;
+ TopTools_ListOfShape aLFIm;
+ TColStd_ListIteratorOfListOfInteger aItV;
+ TopTools_ListIteratorOfListOfShape aItLS, aItF;
BOPAlgo_VectorOfVFI aVVFI;
//
aNbS=myDS->NbSourceShapes();
myDS->AloneVertices(i, aLIAV);
aLFIm.Clear();
//
- const BOPCol_ListOfShape& aLSp=mySplits.Find(aF);
+ const TopTools_ListOfShape& aLSp=mySplits.Find(aF);
aItLS.Initialize(aLSp);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Face& aFSp=(*(TopoDS_Face*)(&aItLS.Value()));
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Face& aFSp=(*(TopoDS_Face*)(&aItLS.Value()));
//
- BOPCol_ListOfShape* pLOr = myOrigins.ChangeSeek(aFSp);
+ TopTools_ListOfShape* pLOr = myOrigins.ChangeSeek(aFSp);
if (!pLOr) {
- pLOr = myOrigins.Bound(aFSp, BOPCol_ListOfShape());
+ pLOr = myOrigins.Bound(aFSp, TopTools_ListOfShape());
}
pLOr->Append(aF);
}
for (; aItF.More(); aItF.Next()) {
TopoDS_Face& aFy=(*(TopoDS_Face*)(&aItF.Value()));
//
- BOPAlgo_VFI& aVFI=aVVFI.Append1();
+ BOPAlgo_VFI& aVFI=aVVFI.Appended();
aVFI.SetVertex(aVx);
aVFI.SetFace(aFy);
aVFI.SetFuzzyValue(myFuzzyValue);
}// for (i=0; i<aNbS; ++i) {
//
// 4.
- aNbVFI=aVVFI.Extent();
+ aNbVFI=aVVFI.Length();
//================================================================
BOPAlgo_VFICnt::Perform(myRunParallel, aVVFI, myContext);
//================================================================
// according to the information stored into the <theImages> map
//=======================================================================
TopoDS_Face BuildDraftFace(const TopoDS_Face& theFace,
- const BOPCol_DataMapOfShapeListOfShape& theImages,
+ const TopTools_DataMapOfShapeListOfShape& theImages,
Handle(IntTools_Context)& theCtx)
{
BRep_Builder aBB;
return aNull;
}
- const BOPCol_ListOfShape* pLEIm = theImages.Seek(aE);
+ const TopTools_ListOfShape* pLEIm = theImages.Seek(aE);
if (!pLEIm)
{
aBB.Add(aNewWire, aE);
// Check if the original edge is closed on the face
Standard_Boolean bIsClosed = BRep_Tool::IsClosed(aE, theFace);
- BOPCol_ListIteratorOfListOfShape aItLEIm(*pLEIm);
+ TopTools_ListIteratorOfListOfShape aItLEIm(*pLEIm);
for (; aItLEIm.More(); aItLEIm.Next())
{
TopoDS_Edge& aSp = TopoDS::Edge(aItLEIm.Value());