The methods BuildPCurveForEdgeOnPlane and BuildPCurveForEdgesOnPlane have been moved from the class BOPTools_AlgoTools2D
to the more lower level class BRepLib.
+
+@subsection upgrade_721_removed Removed features
+
+The following obsolete features have been removed:
+* The package BOPCol has been fully removed:
+ - *BOPCol_BaseAllocator* is replaced with *Handle(NCollection_BaseAllocator)*;
+ - *BOPCol_BoxBndTree* is replaced with *BOPTools_BoxBndTree*;
+ - *BOPCol_Box2DBndTree* is removed as unused;
+ - *BOPCol_DataMapOfIntegerInteger* is replaced with *TColStd_DataMapOfIntegerInteger*;
+ - *BOPCol_DataMapOfIntegerListOfInteger* is replaced with *TColStd_DataMapOfIntegerListOfInteger*;
+ - *BOPCol_DataMapOfIntegerListOfShape* is replaced with *TopTools_DataMapOfIntegerListOfShape*;
+ - *BOPCol_DataMapOfIntegerMapOfInteger.hxx* is removed as unused;
+ - *BOPCol_DataMapOfIntegerReal* is replaced with *TColStd_DataMapOfIntegerReal*;
+ - *BOPCol_DataMapOfIntegerShape* is replaced with *TopTools_DataMapOfIntegerShape*;
+ - *BOPCol_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
+ - *BOPCol_DataMapOfShapeInteger* is replaced with *TopTools_DataMapOfShapeInteger*;
+ - *BOPCol_DataMapOfShapeListOfShape* is replaced with *TopTools_DataMapOfShapeListOfShape*;
+ - *BOPCol_DataMapOfShapeReal* is replaced with *TopTools_DataMapOfShapeReal*;
+ - *BOPCol_DataMapOfShapeShape* is replaced with *TopTools_DataMapOfShapeShape*;
+ - *BOPCol_DataMapOfTransientAddress* is removed as unused;
+ - *BOPCol_IndexedDataMapOfIntegerListOfInteger* is removed as unused;
+ - *BOPCol_IndexedDataMapOfShapeBox* is removed as unused;
+ - *BOPCol_IndexedDataMapOfShapeInteger* is removed as unused;
+ - *BOPCol_IndexedDataMapOfShapeListOfShape* is replaced with *TopTools_IndexedDataMapOfShapeListOfShape*;
+ - *BOPCol_IndexedDataMapOfShapeReal* is removed as unused;
+ - *BOPCol_IndexedDataMapOfShapeShape* is replaced with *TopTools_IndexedDataMapOfShapeShape*;
+ - *BOPCol_IndexedMapOfInteger* is replaced with *TColStd_IndexedMapOfInteger*;
+ - *BOPCol_IndexedMapOfOrientedShape* is replaced with *TopTools_IndexedMapOfOrientedShape*;
+ - *BOPCol_IndexedMapOfShape* is replaced with *TopTools_IndexedMapOfShape*;
+ - *BOPCol_ListOfInteger* is replaced with *TColStd_ListOfInteger*;
+ - *BOPCol_ListOfListOfShape* is replaced with *TopTools_ListOfListOfShape*;
+ - *BOPCol_ListOfShape* is replaced with *TopTools_ListOfShape*;
+ - *BOPCol_MapOfInteger* is replaced with *TColStd_MapOfInteger*;
+ - *BOPCol_MapOfOrientedShape* is replaced with *TopTools_MapOfOrientedShape*;
+ - *BOPCol_MapOfShape* is replaced with *TopTools_MapOfShape*;
+ - *BOPCol_PListOfInteger* is removed as unused;
+ - *BOPCol_PInteger* is removed as unused
+ - *BOPCol_SequenceOfPnt2d* is replaced with *TColgp_SequenceOfPnt2d*;
+ - *BOPCol_SequenceOfReal* is replaced with *TColStd_SequenceOfReal*;
+ - *BOPCol_SequenceOfShape* is replaced with *TopTools_SequenceOfShape*;
+ - *BOPCol_Parallel* is replaced with *BOPTools_Parallel*;
+ - *BOPCol_NCVector* is replaced with *NCollection_Vector*;
+* The class *BOPDS_PassKey* and containers for it have been removed as unused.
+* The unused containers from *IntTools* package have been removed:
+ - *IntTools_DataMapOfShapeAddress* is removed as unused;
+ - *IntTools_IndexedDataMapOfTransientAddress* is removed as unused;
+* The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
+* The class *BOPTools* has been removed as duplicate of the class *TopExp*;
On the low level the Splitter algorithm is implemented in class *BOPAlgo_Splitter*. The usage of this algorithm looks as follows:
~~~~~
BOPAlgo_Splitter aSplitter;
-BOPCol_ListOfShape aLSObjects = …; // Objects
-BOPCol_ListOfShape aLSTools = …; // Tools
+TopTools_ListOfShape aLSObjects = …; // Objects
+TopTools_ListOfShape aLSTools = …; // Tools
Standard_Boolean bRunParallel = Standard_False; /* parallel or single mode (the default value is FALSE)*/
Standard_Real aTol = 0.0; /* fuzzy option (default value is 0)*/
Standard_Boolean bSafeMode = Standard_False; /* protect or not the arguments from modification*/
The usage of the algorithm on the API level:
~~~~
BOPAlgo_MakerVolume aMV;
-BOPCol_ListOfShape aLS = …; // arguments
+TopTools_ListOfShape aLS = …; // arguments
Standard_Boolean bRunParallel = Standard_False; /* parallel or single mode (the default value is FALSE)*/
Standard_Boolean bIntersect = Standard_True; /* intersect or not the arguments (the default value is TRUE)*/
Standard_Real aTol = 0.0; /* fuzzy option (default value is 0)*/
Here is the example of the algorithm use on the API level:
~~~~
BOPAlgo_CellsBuilder aCBuilder;
-BOPCol_ListOfShape aLS = …; // arguments
+TopTools_ListOfShape aLS = …; // arguments
Standard_Boolean bRunParallel = Standard_False; /* parallel or single mode (the default value is FALSE)*/
Standard_Real aTol = 0.0; /* fuzzy option (the default value is 0)*/
Standard_Boolean bSafeMode = Standard_False; /* protect or not the arguments from modification*/
const TopoDS_Shape& anEmptyRes = aCBuilder.Shape(); // empty result, as nothing has been added yet
const TopoDS_Shape& anAllCells = aCBuilder.GetAllParts(); //all split parts
//
-BOPCol_ListOfShape aLSToTake = ...; // parts of these arguments will be taken into result
-BOPCol_ListOfShape aLSToAvoid = ...; // parts of these arguments will not be taken into result
+TopTools_ListOfShape aLSToTake = ...; // parts of these arguments will be taken into result
+TopTools_ListOfShape aLSToAvoid = ...; // parts of these arguments will not be taken into result
//
Standard_Integer iMaterial = 1; // defines the material for the cells
Standard_Boolean bUpdate = Standard_False; // defines whether to update the result right now or not
#include <BOPAlgo_Options.hxx>
-#include <BOPCol_DataMapOfIntegerListOfShape.hxx>
-
//! The class provides the root interface for the algorithms in Boolean Component.<br>
class BOPAlgo_Algo : public BOPAlgo_Options
{
Standard_EXPORT BOPAlgo_Algo();
Standard_EXPORT virtual ~BOPAlgo_Algo();
- Standard_EXPORT BOPAlgo_Algo(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_Algo(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Checks input data
Standard_EXPORT virtual void CheckData();
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_Operation.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_SequenceOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_MapOfPair.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_SequenceOfShape.hxx>
+
// ================================================================================
// function: Constructor
// purpose:
//
Standard_Integer n1, n2;
BOPDS_MapIteratorOfMapOfPair aItMPK;
- BOPCol_ListOfShape anArgs;
+ TopTools_ListOfShape anArgs;
BOPAlgo_CheckerSI aChecker;
//
anArgs.Append(aS);
continue;
TopExp_Explorer anExp(aS, TopAbs_FACE);
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
for(; anExp.More(); anExp.Next()) {
const TopoDS_Face& aFace = *(TopoDS_Face*)&(anExp.Current());
aBF.SetFace(aFace);
aBF.SetShapes(aLS);
aBF.Perform();
- const BOPCol_ListOfShape& aLF = aBF.Areas();
+ const TopTools_ListOfShape& aLF = aBF.Areas();
Standard_Boolean bBadFace = Standard_False;
if(aLF.Extent() != 1) {
}
TopExp_Explorer anExp1(myShape1, theType);
TopExp_Explorer anExp2(myShape2, theType);
- BOPCol_SequenceOfShape aSeq1, aSeq2;
- BOPCol_MapOfShape aMap1, aMap2;
+ TopTools_SequenceOfShape aSeq1, aSeq2;
+ TopTools_MapOfShape aMap1, aMap2;
for(; anExp1.More(); anExp1.Next()) {
const TopoDS_Shape& aS1 = anExp1.Current();
for(i = 1; i <= aSeq1.Length(); i++) {
const TopoDS_Shape& aS1 = aSeq1.Value(i);
- BOPCol_ListOfShape aListOfS2;
+ TopTools_ListOfShape aListOfS2;
Standard_Integer nbs = 0;
for(j = 1; j <= aSeq2.Length(); j++) {
aResult.SetShape1(myShape1);
aResult.SetShape2(myShape2);
aResult.AddFaultyShape1(aS1);
- BOPCol_ListIteratorOfListOfShape anIt(aListOfS2);
+ TopTools_ListIteratorOfListOfShape anIt(aListOfS2);
for(; anIt.More(); anIt.Next()) {
aResult.AddFaultyShape2(anIt.Value());
for(i = 1; i <= aSeq2.Length(); i++) {
const TopoDS_Shape& aS2 = aSeq2.Value(i);
- BOPCol_ListOfShape aListOfS1;
+ TopTools_ListOfShape aListOfS1;
Standard_Integer nbs = 0;
for(j = 1; j <= aSeq1.Length(); j++) {
aResult.SetShape1(myShape1);
aResult.SetShape2(myShape2);
- BOPCol_ListIteratorOfListOfShape anIt(aListOfS1);
+ TopTools_ListIteratorOfListOfShape anIt(aListOfS1);
for(; anIt.More(); anIt.Next()) {
aResult.AddFaultyShape1(anIt.Value());
continue;
}
//
- BOPCol_IndexedMapOfShape aMS;
+ TopTools_IndexedMapOfShape aMS;
//Edges
aExp.Init(aS, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
+#include <BOPAlgo_Algo.hxx>
#include <BOPAlgo_Operation.hxx>
#include <BOPAlgo_ListOfCheckResult.hxx>
#include <Standard_Real.hxx>
-#include <BOPCol_DataMapOfShapeReal.hxx>
-#include <BOPAlgo_Algo.hxx>
#include <TopAbs_ShapeEnum.hxx>
class TopoDS_Shape;
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
+#include <BOPTools_IndexedDataMapOfSetShape.hxx>
#include <BOPTools_Set.hxx>
#include <BOPTools_SetMapHasher.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <NCollection_DataMap.hxx>
#include <TopAbs_ShapeEnum.hxx>
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
-typedef NCollection_IndexedDataMap
- <BOPTools_Set,
- TopoDS_Shape,
- BOPTools_SetMapHasher> BOPTools_IndexedDataMapOfSetShape;
-//
static
TopAbs_ShapeEnum TypeToExplore(const Standard_Integer theDim);
//
static
void CollectContainers(const TopoDS_Shape& theS,
- BOPCol_ListOfShape& theLSC);
+ TopTools_ListOfShape& theLSC);
//
static
- void RemoveDuplicates(BOPCol_ListOfShape& theContainers);
+ void RemoveDuplicates(TopTools_ListOfShape& theContainers);
//
static
- void RemoveDuplicates(BOPCol_ListOfShape& theContainers,
+ void RemoveDuplicates(TopTools_ListOfShape& theContainers,
const TopAbs_ShapeEnum theType);
//
static
- Standard_Integer NbCommonItemsInMap(const BOPCol_MapOfShape& theM1,
- const BOPCol_MapOfShape& theM2);
+ Standard_Integer NbCommonItemsInMap(const TopTools_MapOfShape& theM1,
+ const TopTools_MapOfShape& theM2);
//
static
void MapFacesToBuildSolids(const TopoDS_Shape& theSol,
- BOPCol_IndexedDataMapOfShapeListOfShape& theMFS,
- BOPCol_IndexedMapOfShape& theMFI);
+ TopTools_IndexedDataMapOfShapeListOfShape& theMFS,
+ TopTools_IndexedMapOfShape& theMFI);
//=======================================================================
//function :
{
Standard_Integer i, j, iDim, aNbArgs, aNbTools;
Standard_Boolean bFuse;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
if (!(myOperation==BOPAlgo_COMMON ||
myOperation==BOPAlgo_FUSE ||
Standard_Boolean bHasValid[2] = {Standard_False, Standard_False};
//
for (i=0; i<2; ++i) {
- const BOPCol_ListOfShape& aLS=(!i)? myArguments : myTools;
+ const TopTools_ListOfShape& aLS=(!i)? myArguments : myTools;
aItLS.Initialize(aLS);
for (j=0; aItLS.More(); aItLS.Next(), ++j) {
const TopoDS_Shape& aS=aItLS.Value();
}
//
// Find non-empty objects
- BOPCol_ListOfShape aLValidObjs;
- BOPCol_ListIteratorOfListOfShape aItLS(myArguments);
+ TopTools_ListOfShape aLValidObjs;
+ TopTools_ListIteratorOfListOfShape aItLS(myArguments);
for (; aItLS.More(); aItLS.Next()) {
if (!BOPTools_AlgoTools3D::IsEmptyShape(aItLS.Value())) {
aLValidObjs.Append(aItLS.Value());
}
//
// Find non-empty tools
- BOPCol_ListOfShape aLValidTools;
+ TopTools_ListOfShape aLValidTools;
aItLS.Initialize(myTools);
for (; aItLS.More() ; aItLS.Next()) {
if (!BOPTools_AlgoTools3D::IsEmptyShape(aItLS.Value())) {
// so we can build the result of operation right away just by
// choosing the list of shapes to add to result, depending on
// the type of the operation
- BOPCol_ListOfShape *pLResult = NULL;
+ TopTools_ListOfShape *pLResult = NULL;
//
switch (myOperation) {
case BOPAlgo_FUSE:
{
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
- BOPCol_MapOfShape aM;
- BOPCol_ListIteratorOfListOfShape aIt, aItIm;
+ TopTools_MapOfShape aM;
+ TopTools_ListIteratorOfListOfShape aIt, aItIm;
//
- const BOPCol_ListOfShape& aLA=myDS->Arguments();
+ const TopTools_ListOfShape& aLA=myDS->Arguments();
aIt.Initialize(aLA);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
aType=aS.ShapeType();
if (aType==theType) {
if (myImages.IsBound(aS)){
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
{
Handle(NCollection_BaseAllocator) aAllocator;
BOPAlgo_PaveFiller* pPF;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
GetReport()->Clear();
//
//
aAllocator=
NCollection_BaseAllocator::CommonBaseAllocator();
- BOPCol_ListOfShape aLS(aAllocator);
+ TopTools_ListOfShape aLS(aAllocator);
//
aItLS.Initialize(myArguments);
for (; aItLS.More(); aItLS.Next()) {
//
// A. Fuse
if (myOperation == BOPAlgo_FUSE) {
- BOPCol_MapOfShape aMFence;
+ TopTools_MapOfShape aMFence;
aType = TypeToExplore(myDims[0]);
TopExp_Explorer aExp(myShape, aType);
for (; aExp.More(); aExp.Next()) {
//
Standard_Integer i, j, aNb, iDim;
Standard_Boolean bCheckEdges, bContains, bCut21, bCommon;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
// prepare the building elements of arguments to get its splits
- BOPCol_IndexedMapOfShape aMArgs, aMTools;
+ TopTools_IndexedMapOfShape aMArgs, aMTools;
for (i = 0; i < 2; ++i) {
- const BOPCol_ListOfShape& aLS = !i ? myArguments : myTools;
- BOPCol_IndexedMapOfShape& aMS = !i ? aMArgs : aMTools;
+ const TopTools_ListOfShape& aLS = !i ? myArguments : myTools;
+ TopTools_IndexedMapOfShape& aMS = !i ? aMArgs : aMTools;
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aS = aItLS.Value();
continue;
}
aType = TypeToExplore(iDim);
- BOPTools::MapShapes(aS, aType, aMS);
+ TopExp::MapShapes(aS, aType, aMS);
}
}
//
bCheckEdges = Standard_False;
//
// get splits of building elements
- BOPCol_IndexedMapOfShape aMArgsIm, aMToolsIm;
+ TopTools_IndexedMapOfShape aMArgsIm, aMToolsIm;
BOPTools_IndexedDataMapOfSetShape aMSetArgs, aMSetTools;
for (i = 0; i < 2; ++i) {
- const BOPCol_IndexedMapOfShape& aMS = !i ? aMArgs : aMTools;
- BOPCol_IndexedMapOfShape& aMSIm = !i ? aMArgsIm : aMToolsIm;
+ const TopTools_IndexedMapOfShape& aMS = !i ? aMArgs : aMTools;
+ TopTools_IndexedMapOfShape& aMSIm = !i ? aMArgsIm : aMToolsIm;
BOPTools_IndexedDataMapOfSetShape& aMSet = !i ? aMSetArgs : aMSetTools;
//
aNb = aMS.Extent();
}
//
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm = myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm = myImages.Find(aS);
aItLS.Initialize(aLSIm);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSIm = aItLS.Value();
bCommon = (myOperation == BOPAlgo_COMMON);
bCut21 = (myOperation == BOPAlgo_CUT21);
//
- const BOPCol_IndexedMapOfShape& aMIt = bCut21 ? aMToolsIm : aMArgsIm;
- const BOPCol_IndexedMapOfShape& aMCheck = bCut21 ? aMArgsIm : aMToolsIm;
+ const TopTools_IndexedMapOfShape& aMIt = bCut21 ? aMToolsIm : aMArgsIm;
+ const TopTools_IndexedMapOfShape& aMCheck = bCut21 ? aMArgsIm : aMToolsIm;
const BOPTools_IndexedDataMapOfSetShape& aMSetCheck = bCut21 ? aMSetArgs : aMSetTools;
//
- BOPCol_IndexedMapOfShape aMCheckExp, aMItExp;
+ TopTools_IndexedMapOfShape aMCheckExp, aMItExp;
//
if (bCommon) {
aNb = aMIt.Extent();
iDimMax = BOPTools_AlgoTools::Dimension(aS);
for (iDim = iDimMin; iDim < iDimMax; ++iDim) {
aType = TypeToExplore(iDim);
- BOPTools::MapShapes(aS, aType, aMItExp);
+ TopExp::MapShapes(aS, aType, aMItExp);
}
aMItExp.Add(aS);
}
iDimMax = BOPTools_AlgoTools::Dimension(aS);
for (iDim = iDimMin; iDim < iDimMax; ++iDim) {
aType = TypeToExplore(iDim);
- BOPTools::MapShapes(aS, aType, aMCheckExp);
+ TopExp::MapShapes(aS, aType, aMCheckExp);
}
aMCheckExp.Add(aS);
}
//
// filter result for COMMON operation
if (bCommon) {
- BOPCol_MapOfShape aMFence;
+ TopTools_MapOfShape aMFence;
TopExp_Explorer aExp;
TopoDS_Compound aCx;
aBB.MakeCompound(aCx);
const TopoDS_Shape& aS = aExp.Current();
if (aMFence.Add(aS)) {
aBB.Add(aCx, aS);
- BOPTools::MapShapes(aS, aMFence);
+ TopExp::MapShapes(aS, aMFence);
}
}
}
//
// The squats around degenerated edges
Standard_Integer nVD;
- BOPCol_IndexedMapOfShape aMVC;
+ TopTools_IndexedMapOfShape aMVC;
//
// 1. Vertices of aC
- BOPTools::MapShapes(aC, TopAbs_VERTEX, aMVC);
+ TopExp::MapShapes(aC, TopAbs_VERTEX, aMVC);
//
// 2. DE candidates
aNb = myDS->NbSourceShapes();
//
Standard_Integer i;
TopAbs_ShapeEnum aType, aT1, aT2;
- BOPCol_ListOfShape aLSC, aLCB;
- BOPCol_ListIteratorOfListOfShape aItLS, aItLSIm, aItLCB;
+ TopTools_ListOfShape aLSC, aLCB;
+ TopTools_ListIteratorOfListOfShape aItLS, aItLSIm, aItLCB;
TopoDS_Iterator aIt;
BRep_Builder aBB;
TopoDS_Shape aRC, aRCB;
//
- BOPCol_MapOfShape aMSRC;
- BOPTools::MapShapes(myRC, aMSRC);
+ TopTools_MapOfShape aMSRC;
+ TopExp::MapShapes(myRC, aMSRC);
//
// collect images of containers
for (i = 0; i < 2; ++i) {
- const BOPCol_ListOfShape& aLS = !i ? myArguments : myTools;
+ const TopTools_ListOfShape& aLS = !i ? myArguments : myTools;
//
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next()) {
}
}
// make containers
- BOPCol_ListOfShape aLCRes;
- BOPCol_MapOfShape aMInpFence;
+ TopTools_ListOfShape aLCRes;
+ TopTools_MapOfShape aMInpFence;
aItLS.Initialize(aLSC);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSC = aItLS.Value();
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLSIm = myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm = myImages.Find(aS);
//
aItLSIm.Initialize(aLSIm);
for (; aItLSIm.More(); aItLSIm.Next()) {
}
// create map of containers
- BOPCol_MapOfShape aMSResult;
- BOPTools::MapShapes(aResult, aMSResult);
+ TopTools_MapOfShape aMSResult;
+ TopExp::MapShapes(aResult, aMSResult);
// get input non-container shapes
- BOPCol_ListOfShape aLSNonCont;
+ TopTools_ListOfShape aLSNonCont;
for (i = 0; i < 2; ++i)
{
- const BOPCol_ListOfShape& aLS = !i ? myArguments : myTools;
+ const TopTools_ListOfShape& aLS = !i ? myArguments : myTools;
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aS = aItLS.Value();
if (myImages.IsBound(aS))
{
- const BOPCol_ListOfShape& aLSIm = myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm = myImages.Find(aS);
aItLSIm.Initialize(aLSIm);
for (; aItLSIm.More(); aItLSIm.Next())
{
void BOPAlgo_BOP::BuildSolid()
{
// Containers
- BOPCol_ListOfShape aLSC;
+ TopTools_ListOfShape aLSC;
//
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
TopExp_Explorer aExp;
BRep_Builder aBB;
//
// Get solids from input arguments
- BOPCol_MapOfShape aMSA;
+ TopTools_MapOfShape aMSA;
// Map the arguments to find shared faces
- BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
+ TopTools_IndexedDataMapOfShapeListOfShape aMFS;
for (Standard_Integer i = 0; i < 2; ++i) {
- const BOPCol_ListOfShape& aLSA = (i) ? myArguments : myTools;
+ const TopTools_ListOfShape& aLSA = (i) ? myArguments : myTools;
aItLS.Initialize(aLSA);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSA = aItLS.Value();
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aSol = aExp.Current();
aMSA.Add(aSol);
- BOPTools::MapShapesAndAncestors(aSol, TopAbs_FACE, TopAbs_SOLID, aMFS);
+ TopExp::MapShapesAndAncestors(aSol, TopAbs_FACE, TopAbs_SOLID, aMFS);
}
//
// get Compsolids from input arguments
}
//
// Find solids in input arguments sharing faces with other solids
- BOPCol_MapOfShape aMTSols;
+ TopTools_MapOfShape aMTSols;
Standard_Integer i, aNb = aMFS.Extent();
for (i = 1; i < aNb; ++i) {
- const BOPCol_ListOfShape& aLSols = aMFS(i);
+ const TopTools_ListOfShape& aLSols = aMFS(i);
if (aLSols.Extent() > 1) {
aItLS.Initialize(aLSols);
for(; aItLS.More(); aItLS.Next()) {
}
//
// Possibly untouched solids - to be added to results as is
- BOPCol_IndexedMapOfShape aMUSols;
+ TopTools_IndexedMapOfShape aMUSols;
// Use map to chose the most outer faces to build result solids
aMFS.Clear();
// Internal faces
- BOPCol_IndexedMapOfShape aMFI;
+ TopTools_IndexedMapOfShape aMFI;
//
TopoDS_Iterator aIt(myRC);
for (; aIt.More(); aIt.Next()) {
}
}
//
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF;
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF;
// Split faces will be added in the end
// to avoid errors in BuilderSolid algorithm
- BOPCol_ListOfShape aLF, aLFx;
+ TopTools_ListOfShape aLF, aLFx;
aNb = aMFS.Extent();
for (i = 1; i <= aNb; ++i) {
- const BOPCol_ListOfShape& aLSx = aMFS(i);
+ const TopTools_ListOfShape& aLSx = aMFS(i);
if (aLSx.Extent() == 1) {
const TopoDS_Shape& aFx = aMFS.FindKey(i);
- BOPTools::MapShapesAndAncestors(aFx, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapesAndAncestors(aFx, TopAbs_EDGE, TopAbs_FACE, aMEF);
if (IsBoundSplits(aFx, aMEF)){
aLFx.Append(aFx);
continue;
}
//
// Faces to build result solids
- BOPCol_ListOfShape aSFS;
+ TopTools_ListOfShape aSFS;
aItLS.Initialize(aLF);
for(; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFx = aItLS.Value();
return;
}
// new solids
- const BOPCol_ListOfShape& aLSR = aSB.Areas();
+ const TopTools_ListOfShape& aLSR = aSB.Areas();
//
// add new solids to result
aItLS.Initialize(aLSR);
}
//
// get splits of faces of the Compsolid arguments
- BOPCol_MapOfShape aMFCs;
+ TopTools_MapOfShape aMFCs;
aItLS.Initialize(aLSC);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aCs = aItLS.Value();
aExp.Init(aCs, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aF = aExp.Current();
- const BOPCol_ListOfShape* pLFIm = myImages.Seek(aF);
+ const TopTools_ListOfShape* pLFIm = myImages.Seek(aF);
if (!pLFIm) {
aMFCs.Add(aF);
}
else {
- BOPCol_ListIteratorOfListOfShape aItLFIm(*pLFIm);
+ TopTools_ListIteratorOfListOfShape aItLFIm(*pLFIm);
for (; aItLFIm.More(); aItLFIm.Next()) {
aMFCs.Add(aItLFIm.Value());
}
}
//
// build connexity blocks from new solids
- BOPCol_ListOfShape aLCBS;
+ TopTools_ListOfShape aLCBS;
BOPTools_AlgoTools::MakeConnexityBlocks(aRC, TopAbs_FACE, TopAbs_SOLID, aLCBS);
//
aItLS.Initialize(aLCBS);
//=======================================================================
Standard_Boolean BOPAlgo_BOP::IsBoundSplits
(const TopoDS_Shape& aS,
- BOPCol_IndexedDataMapOfShapeListOfShape& aMEF)
+ TopTools_IndexedDataMapOfShapeListOfShape& aMEF)
{
Standard_Boolean bRet = Standard_False;
if (mySplits.IsBound(aS) || myOrigins.IsBound(aS)) {
return !bRet;
}
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
Standard_Integer aNbLS;
TopAbs_Orientation anOr;
//
continue;
}
//
- const BOPCol_ListOfShape& aLS=aMEF.FindFromKey(aE);
+ const TopTools_ListOfShape& aLS=aMEF.FindFromKey(aE);
aNbLS = aLS.Extent();
if (!aNbLS) {
continue;
//purpose :
//=======================================================================
void CollectContainers(const TopoDS_Shape& theS,
- BOPCol_ListOfShape& theLSC)
+ TopTools_ListOfShape& theLSC)
{
TopAbs_ShapeEnum aType = theS.ShapeType();
if (aType == TopAbs_WIRE ||
//function : RemoveDuplicates
//purpose : Filters the containers with identical contents
//=======================================================================
-void RemoveDuplicates(BOPCol_ListOfShape& theContainers)
+void RemoveDuplicates(TopTools_ListOfShape& theContainers)
{
RemoveDuplicates(theContainers, TopAbs_WIRE);
RemoveDuplicates(theContainers, TopAbs_SHELL);
//function : RemoveDuplicates
//purpose : Filters the containers of given type with identical contents
//=======================================================================
-void RemoveDuplicates(BOPCol_ListOfShape& theContainers,
+void RemoveDuplicates(TopTools_ListOfShape& theContainers,
const TopAbs_ShapeEnum theType)
{
// get containers of given type
- BOPCol_ListOfShape aLC;
- BOPCol_ListIteratorOfListOfShape aItLC(theContainers);
+ TopTools_ListOfShape aLC;
+ TopTools_ListIteratorOfListOfShape aItLC(theContainers);
for (; aItLC.More(); aItLC.Next()) {
const TopoDS_Shape& aC = aItLC.Value();
if (aC.ShapeType() == theType) {
}
//
// map containers to compare its contents
- NCollection_IndexedDataMap<TopoDS_Shape, BOPCol_MapOfShape> aContents;
+ NCollection_IndexedDataMap<TopoDS_Shape, TopTools_MapOfShape> aContents;
//
aItLC.Initialize(aLC);
for (; aItLC.More(); aItLC.Next()) {
const TopoDS_Shape& aC = aItLC.Value();
//
- BOPCol_MapOfShape& aMC = aContents(aContents.Add(aC, BOPCol_MapOfShape()));
+ TopTools_MapOfShape& aMC = aContents(aContents.Add(aC, TopTools_MapOfShape()));
//
TopoDS_Iterator aIt(aC);
for (; aIt.More(); aIt.Next()) {
}
//
// compare the contents of the containers and find duplicates
- BOPCol_MapOfShape aDuplicates;
+ TopTools_MapOfShape aDuplicates;
//
Standard_Integer i, j, aNb = aContents.Extent();
for (i = 1; i <= aNb; ++i) {
if (aDuplicates.Contains(aCi)) {
continue;
}
- const BOPCol_MapOfShape& aMi = aContents(i);
+ const TopTools_MapOfShape& aMi = aContents(i);
Standard_Integer aNbi = aMi.Extent();
//
for (j = i + 1; j <= aNb; ++j) {
if (aDuplicates.Contains(aCj)) {
continue;
}
- const BOPCol_MapOfShape& aMj = aContents(j);
+ const TopTools_MapOfShape& aMj = aContents(j);
Standard_Integer aNbj = aMj.Extent();
//
Standard_Integer aNbCommon = NbCommonItemsInMap(aMi, aMj);
//function : NbCommonItemsInMap
//purpose : Counts the items contained in both maps
//=======================================================================
-Standard_Integer NbCommonItemsInMap(const BOPCol_MapOfShape& theM1,
- const BOPCol_MapOfShape& theM2)
+Standard_Integer NbCommonItemsInMap(const TopTools_MapOfShape& theM1,
+ const TopTools_MapOfShape& theM2)
{
- const BOPCol_MapOfShape* aMap1 = &theM1;
- const BOPCol_MapOfShape* aMap2 = &theM2;
+ const TopTools_MapOfShape* aMap1 = &theM1;
+ const TopTools_MapOfShape* aMap2 = &theM2;
//
if (theM2.Extent() < theM1.Extent()) {
aMap1 = &theM2;
}
//
Standard_Integer iCommon = 0;
- for (BOPCol_MapIteratorOfMapOfShape aIt(*aMap1); aIt.More(); aIt.Next()) {
+ for (TopTools_MapIteratorOfMapOfShape aIt(*aMap1); aIt.More(); aIt.Next()) {
if (aMap2->Contains(aIt.Value())) {
++iCommon;
}
// <theMFI> - internal faces.
//=======================================================================
void MapFacesToBuildSolids(const TopoDS_Shape& theSol,
- BOPCol_IndexedDataMapOfShapeListOfShape& theMFS,
- BOPCol_IndexedMapOfShape& theMFI)
+ TopTools_IndexedDataMapOfShapeListOfShape& theMFS,
+ TopTools_IndexedMapOfShape& theMFI)
{
TopExp_Explorer aExp(theSol, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) {
continue;
}
//
- BOPCol_ListOfShape* pLSol = theMFS.ChangeSeek(aF);
+ TopTools_ListOfShape* pLSol = theMFS.ChangeSeek(aF);
if (!pLSol) {
- pLSol = &theMFS(theMFS.Add(aF, BOPCol_ListOfShape()));
+ pLSol = &theMFS(theMFS.Add(aF, TopTools_ListOfShape()));
pLSol->Append(theSol);
}
else {
#include <BOPAlgo_Operation.hxx>
#include <Standard_Integer.hxx>
#include <TopoDS_Shape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
#include <BOPAlgo_ToolsProvider.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <Standard_Boolean.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
class TopoDS_Shape;
class BOPAlgo_PaveFiller;
Standard_EXPORT BOPAlgo_BOP();
Standard_EXPORT virtual ~BOPAlgo_BOP();
- Standard_EXPORT BOPAlgo_BOP(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_BOP(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Clears internal fields and arguments
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
Standard_EXPORT void BuildSolid();
- Standard_EXPORT Standard_Boolean IsBoundSplits (const TopoDS_Shape& theS, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF);
+ Standard_EXPORT Standard_Boolean IsBoundSplits (const TopoDS_Shape& theS, TopTools_IndexedDataMapOfShapeListOfShape& theMEF);
//! Treatment of the cases with empty shapes.<br>
//! It returns TRUE if there is nothing to do, i.e.
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
//function : SetArguments
//purpose :
//=======================================================================
-void BOPAlgo_Builder::SetArguments(const BOPCol_ListOfShape& theShapes)
+void BOPAlgo_Builder::SetArguments(const TopTools_ListOfShape& theShapes)
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
myArguments.Clear();
//
//function : Arguments
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& BOPAlgo_Builder::Arguments()const
+const TopTools_ListOfShape& BOPAlgo_Builder::Arguments()const
{
return myArguments;
}
//function : Images
//purpose :
//=======================================================================
-const BOPCol_DataMapOfShapeListOfShape& BOPAlgo_Builder::Images()const
+const TopTools_DataMapOfShapeListOfShape& BOPAlgo_Builder::Images()const
{
return myImages;
}
//function : Origins
//purpose :
//=======================================================================
-const BOPCol_DataMapOfShapeListOfShape& BOPAlgo_Builder::Origins()const
+const TopTools_DataMapOfShapeListOfShape& BOPAlgo_Builder::Origins()const
{
return myOrigins;
}
//function : ShapesSd
//purpose :
//=======================================================================
-const BOPCol_DataMapOfShapeShape& BOPAlgo_Builder::ShapesSD()const
+const TopTools_DataMapOfShapeShape& BOPAlgo_Builder::ShapesSD()const
{
return myShapesSD;
}
//function : Splits
//purpose :
//=======================================================================
-const BOPCol_DataMapOfShapeListOfShape& BOPAlgo_Builder::Splits()const
+const TopTools_DataMapOfShapeListOfShape& BOPAlgo_Builder::Splits()const
{
return mySplits;
}
{
Standard_Integer i, aNbS;
TopAbs_ShapeEnum aType;
- BOPCol_IndexedMapOfShape aMA;
+ TopTools_IndexedMapOfShape aMA;
if (myPaveFiller->NonDestructive()) {
// MapToAvoid
aNbS=myDS->NbSourceShapes();
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
#include <BOPAlgo_PPaveFiller.hxx>
+#include <BOPAlgo_BuilderShape.hxx>
#include <BOPAlgo_GlueEnum.hxx>
#include <BOPDS_PDS.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
#include <Standard_Real.hxx>
-#include <BOPAlgo_BuilderShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_ShapeEnum.hxx>
class IntTools_Context;
Standard_EXPORT BOPAlgo_Builder();
Standard_EXPORT virtual ~BOPAlgo_Builder();
- Standard_EXPORT BOPAlgo_Builder(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_Builder(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
Standard_EXPORT virtual void AddArgument (const TopoDS_Shape& theShape);
- Standard_EXPORT virtual void SetArguments (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT virtual void SetArguments (const TopTools_ListOfShape& theLS);
- Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
+ Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! Returns true if the shape theS has been deleted.
Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& theS) Standard_OVERRIDE;
- Standard_EXPORT const BOPCol_DataMapOfShapeListOfShape& Images() const;
+ Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Images() const;
Standard_EXPORT Standard_Boolean IsInterferred (const TopoDS_Shape& theS) const;
//! Returns myOrigins.
- Standard_EXPORT const BOPCol_DataMapOfShapeListOfShape& Origins() const;
+ Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Origins() const;
//! Returns myShapesSD.
- Standard_EXPORT const BOPCol_DataMapOfShapeShape& ShapesSD() const;
+ Standard_EXPORT const TopTools_DataMapOfShapeShape& ShapesSD() const;
//! Returns mySplits.
- Standard_EXPORT const BOPCol_DataMapOfShapeListOfShape& Splits() const;
+ Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Splits() const;
//! Sets the flag that defines the mode of treatment.
Standard_EXPORT void FillImagesContainer (const TopoDS_Shape& theS, const TopAbs_ShapeEnum theType);
- Standard_EXPORT void FillImagesCompound (const TopoDS_Shape& theS, BOPCol_MapOfShape& theMF);
+ Standard_EXPORT void FillImagesCompound (const TopoDS_Shape& theS, TopTools_MapOfShape& theMF);
Standard_EXPORT void FillImagesFaces();
Standard_EXPORT void FillImagesSolids();
- Standard_EXPORT void BuildDraftSolid (const TopoDS_Shape& theSolid, TopoDS_Shape& theDraftSolid, BOPCol_ListOfShape& theLIF);
+ Standard_EXPORT void BuildDraftSolid (const TopoDS_Shape& theSolid, TopoDS_Shape& theDraftSolid, TopTools_ListOfShape& theLIF);
- Standard_EXPORT virtual void FillIn3DParts (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT virtual void FillIn3DParts (TopTools_DataMapOfShapeListOfShape& theInParts, TopTools_DataMapOfShapeShape& theDraftSolids, const Handle(NCollection_BaseAllocator)& theAllocator);
- Standard_EXPORT void BuildSplitSolids (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT void BuildSplitSolids (TopTools_DataMapOfShapeListOfShape& theInParts, TopTools_DataMapOfShapeShape& theDraftSolids, const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT void FillInternalShapes();
Standard_EXPORT virtual void PostTreat();
- BOPCol_ListOfShape myArguments;
- BOPCol_MapOfShape myMapFence;
+ TopTools_ListOfShape myArguments;
+ TopTools_MapOfShape myMapFence;
BOPAlgo_PPaveFiller myPaveFiller;
BOPDS_PDS myDS;
Handle(IntTools_Context) myContext;
Standard_Integer myEntryPoint;
- BOPCol_DataMapOfShapeListOfShape myImages;
- BOPCol_DataMapOfShapeShape myShapesSD;
- BOPCol_DataMapOfShapeListOfShape mySplits;
- BOPCol_DataMapOfShapeListOfShape myOrigins;
+ TopTools_DataMapOfShapeListOfShape myImages;
+ TopTools_DataMapOfShapeShape myShapesSD;
+ TopTools_DataMapOfShapeListOfShape mySplits;
+ TopTools_DataMapOfShapeListOfShape myOrigins;
Standard_Boolean myNonDestructive;
BOPAlgo_GlueEnum myGlue;
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_IndexedMapOfOrientedShape.hxx>
#include <BOPAlgo_Algo.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedMapOfOrientedShape.hxx>
class IntTools_Context;
}
//! Returns the input shapes
- Standard_EXPORT const BOPCol_ListOfShape& Shapes() const {
+ Standard_EXPORT const TopTools_ListOfShape& Shapes() const {
return myShapes;
}
//! Sets the shapes for building areas
- Standard_EXPORT void SetShapes(const BOPCol_ListOfShape& theLS) {
+ Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) {
myShapes = theLS;
}
//! Returns the found loops
- Standard_EXPORT const BOPCol_ListOfShape& Loops() const {
+ Standard_EXPORT const TopTools_ListOfShape& Loops() const {
return myLoops;
}
//! Returns the found areas
- Standard_EXPORT const BOPCol_ListOfShape& Areas() const {
+ Standard_EXPORT const TopTools_ListOfShape& Areas() const {
return myAreas;
}
Standard_EXPORT BOPAlgo_BuilderArea();
Standard_EXPORT virtual ~BOPAlgo_BuilderArea();
- Standard_EXPORT BOPAlgo_BuilderArea(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_BuilderArea(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT virtual void PerformShapesToAvoid() = 0;
Handle(IntTools_Context) myContext;
- BOPCol_ListOfShape myShapes;
- BOPCol_ListOfShape myLoops;
- BOPCol_ListOfShape myLoopsInternal;
- BOPCol_ListOfShape myAreas;
- BOPCol_IndexedMapOfOrientedShape myShapesToAvoid;
+ TopTools_ListOfShape myShapes;
+ TopTools_ListOfShape myLoops;
+ TopTools_ListOfShape myLoopsInternal;
+ TopTools_ListOfShape myAreas;
+ TopTools_IndexedMapOfOrientedShape myShapesToAvoid;
Standard_Boolean myAvoidInternalShapes;
private:
// commercial license or contractual agreement.
#include <Bnd_Box.hxx>
+#include <Bnd_Box2d.hxx>
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_Box2DBndTree.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_MapOfOrientedShape.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
+#include <BOPTools_BoxSelector.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
-
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
//
static
Standard_Boolean IsGrowthWire(const TopoDS_Shape& ,
- const BOPCol_IndexedMapOfShape& );
+ const TopTools_IndexedMapOfShape& );
static
Standard_Boolean IsInside(const TopoDS_Shape& ,
const TopoDS_Shape& ,
Handle(IntTools_Context)& );
static
- void MakeInternalWires(const BOPCol_IndexedMapOfShape& ,
- BOPCol_ListOfShape& );
+ void MakeInternalWires(const TopTools_IndexedMapOfShape& ,
+ TopTools_ListOfShape& );
//=======================================================================
//function :
{
Standard_Boolean bFound;
Standard_Integer i, iCnt, aNbV, aNbE;
- BOPCol_IndexedDataMapOfShapeListOfShape aMVE;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_IndexedDataMapOfShapeListOfShape aMVE;
+ TopTools_ListIteratorOfListOfShape aIt;
//
myShapesToAvoid.Clear();
//
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE=aIt.Value();
if (!myShapesToAvoid.Contains(aE)) {
- BOPTools::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
+ TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
}
}
aNbV=aMVE.Extent();
for (i=1; i<=aNbV; ++i) {
const TopoDS_Vertex& aV=(*(TopoDS_Vertex *)(&aMVE.FindKey(i)));
//
- BOPCol_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
+ TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV);
aNbE=aLE.Extent();
if (!aNbE) {
continue;
{
Standard_Boolean bFlag;
Standard_Integer i, aNbEA;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_IndexedDataMapOfShapeListOfShape aVEMap;
- BOPCol_MapOfOrientedShape aMAdded;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
+ TopTools_MapOfOrientedShape aMAdded;
TopoDS_Iterator aItW;
BRep_Builder aBB;
BOPAlgo_WireEdgeSet aWES(myAllocator);
return;
}
//
- const BOPCol_ListOfShape& aLW=aWES.Shapes();
+ const TopTools_ListOfShape& aLW=aWES.Shapes();
aIt.Initialize (aLW);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aW=aIt.Value();
myLoops.Append(aW);
}
// Post Treatment
- BOPCol_MapOfOrientedShape aMEP;
+ TopTools_MapOfOrientedShape aMEP;
//
// a. collect all edges that are in loops
aIt.Initialize (myLoops);
aNbEA = myShapesToAvoid.Extent();
for (i = 1; i <= aNbEA; ++i) {
const TopoDS_Shape& aEE = myShapesToAvoid(i);
- BOPTools::MapShapesAndAncestors(aEE,
+ TopExp::MapShapesAndAncestors(aEE,
TopAbs_VERTEX,
TopAbs_EDGE,
aVEMap);
TopoDS_Iterator aItE(aE);
for (; aItE.More()&&bFlag; aItE.Next()) {
const TopoDS_Vertex& aV = (*(TopoDS_Vertex *)(&aItE.Value()));
- const BOPCol_ListOfShape& aLE=aVEMap.FindFromKey(aV);
+ const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV);
aIt.Initialize(aLE);
for (; aIt.More()&&bFlag; aIt.Next()) {
const TopoDS_Shape& aEx=aIt.Value();
}
// The new faces
- BOPCol_ListOfShape aNewFaces;
+ TopTools_ListOfShape aNewFaces;
// The hole faces which has to be classified relatively new faces
- BOPCol_IndexedMapOfShape aHoleFaces;
+ TopTools_IndexedMapOfShape aHoleFaces;
// Map of the edges of the hole faces for quick check of the growths.
// If the analyzed wire contains any of the edges from the hole faces
// it is considered as growth.
- BOPCol_IndexedMapOfShape aMHE;
+ TopTools_IndexedMapOfShape aMHE;
// Analyze the new wires - classify them to be the holes and growths
- BOPCol_ListIteratorOfListOfShape aItLL(myLoops);
+ TopTools_ListIteratorOfListOfShape aItLL(myLoops);
for (; aItLL.More(); aItLL.Next())
{
const TopoDS_Shape& aWire = aItLL.Value();
else
{
aHoleFaces.Add(aFace);
- BOPTools::MapShapes(aWire, TopAbs_EDGE, aMHE);
+ TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE);
}
}
// Classify holes relatively faces
// Prepare tree filler with the boxes of the hole faces
- BOPCol_Box2DBndTree aBBTree;
+ NCollection_UBTree<Standard_Integer, Bnd_Box2d> aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box2d> aTreeFiller(aBBTree);
Standard_Integer i, aNbH = aHoleFaces.Extent();
aTreeFiller.Fill();
// Find outer growth face that is most close to each hole face
- BOPCol_IndexedDataMapOfShapeShape aHoleFaceMap;
+ TopTools_IndexedDataMapOfShapeShape aHoleFaceMap;
+
+ // Selector
+ BOPTools_BoxSelector<Bnd_Box2d> aSelector;
- BOPCol_ListIteratorOfListOfShape aItLS(aNewFaces);
+ TopTools_ListIteratorOfListOfShape aItLS(aNewFaces);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Face& aFace = TopoDS::Face(aItLS.Value());
Bnd_Box2d aBox;
BRepTools::AddUVBounds(aFace, aBox);
- BOPCol_Box2DBndTreeSelector aSelector;
+ aSelector.Clear();
aSelector.SetBox(aBox);
aBBTree.Select(aSelector);
- const BOPCol_ListOfInteger& aLI = aSelector.Indices();
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ const TColStd_ListOfInteger& aLI = aSelector.Indices();
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next())
{
Standard_Integer k = aItLI.Value();
}
// Make the back map from faces to holes
- BOPCol_IndexedDataMapOfShapeListOfShape aFaceHolesMap;
+ TopTools_IndexedDataMapOfShapeListOfShape aFaceHolesMap;
aNbH = aHoleFaceMap.Extent();
for (i = 1; i <= aNbH; ++i)
const TopoDS_Shape& aHole = aHoleFaceMap.FindKey(i);
const TopoDS_Shape& aFace = aHoleFaceMap(i);
//
- BOPCol_ListOfShape* pLHoles = aFaceHolesMap.ChangeSeek(aFace);
+ TopTools_ListOfShape* pLHoles = aFaceHolesMap.ChangeSeek(aFace);
if (!pLHoles)
- pLHoles = &aFaceHolesMap(aFaceHolesMap.Add(aFace, BOPCol_ListOfShape()));
+ pLHoles = &aFaceHolesMap(aFaceHolesMap.Add(aFace, TopTools_ListOfShape()));
pLHoles->Append(aHole);
}
{
TopoDS_Face aFace;
aBB.MakeFace(aFace, aS, aLoc, aTol);
- BOPCol_ListOfShape& anUnUsedHoles = aFaceHolesMap(aFaceHolesMap.Add(aFace, BOPCol_ListOfShape()));
+ TopTools_ListOfShape& anUnUsedHoles = aFaceHolesMap(aFaceHolesMap.Add(aFace, TopTools_ListOfShape()));
aNbH = aHoleFaces.Extent();
for (i = 1; i <= aNbH; ++i)
{
for ( ; aItLS.More(); aItLS.Next())
{
TopoDS_Face& aFace = *(TopoDS_Face*)&aItLS.Value();
- const BOPCol_ListOfShape* pLHoles = aFaceHolesMap.Seek(aFace);
+ const TopTools_ListOfShape* pLHoles = aFaceHolesMap.Seek(aFace);
if (pLHoles)
{
// update faces with the holes
- BOPCol_ListIteratorOfListOfShape aItLH(*pLHoles);
+ TopTools_ListIteratorOfListOfShape aItLH(*pLHoles);
for (; aItLH.More(); aItLH.Next())
{
const TopoDS_Shape& aFHole = aItLH.Value();
//Standard_Real aTol;
Standard_Integer i;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt1, aIt2;
+ TopTools_ListIteratorOfListOfShape aIt1, aIt2;
TopoDS_Iterator aIt;
- BOPCol_IndexedMapOfShape aME1, aME2, aMEP;
- BOPCol_IndexedDataMapOfShapeListOfShape aMVE;
- BOPCol_ListOfShape aLSI;
+ TopTools_IndexedMapOfShape aME1, aME2, aMEP;
+ TopTools_IndexedDataMapOfShapeListOfShape aMVE;
+ TopTools_ListOfShape aLSI;
//
// 1. All internal edges
aIt1.Initialize(myLoopsInternal);
TopoDS_Face& aF=(*(TopoDS_Face *)(&aIt2.Value()));
//
aMVE.Clear();
- BOPTools::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
+ TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
//
// 2.1 Separate faces to process aMEP
aME2.Clear();
//function : MakeInternalWires
//purpose :
//=======================================================================
-void MakeInternalWires(const BOPCol_IndexedMapOfShape& theME,
- BOPCol_ListOfShape& theWires)
+void MakeInternalWires(const TopTools_IndexedMapOfShape& theME,
+ TopTools_ListOfShape& theWires)
{
Standard_Integer i, aNbE;
- BOPCol_MapOfShape aAddedMap;
- BOPCol_ListIteratorOfListOfShape aItE;
- BOPCol_IndexedDataMapOfShapeListOfShape aMVE;
+ TopTools_MapOfShape aAddedMap;
+ TopTools_ListIteratorOfListOfShape aItE;
+ TopTools_IndexedDataMapOfShapeListOfShape aMVE;
BRep_Builder aBB;
//
aNbE = theME.Extent();
for (i = 1; i <= aNbE; ++i) {
const TopoDS_Shape& aE = theME(i);
- BOPTools::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
+ TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
}
//
for (i = 1; i <= aNbE; ++i) {
TopExp_Explorer aExp(aE, TopAbs_VERTEX);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aV =aExp.Current();
- const BOPCol_ListOfShape& aLE=aMVE.FindFromKey(aV);
+ const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
aItE.Initialize(aLE);
for (; aItE.More(); aItE.Next()) {
TopoDS_Shape aEL=aItE.Value();
TopAbs_State aState;
TopExp_Explorer aExp;
- BOPCol_IndexedMapOfShape aME2;
+ TopTools_IndexedMapOfShape aME2;
gp_Pnt2d aP2D;
//
bRet=Standard_False;
aState=TopAbs_UNKNOWN;
const TopoDS_Face& aF2=(*(TopoDS_Face *)(&theF2));
//
- BOPTools::MapShapes(aF2, TopAbs_EDGE, aME2);//AA
+ TopExp::MapShapes(aF2, TopAbs_EDGE, aME2);//AA
//
aExp.Init(theHole, TopAbs_EDGE);
if (aExp.More()) {
//purpose :
//=======================================================================
Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire,
- const BOPCol_IndexedMapOfShape& theMHE)
+ const TopTools_IndexedMapOfShape& theMHE)
{
if (theMHE.Extent())
{
#include <TopoDS_Face.hxx>
#include <TopAbs_Orientation.hxx>
#include <BOPAlgo_BuilderArea.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
class TopoDS_Face;
Standard_EXPORT BOPAlgo_BuilderFace();
Standard_EXPORT virtual ~BOPAlgo_BuilderFace();
- Standard_EXPORT BOPAlgo_BuilderFace(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_BuilderFace(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Sets the face generatix
Standard_EXPORT void SetFace (const TopoDS_Face& theFace);
//function : ImagesResult
//purpose :
//=======================================================================
- const BOPCol_IndexedDataMapOfShapeListOfShape&
+ const TopTools_IndexedDataMapOfShapeListOfShape&
BOPAlgo_BuilderShape::ImagesResult()const
{
return myImagesResult;
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <Standard_Boolean.hxx>
+#include <BOPAlgo_Algo.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPAlgo_Algo.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
class TopoDS_Shape;
//! of arguments has modified shapes.
Standard_EXPORT Standard_Boolean HasModified() const;
- Standard_EXPORT const BOPCol_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
+ Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
Standard_EXPORT BOPAlgo_BuilderShape();
Standard_EXPORT virtual ~BOPAlgo_BuilderShape();
- Standard_EXPORT BOPAlgo_BuilderShape(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Prepare information for history support
Standard_EXPORT virtual void PrepareHistory();
TopoDS_Shape myShape;
TopTools_ListOfShape myHistShapes;
- BOPCol_MapOfShape myMapShape;
+ TopTools_MapOfShape myMapShape;
Standard_Boolean myHasDeleted;
Standard_Boolean myHasGenerated;
Standard_Boolean myHasModified;
- BOPCol_IndexedDataMapOfShapeListOfShape myImagesResult;
+ TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;
Standard_Boolean myFlagHistory;
-
private:
-
-
-
-
};
-
-
-
-
-
-
#endif // _BOPAlgo_BuilderShape_HeaderFile
#include <BOPAlgo_ShellSplitter.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeShape.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfOrientedShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
+#include <BOPTools_BoxBndTree.hxx>
#include <BOPTools_CoupleOfShape.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_List.hxx>
#include <NCollection_UBTreeFiller.hxx>
+#include <NCollection_Vector.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeShape.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//
static
Standard_Boolean IsGrowthShell(const TopoDS_Shape& ,
- const BOPCol_IndexedMapOfShape& );
+ const TopTools_IndexedMapOfShape& );
static
Standard_Boolean IsHole(const TopoDS_Shape& ,
Handle(IntTools_Context)& );
const TopoDS_Shape& ,
Handle(IntTools_Context)& );
static
- void MakeInternalShells(const BOPCol_IndexedMapOfShape& ,
- BOPCol_ListOfShape& );
+ void MakeInternalShells(const TopTools_IndexedMapOfShape& ,
+ TopTools_ListOfShape& );
//=======================================================================
//function :
TopoDS_Compound aC;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aBB.MakeCompound(aC);
aIt.Initialize(myShapes);
Standard_Boolean bFound;
Standard_Integer i, iCnt, aNbE, aNbF;
TopAbs_Orientation aOrE;
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF;
+ TopTools_ListIteratorOfListOfShape aIt;
//
myShapesToAvoid.Clear();
//
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value();
if (!myShapesToAvoid.Contains(aF)) {
- BOPTools::MapShapesAndAncestors(aF,
+ TopExp::MapShapesAndAncestors(aF,
TopAbs_EDGE,
TopAbs_FACE,
aMEF);
continue;
}
//
- BOPCol_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
+ TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE);
aNbF=aLF.Extent();
if (!aNbF) {
continue;
void BOPAlgo_BuilderSolid::PerformLoops()
{
Standard_Integer i, aNbSh;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
TopoDS_Iterator aItS;
Handle(NCollection_BaseAllocator) aAlr;
//
{
TopoDS_Compound aFacesSp;
BRep_Builder().MakeCompound(aFacesSp);
- BOPCol_ListIteratorOfListOfShape aItLF(aSSp.StartElements());
+ TopTools_ListIteratorOfListOfShape aItLF(aSSp.StartElements());
for (; aItLF.More(); aItLF.Next()) {
BRep_Builder().Add(aFacesSp, aItLF.Value());
}
return;
}
//
- const BOPCol_ListOfShape& aLSh=aSSp.Shells();
+ const TopTools_ListOfShape& aLSh=aSSp.Shells();
aIt.Initialize (aLSh);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSh=aIt.Value();
//
// 2. Post Treatment
BRep_Builder aBB;
- BOPCol_MapOfOrientedShape AddedFacesMap;
- BOPCol_IndexedDataMapOfShapeListOfShape aEFMap;
- BOPCol_MapOfOrientedShape aMP;
+ TopTools_MapOfOrientedShape AddedFacesMap;
+ TopTools_IndexedDataMapOfShapeListOfShape aEFMap;
+ TopTools_MapOfOrientedShape aMP;
//
// a. collect all edges that are in loops
aIt.Initialize (myLoops);
aNbSh = myShapesToAvoid.Extent();
for (i = 1; i <= aNbSh; ++i) {
const TopoDS_Shape& aFF = myShapesToAvoid(i);
- BOPTools::MapShapesAndAncestors(aFF,
+ TopExp::MapShapesAndAncestors(aFF,
TopAbs_EDGE, TopAbs_FACE,
aEFMap);
}
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&aExp.Current()));
- const BOPCol_ListOfShape& aLF=aEFMap.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE);
aIt.Initialize(aLF);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Face& aFL=(*(TopoDS_Face*)(&aIt.Value()));
myAreas.Clear();
BRep_Builder aBB;
// The new solids
- BOPCol_ListOfShape aNewSolids;
+ TopTools_ListOfShape aNewSolids;
// The hole shells which has to be classified relatively new solids
- BOPCol_IndexedMapOfShape aHoleShells;
+ TopTools_IndexedMapOfShape aHoleShells;
// Map of the faces of the hole shells for quick check of the growths.
// If the analyzed shell contains any of the hole faces, it is considered as growth.
- BOPCol_IndexedMapOfShape aMHF;
+ TopTools_IndexedMapOfShape aMHF;
// Analyze the shells
- BOPCol_ListIteratorOfListOfShape aItLL(myLoops);
+ TopTools_ListIteratorOfListOfShape aItLL(myLoops);
for (; aItLL.More(); aItLL.Next())
{
const TopoDS_Shape& aShell = aItLL.Value();
else
{
aHoleShells.Add(aShell);
- BOPTools::MapShapes(aShell, TopAbs_FACE, aMHF);
+ TopExp::MapShapes(aShell, TopAbs_FACE, aMHF);
}
}
if (aHoleShells.IsEmpty())
{
// No holes, stop the analysis
- BOPCol_ListIteratorOfListOfShape aItLS(aNewSolids);
+ TopTools_ListIteratorOfListOfShape aItLS(aNewSolids);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aSol = aItLS.Value();
// Classify holes relatively solids
// Prepare tree filler with the boxes of the hole shells
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
Standard_Integer i, aNbH = aHoleShells.Extent();
aTreeFiller.Fill();
// Find outer growth shell that is most close to each hole shell
- BOPCol_IndexedDataMapOfShapeShape aHoleSolidMap;
+ TopTools_IndexedDataMapOfShapeShape aHoleSolidMap;
- BOPCol_ListIteratorOfListOfShape aItLS(aNewSolids);
+ TopTools_ListIteratorOfListOfShape aItLS(aNewSolids);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aSolid = aItLS.Value();
myBoxes.Bind(aSolid, aBox);
- BOPCol_BoxBndTreeSelector aSelector;
+ BOPTools_BoxBndTreeSelector aSelector;
aSelector.SetBox(aBox);
aBBTree.Select(aSelector);
- const BOPCol_ListOfInteger& aLI = aSelector.Indices();
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ const TColStd_ListOfInteger& aLI = aSelector.Indices();
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next())
{
Standard_Integer k = aItLI.Value();
}
// Make the back map from solids to holes
- BOPCol_IndexedDataMapOfShapeListOfShape aSolidHolesMap;
+ TopTools_IndexedDataMapOfShapeListOfShape aSolidHolesMap;
aNbH = aHoleSolidMap.Extent();
for (i = 1; i <= aNbH; ++i)
const TopoDS_Shape& aHole = aHoleSolidMap.FindKey(i);
const TopoDS_Shape& aSolid = aHoleSolidMap(i);
//
- BOPCol_ListOfShape* pLHoles = aSolidHolesMap.ChangeSeek(aSolid);
+ TopTools_ListOfShape* pLHoles = aSolidHolesMap.ChangeSeek(aSolid);
if (!pLHoles)
- pLHoles = &aSolidHolesMap(aSolidHolesMap.Add(aSolid, BOPCol_ListOfShape()));
+ pLHoles = &aSolidHolesMap(aSolidHolesMap.Add(aSolid, TopTools_ListOfShape()));
pLHoles->Append(aHole);
}
for ( ; aItLS.More(); aItLS.Next())
{
TopoDS_Solid& aSolid = *(TopoDS_Solid*)&aItLS.Value();
- const BOPCol_ListOfShape* pLHoles = aSolidHolesMap.Seek(aSolid);
+ const TopTools_ListOfShape* pLHoles = aSolidHolesMap.Seek(aSolid);
if (pLHoles)
{
// update solid
- BOPCol_ListIteratorOfListOfShape aItLH(*pLHoles);
+ TopTools_ListIteratorOfListOfShape aItLH(*pLHoles);
for (; aItLH.More(); aItLH.Next())
{
const TopoDS_Shape& aHole = aItLH.Value();
return;
// Get all faces to classify
- BOPCol_IndexedMapOfShape aMFs;
- BOPCol_ListIteratorOfListOfShape aItLS(myLoopsInternal);
+ TopTools_IndexedMapOfShape aMFs;
+ TopTools_ListIteratorOfListOfShape aItLS(myLoopsInternal);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aShell = aItLS.Value();
TopoDS_Solid aSolid;
aBB.MakeSolid(aSolid);
//
- BOPCol_ListOfShape aLSI;
+ TopTools_ListOfShape aLSI;
MakeInternalShells(aMFs, aLSI);
//
aItLS.Initialize(aLSI);
// Classify faces relatively solids
// Prepare list of faces to classify
- BOPCol_ListOfShape aLFaces;
+ TopTools_ListOfShape aLFaces;
Standard_Integer i, aNbF = aMFs.Extent();
for (i = 1; i <= aNbF; ++i)
aLFaces.Append(aMFs(i));
// Map of solids with IN faces
- BOPCol_IndexedDataMapOfShapeListOfShape aMSLF;
+ TopTools_IndexedDataMapOfShapeListOfShape aMSLF;
// Perform classification
BOPAlgo_Tools::ClassifyFaces(aLFaces, myAreas, myRunParallel, myContext, aMSLF, myBoxes);
// Update Solids by internal Faces
- BOPCol_MapOfShape aMFDone;
+ TopTools_MapOfShape aMFDone;
Standard_Integer aNbS = aMSLF.Extent();
for (i = 1; i <= aNbS; ++i)
const TopoDS_Shape& aSolid = aMSLF.FindKey(i);
TopoDS_Shape *pSolid = (TopoDS_Shape*)&aSolid;
- const BOPCol_ListOfShape& aLF = aMSLF(i);
+ const TopTools_ListOfShape& aLF = aMSLF(i);
if (aLF.IsEmpty())
continue;
- BOPCol_IndexedMapOfShape aMF;
+ TopTools_IndexedMapOfShape aMF;
aItLS.Initialize(aLF);
for (; aItLS.More(); aItLS.Next())
{
aMFDone.Add(aF);
}
//
- BOPCol_ListOfShape aLSI;
+ TopTools_ListOfShape aLSI;
MakeInternalShells(aMF, aLSI);
//
aItLS.Initialize(aLSI);
}
// Make solid from the unused faces (if any)
- BOPCol_IndexedMapOfShape aMFUnUsed;
+ TopTools_IndexedMapOfShape aMFUnUsed;
for (i = 1; i <= aNbF; ++i)
{
const TopoDS_Shape& aF = aMFs(i);
TopoDS_Solid aSolid;
aBB.MakeSolid(aSolid);
//
- BOPCol_ListOfShape aLSI;
+ TopTools_ListOfShape aLSI;
MakeInternalShells(aMFUnUsed, aLSI);
//
aItLS.Initialize(aLSI);
//function : MakeInternalShells
//purpose :
//=======================================================================
-void MakeInternalShells(const BOPCol_IndexedMapOfShape& theMF,
- BOPCol_ListOfShape& theShells)
+void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
+ TopTools_ListOfShape& theShells)
{
Standard_Integer i, aNbF;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItF;
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF;
- BOPCol_MapOfShape aAddedFacesMap;
+ TopTools_ListIteratorOfListOfShape aItF;
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF;
+ TopTools_MapOfShape aAddedFacesMap;
//
aNbF = theMF.Extent();
for (i = 1; i <= aNbF; ++i) {
TopoDS_Shape aF = theMF(i);
- BOPTools::MapShapesAndAncestors(aF,
+ TopExp::MapShapesAndAncestors(aF,
TopAbs_EDGE, TopAbs_FACE,
aMEF);
}
TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE);
for (; aEdgeExp.More(); aEdgeExp.Next()) {
const TopoDS_Shape& aE =aEdgeExp.Current();
- const BOPCol_ListOfShape& aLF=aMEF.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
aItF.Initialize(aLF);
for (; aItF.More(); aItF.Next()) {
TopoDS_Shape aFL=aItF.Value();
aState=aClsf.State();
}
else {
- BOPCol_IndexedMapOfShape aBounds;
- BOPTools::MapShapes(*pS2, TopAbs_EDGE, aBounds);
+ TopTools_IndexedMapOfShape aBounds;
+ TopExp::MapShapes(*pS2, TopAbs_EDGE, aBounds);
const TopoDS_Face& aF = (*(TopoDS_Face*)(&aExp.Current()));
aState=BOPTools_AlgoTools::ComputeState(aF, *pS2,
Precision::Confusion(),
//purpose :
//=======================================================================
Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell,
- const BOPCol_IndexedMapOfShape& theMHF)
+ const TopTools_IndexedMapOfShape& theMHF)
{
if (theMHF.Extent())
{
#include <TopoDS_Solid.hxx>
#include <BOPAlgo_BuilderArea.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_DataMapOfShapeBox.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <TopTools_DataMapOfShapeBox.hxx>
class TopoDS_Solid;
Standard_EXPORT BOPAlgo_BuilderSolid();
Standard_EXPORT virtual ~BOPAlgo_BuilderSolid();
- Standard_EXPORT BOPAlgo_BuilderSolid(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_BuilderSolid(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Sets the source solid <theSolid>
Standard_EXPORT void SetSolid (const TopoDS_Solid& theSolid);
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! Returns the map of solid/box pairs
- const BOPCol_DataMapOfShapeBox& GetBoxesMap() const
+ const TopTools_DataMapOfShapeBox& GetBoxesMap() const
{
return myBoxes;
}
private:
- BOPCol_DataMapOfShapeBox myBoxes; // Boxes of the produced solids
+ TopTools_DataMapOfShapeBox myBoxes; // Boxes of the produced solids
};
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
-#include <BOPCol_DataMapOfIntegerInteger.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BRep_Tool.hxx>
#include <IntTools_Context.hxx>
#include <TopAbs_ShapeEnum.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function : FillImagesVertices
void BOPAlgo_Builder::FillImagesVertices()
{
Standard_Integer nV, nVSD;
- BOPCol_DataMapIteratorOfDataMapOfIntegerInteger aIt;
+ TColStd_DataMapIteratorOfDataMapOfIntegerInteger aIt;
//
- const BOPCol_DataMapOfIntegerInteger& aMSDV=myDS->ShapesSD();
+ const TColStd_DataMapOfIntegerInteger& aMSDV=myDS->ShapesSD();
aIt.Initialize(aMSDV);
for (; aIt.More(); aIt.Next()) {
nV=aIt.Key();
const TopoDS_Shape& aV=myDS->Shape(nV);
const TopoDS_Shape& aVSD=myDS->Shape(nVSD);
//
- BOPCol_ListOfShape aLVSD(myAllocator);
+ TopTools_ListOfShape aLVSD(myAllocator);
//
aLVSD.Append(aVSD);
myImages.Bind(aV, aLVSD);
//
myShapesSD.Bind(aV, aVSD);
//
- BOPCol_ListOfShape* pLOr = myOrigins.ChangeSeek(aVSD);
+ TopTools_ListOfShape* pLOr = myOrigins.ChangeSeek(aVSD);
if (!pLOr) {
- pLOr = myOrigins.Bound(aVSD, BOPCol_ListOfShape());
+ pLOr = myOrigins.Bound(aVSD, TopTools_ListOfShape());
}
pLOr->Append(aV);
}
// Fill the images of the edge from the list of its pave blocks.
// The small edges, having no pave blocks, will have the empty list
// of images and, thus, will be avoided in the result.
- BOPCol_ListOfShape *pLS = myImages.Bound(aE, BOPCol_ListOfShape());
+ TopTools_ListOfShape *pLS = myImages.Bound(aE, TopTools_ListOfShape());
//
BOPDS_ListIteratorOfListOfPaveBlock aItPB(aLPB);
for (; aItPB.More(); aItPB.Next()) {
const TopoDS_Shape& aSpR = myDS->Shape(nSpR);
pLS->Append(aSpR);
//
- BOPCol_ListOfShape* pLOr = myOrigins.ChangeSeek(aSpR);
+ TopTools_ListOfShape* pLOr = myOrigins.ChangeSeek(aSpR);
if (!pLOr) {
- pLOr = myOrigins.Bound(aSpR, BOPCol_ListOfShape());
+ pLOr = myOrigins.Bound(aSpR, TopTools_ListOfShape());
}
pLOr->Append(aE);
//
{
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
- BOPCol_MapOfShape aM;
- BOPCol_ListIteratorOfListOfShape aIt, aItIm;
+ TopTools_MapOfShape aM;
+ TopTools_ListIteratorOfListOfShape aIt, aItIm;
//
aIt.Initialize(myArguments);
for (; aIt.More(); aIt.Next()) {
aType=aS.ShapeType();
if (aType==theType) {
if (myImages.IsBound(aS)){
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
void BOPAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType)
{
Standard_Integer i, aNbS;
- BOPCol_MapOfShape aMFP(100, myAllocator);
+ TopTools_MapOfShape aMFP(100, myAllocator);
//
aNbS=myDS->NbSourceShapes();
for (i=0; i<aNbS; ++i) {
void BOPAlgo_Builder::FillImagesCompounds()
{
Standard_Integer i, aNbS;
- BOPCol_MapOfShape aMFP(100, myAllocator);
+ TopTools_MapOfShape aMFP(100, myAllocator);
//
aNbS=myDS->NbSourceShapes();
for (i=0; i<aNbS; ++i) {
Standard_Boolean bInterferred, bToReverse;
TopoDS_Iterator aIt;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aItIm;
//
bInterferred=IsInterferred(theS);
if (!bInterferred){
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
if (myImages.IsBound(aSx)) {
- const BOPCol_ListOfShape& aLFIm=myImages.Find(aSx);
+ const TopTools_ListOfShape& aLFIm=myImages.Find(aSx);
aItIm.Initialize(aLFIm);
for (; aItIm.More(); aItIm.Next()) {
TopoDS_Shape aSxIm=aItIm.Value();
//
aCIm.Closed(BRep_Tool::IsClosed(aCIm));
//
- BOPCol_ListOfShape aLSIm(myAllocator);
+ TopTools_ListOfShape aLSIm(myAllocator);
aLSIm.Append(aCIm);
myImages.Bind(theS, aLSIm);
}
//purpose :
//=======================================================================
void BOPAlgo_Builder::FillImagesCompound(const TopoDS_Shape& theS,
- BOPCol_MapOfShape& theMFP)
+ TopTools_MapOfShape& theMFP)
{
Standard_Boolean bInterferred;
TopAbs_Orientation aOrX;
TopoDS_Iterator aIt;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aItIm;
//
if (!theMFP.Add(theS)) {
return;
const TopoDS_Shape& aSX=aIt.Value();
aOrX=aSX.Orientation();
if (myImages.IsBound(aSX)) {
- const BOPCol_ListOfShape& aLFIm=myImages.Find(aSX);
+ const TopTools_ListOfShape& aLFIm=myImages.Find(aSX);
aItIm.Initialize(aLFIm);
for (; aItIm.More(); aItIm.Next()) {
TopoDS_Shape aSXIm=aItIm.Value();
}
}
//
- BOPCol_ListOfShape aLSIm(myAllocator);
+ TopTools_ListOfShape aLSIm(myAllocator);
aLSIm.Append(aCIm);
myImages.Bind(theS, aLSIm);
}
#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());
#include <BOPAlgo_Tools.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
//
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPCol_DataMapOfIntegerShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
-//
#include <IntTools_Context.hxx>
//
#include <BOPDS_DS.hxx>
#include <BOPDS_ShapeInfo.hxx>
//
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_MapOfSet.hxx>
#include <BOPTools_Set.hxx>
+#include <BOPTools_Parallel.hxx>
//
#include <BOPAlgo_Tools.hxx>
#include <NCollection_Array1.hxx>
#include <NCollection_IncAllocator.hxx>
+#include <NCollection_Vector.hxx>
+
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <algorithm>
static
void OwnInternalShapes(const TopoDS_Shape& ,
- BOPCol_IndexedMapOfShape& );
+ TopTools_IndexedMapOfShape& );
//=======================================================================
//
aAlr=NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_DataMapOfShapeListOfShape theInParts(100, aAlr);
- BOPCol_DataMapOfShapeShape theDraftSolids(100, aAlr);
+ TopTools_DataMapOfShapeListOfShape theInParts(100, aAlr);
+ TopTools_DataMapOfShapeShape theDraftSolids(100, aAlr);
//
FillIn3DParts(theInParts, theDraftSolids, aAlr);
BuildSplitSolids(theInParts, theDraftSolids, aAlr);
//purpose :
//=======================================================================
void BOPAlgo_Builder::FillIn3DParts
- (BOPCol_DataMapOfShapeListOfShape& theInParts,
- BOPCol_DataMapOfShapeShape& theDraftSolids,
- const BOPCol_BaseAllocator& )
+ (TopTools_DataMapOfShapeListOfShape& theInParts,
+ TopTools_DataMapOfShapeShape& theDraftSolids,
+ const Handle(NCollection_BaseAllocator)& )
{
Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator;
// Find all faces that are IN solids
// Store boxes of the shapes into a map
- BOPCol_DataMapOfShapeBox aShapeBoxMap(1, anAlloc);
+ TopTools_DataMapOfShapeBox aShapeBoxMap(1, anAlloc);
// Fence map
- BOPCol_MapOfShape aMFence(1, anAlloc);
+ TopTools_MapOfShape aMFence(1, anAlloc);
// Get all faces
- BOPCol_ListOfShape aLFaces(anAlloc);
+ TopTools_ListOfShape aLFaces(anAlloc);
Standard_Integer i, aNbS = myDS->NbSourceShapes();
for (i = 0; i < aNbS; ++i)
continue;
const TopoDS_Shape& aS = aSI.Shape();
- const BOPCol_ListOfShape* pLSIm = myImages.Seek(aS);
+ const TopTools_ListOfShape* pLSIm = myImages.Seek(aS);
if (pLSIm)
{
- BOPCol_ListIteratorOfListOfShape aItLSIm(*pLSIm);
+ TopTools_ListIteratorOfListOfShape aItLSIm(*pLSIm);
for (; aItLSIm.More(); aItLSIm.Next())
{
const TopoDS_Shape& aSIm = aItLSIm.Value();
BRep_Builder aBB;
// Get all solids
- BOPCol_ListOfShape aLSolids(anAlloc);
+ TopTools_ListOfShape aLSolids(anAlloc);
// Keep INTERNAL faces of the solids
- BOPCol_DataMapOfShapeListOfShape aSolidsIF(1, anAlloc);
+ TopTools_DataMapOfShapeListOfShape aSolidsIF(1, anAlloc);
// Draft solids
- BOPCol_IndexedDataMapOfShapeShape aDraftSolid(1, anAlloc);
+ TopTools_IndexedDataMapOfShapeShape aDraftSolid(1, anAlloc);
for (i = 0; i < aNbS; ++i)
{
myDS->BuildBndBoxSolid(i, aBoxS, myCheckInverted);
// Build Draft Solid
- BOPCol_ListOfShape aLIF;
+ TopTools_ListOfShape aLIF;
TopoDS_Solid aSD;
aBB.MakeSolid(aSD);
BuildDraftSolid(aSolid, aSD, aLIF);
}
// Perform classification of the faces
- BOPCol_IndexedDataMapOfShapeListOfShape anInParts;
+ TopTools_IndexedDataMapOfShapeListOfShape anInParts;
BOPAlgo_Tools::ClassifyFaces(aLFaces, aLSolids, myRunParallel,
myContext, anInParts, aShapeBoxMap, aSolidsIF);
{
const TopoDS_Solid& aSolid = TopoDS::Solid(aDraftSolid.FindKey(i));
const TopoDS_Solid& aSDraft = TopoDS::Solid(aDraftSolid(i));
- const BOPCol_ListOfShape& aLInFaces = anInParts.FindFromKey(aSDraft);
- const BOPCol_ListOfShape& aLInternal = aSolidsIF.Find(aSDraft);
+ const TopTools_ListOfShape& aLInFaces = anInParts.FindFromKey(aSDraft);
+ const TopTools_ListOfShape& aLInternal = aSolidsIF.Find(aSDraft);
Standard_Integer aNbIN = aLInFaces.Extent();
if (aNbInt || aNbIN)
{
// Combine the lists
- BOPCol_ListOfShape *pLIN = theInParts.Bound(aSolid, BOPCol_ListOfShape());
+ TopTools_ListOfShape *pLIN = theInParts.Bound(aSolid, TopTools_ListOfShape());
- BOPCol_ListIteratorOfListOfShape aItLS(aLInFaces);
+ TopTools_ListIteratorOfListOfShape aItLS(aLInFaces);
for (; aItLS.More(); aItLS.Next())
pLIN->Append(aItLS.Value());
//=======================================================================
void BOPAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
TopoDS_Shape& theDraftSolid,
- BOPCol_ListOfShape& theLIF)
+ TopTools_ListOfShape& theLIF)
{
Standard_Boolean bToReverse;
Standard_Integer iFlag;
TopoDS_Shell aShD;
TopoDS_Shape aFSDx, aFx;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aItS;
+ TopTools_ListIteratorOfListOfShape aItS;
//
aOrSd=theSolid.Orientation();
theDraftSolid.Orientation(aOrSd);
aOrF=aF.Orientation();
//
if (myImages.IsBound(aF)) {
- const BOPCol_ListOfShape& aLSp=myImages.Find(aF);
+ const TopTools_ListOfShape& aLSp=myImages.Find(aF);
aItS.Initialize(aLSp);
for (; aItS.More(); aItS.Next()) {
aFx=aItS.Value();
//=======================================================================
// Vector of Solid Builders
-typedef BOPCol_NCVector<BOPAlgo_BuilderSolid> BOPAlgo_VectorOfBuilderSolid;
+typedef NCollection_Vector<BOPAlgo_BuilderSolid> BOPAlgo_VectorOfBuilderSolid;
// Functors to split solids
-typedef BOPCol_Functor<BOPAlgo_BuilderSolid,
+typedef BOPTools_Functor<BOPAlgo_BuilderSolid,
BOPAlgo_VectorOfBuilderSolid> BOPAlgo_BuilderSolidFunctor;
//
-typedef BOPCol_Cnt<BOPAlgo_BuilderSolidFunctor,
+typedef BOPTools_Cnt<BOPAlgo_BuilderSolidFunctor,
BOPAlgo_VectorOfBuilderSolid> BOPAlgo_BuilderSolidCnt;
//=======================================================================
//purpose :
//=======================================================================
void BOPAlgo_Builder::BuildSplitSolids
- (BOPCol_DataMapOfShapeListOfShape& theInParts,
- BOPCol_DataMapOfShapeShape& theDraftSolids,
- const BOPCol_BaseAllocator& )
+ (TopTools_DataMapOfShapeListOfShape& theInParts,
+ TopTools_DataMapOfShapeShape& theDraftSolids,
+ const Handle(NCollection_BaseAllocator)& )
{
Standard_Boolean bFlagSD;
Standard_Integer i, aNbS;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
Handle(NCollection_BaseAllocator) aAlr0;
aAlr0=NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_ListOfShape aSFS(aAlr0), aLSEmpty(aAlr0);
- BOPCol_MapOfShape aMFence(100, aAlr0);
+ TopTools_ListOfShape aSFS(aAlr0), aLSEmpty(aAlr0);
+ TopTools_MapOfShape aMFence(100, aAlr0);
BOPTools_MapOfSet aMST(100, aAlr0);
BOPAlgo_VectorOfBuilderSolid aVBS;
//
//
// Build temporary map of solids images to avoid rebuilding
// of the solids without internal faces
- BOPCol_IndexedDataMapOfShapeListOfShape aSolidsIm;
+ TopTools_IndexedDataMapOfShapeListOfShape aSolidsIm;
// 1. Build solids for interfered source solids
for (i = 0; i < aNbS; ++i) {
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
continue;
const TopoDS_Shape& aSD = theDraftSolids.Find(aS);
- const BOPCol_ListOfShape* pLFIN = theInParts.Seek(aS);
+ const TopTools_ListOfShape* pLFIN = theInParts.Seek(aS);
if (!pLFIN || pLFIN->IsEmpty())
{
- aSolidsIm(aSolidsIm.Add(aS, BOPCol_ListOfShape())).Append(aSD);
+ aSolidsIm(aSolidsIm.Add(aS, TopTools_ListOfShape())).Append(aSD);
continue;
}
}
//
// 1.3 Build new solids
- BOPAlgo_BuilderSolid& aBS=aVBS.Append1();
+ BOPAlgo_BuilderSolid& aBS=aVBS.Appended();
aBS.SetSolid(aSolid);
aBS.SetShapes(aSFS);
aBS.SetRunParallel(myRunParallel);
//
Standard_Integer k, aNbBS;
//
- aNbBS=aVBS.Extent();
+ aNbBS=aVBS.Length();
//
//===================================================
BOPAlgo_BuilderSolidCnt::Perform(myRunParallel, aVBS);
for (k = 1; k <= aNbBS; ++k)
{
const TopoDS_Shape& aS = aSolidsIm.FindKey(k);
- const BOPCol_ListOfShape& aLSR = aSolidsIm(k);
+ const TopTools_ListOfShape& aLSR = aSolidsIm(k);
//
if (!myImages.IsBound(aS)) {
- BOPCol_ListOfShape* pLSx = myImages.Bound(aS, BOPCol_ListOfShape());
+ TopTools_ListOfShape* pLSx = myImages.Bound(aS, TopTools_ListOfShape());
//
aIt.Initialize(aLSR);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aSTx.Shape();
pLSx->Append(aSx);
//
- BOPCol_ListOfShape* pLOr = myOrigins.ChangeSeek(aSx);
+ TopTools_ListOfShape* pLOr = myOrigins.ChangeSeek(aSx);
if (!pLOr) {
- pLOr = myOrigins.Bound(aSx, BOPCol_ListOfShape());
+ pLOr = myOrigins.Bound(aSx, TopTools_ListOfShape());
}
pLOr->Append(aS);
//
TopAbs_State aState;
TopoDS_Iterator aItS;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt, aIt1;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
//
Handle(NCollection_BaseAllocator) aAllocator;
//-----------------------------------------------------scope f
aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_IndexedDataMapOfShapeListOfShape aMSx(100, aAllocator);
- BOPCol_IndexedMapOfShape aMx(100, aAllocator);
- BOPCol_IndexedMapOfShape aMSI(100, aAllocator);
- BOPCol_MapOfShape aMFence(100, aAllocator);
- BOPCol_MapOfShape aMSOr(100, aAllocator);
- BOPCol_ListOfShape aLSd(aAllocator);
- BOPCol_ListOfShape aLArgs(aAllocator);
- BOPCol_ListOfShape aLSC(aAllocator);
- BOPCol_ListOfShape aLSI(aAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aMSx(100, aAllocator);
+ TopTools_IndexedMapOfShape aMx(100, aAllocator);
+ TopTools_IndexedMapOfShape aMSI(100, aAllocator);
+ TopTools_MapOfShape aMFence(100, aAllocator);
+ TopTools_MapOfShape aMSOr(100, aAllocator);
+ TopTools_ListOfShape aLSd(aAllocator);
+ TopTools_ListOfShape aLArgs(aAllocator);
+ TopTools_ListOfShape aLSC(aAllocator);
+ TopTools_ListOfShape aLSI(aAllocator);
//
// 1. Shapes to process
//
// 1.1 Shapes from pure arguments aMSI
// 1.1.1 vertex, edge, wire
//
- const BOPCol_ListOfShape& aArguments=myDS->Arguments();
+ const TopTools_ListOfShape& aArguments=myDS->Arguments();
aIt.Initialize(aArguments);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
aType==TopAbs_WIRE) {
if (aMFence.Add(aS)) {
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape &aLSp=myImages.Find(aS);
+ const TopTools_ListOfShape &aLSp=myImages.Find(aS);
aIt1.Initialize(aLSp);
for (; aIt1.More(); aIt1.Next()) {
const TopoDS_Shape& aSp=aIt1.Value();
for (j=1; j<=aNbSx; ++j) {
const TopoDS_Shape& aSi=aMx(j);
if (myImages.IsBound(aSi)) {
- const BOPCol_ListOfShape &aLSp=myImages.Find(aSi);
+ const TopTools_ListOfShape &aLSp=myImages.Find(aSi);
aIt1.Initialize(aLSp);
for (; aIt1.More(); aIt1.Next()) {
const TopoDS_Shape& aSp=aIt1.Value();
//
// build aux map from splits of solids
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape &aLSp=myImages.Find(aS);
+ const TopTools_ListOfShape &aLSp=myImages.Find(aS);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp=aIt.Value();
if (aMFence.Add(aSp)) {
- BOPTools::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
- BOPTools::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
- BOPTools::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
+ TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
+ TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx);
+ TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx);
aLSd.Append(aSp);
}
}
}
else {
if (aMFence.Add(aS)) {
- BOPTools::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
- BOPTools::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
- BOPTools::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
+ TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx);
+ TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx);
+ TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx);
aLSd.Append(aS);
aMSOr.Add(aS);
}
for (i = 1; i <= aNbSI; ++i) {
const TopoDS_Shape& aSI = aMSI(i);
if (aMSx.Contains(aSI)) {
- const BOPCol_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
+ const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI);
aNbSx = aLSx.Extent();
if (!aNbSx) {
aLSI.Append(aSI);
aBB.Add(aSdx, aSI);
//
// no need to check for images of aSd as aMSOr contains only original solids
- BOPCol_ListOfShape* pLS = myImages.Bound(aSd, BOPCol_ListOfShape());
+ TopTools_ListOfShape* pLS = myImages.Bound(aSd, TopTools_ListOfShape());
pLS->Append(aSdx);
//
- BOPCol_ListOfShape* pLOr = myOrigins.Bound(aSdx, BOPCol_ListOfShape());
+ TopTools_ListOfShape* pLOr = myOrigins.Bound(aSdx, TopTools_ListOfShape());
pLOr->Append(aSd);
//
aMSOr.Remove(aSd);
//purpose :
//=======================================================================
void OwnInternalShapes(const TopoDS_Shape& theS,
- BOPCol_IndexedMapOfShape& theMx)
+ TopTools_IndexedMapOfShape& theMx)
{
TopoDS_Iterator aIt;
//
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_PaveFiller.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
#include <BOPDS_DS.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <IntTools_Context.hxx>
+#include <TopExp.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function : Generated
{
Standard_Boolean bHasImage, bToReverse;
TopAbs_ShapeEnum aType;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
myHistShapes.Clear();
//
//
//PrepareHistory();
//
- const BOPCol_ListOfShape& aLSp=myImages.Find(theS);
+ const TopTools_ListOfShape& aLSp=myImages.Find(theS);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape aSp=aIt.Value();
{
Standard_Boolean bRet;
TopAbs_ShapeEnum aType;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
bRet = Standard_True;
//
return bRet;
}
//
- const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
+ const TopTools_ListOfShape& aLSp = myImages.Find(theS);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp = aIt.Value();
//
Standard_Boolean bHasImage;
TopAbs_ShapeEnum aType;
- BOPCol_MapOfShape aMS;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_MapIteratorOfMapOfShape aItM;
+ TopTools_MapOfShape aMS;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TopTools_MapIteratorOfMapOfShape aItM;
//
// 1. Clearing
BOPAlgo_BuilderShape::PrepareHistory();
//
// 2. myMapShape - all shapes of result with theirs sub-shapes
- BOPTools::MapShapes(myShape, myMapShape);
+ TopExp::MapShapes(myShape, myMapShape);
//
// 3. MS - all argument shapes with theirs sub-shapes
- const BOPCol_ListOfShape& aArguments=myDS->Arguments();
+ const TopTools_ListOfShape& aArguments=myDS->Arguments();
aIt.Initialize(aArguments);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
- BOPTools::MapShapes(aSx, aMS);
+ TopExp::MapShapes(aSx, aMS);
}
//
// 4. Treatment
// 4.1 .myImagesResult
bHasImage=myImages.IsBound(aSx);
//
- BOPCol_ListOfShape aLSx;
+ TopTools_ListOfShape aLSx;
if (!bHasImage) {
if (myMapShape.Contains(aSx)) {
aLSx.Append(aSx);
}
}
else {
- const BOPCol_ListOfShape& aLSp=myImages.Find(aSx);
+ const TopTools_ListOfShape& aLSp=myImages.Find(aSx);
aIt.Initialize(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp=aIt.Value();
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_MapOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TopExp.hxx>
#include <ShapeUpgrade_UnifySameDomain.hxx>
void MakeTypedContainers(const TopoDS_Shape& theSC,
TopoDS_Shape& theResult);
-static void CollectMaterialBoundaries(const BOPCol_ListOfShape& theLS,
+static void CollectMaterialBoundaries(const TopTools_ListOfShape& theLS,
TopTools_MapOfShape& theMapKeepBnd);
//=======================================================================
TopoDS_Compound anAllParts;
aBB.MakeCompound(anAllParts);
//
- BOPCol_MapOfShape aMFence;
- BOPCol_MapOfInteger aMDims;
+ TopTools_MapOfShape aMFence;
+ TColStd_MapOfInteger aMDims;
//
- BOPCol_ListIteratorOfListOfShape aIt(myArguments);
+ TopTools_ListIteratorOfListOfShape aIt(myArguments);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
//
TopExp_Explorer aExp(aS, aType);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aST = aExp.Current();
- const BOPCol_ListOfShape* pLSIm = myImages.Seek(aST);
+ const TopTools_ListOfShape* pLSIm = myImages.Seek(aST);
if (!pLSIm) {
- BOPCol_ListOfShape* pLS = myIndex.ChangeSeek(aST);
+ TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aST);
if (!pLS) {
- pLS = &myIndex(myIndex.Add(aST, BOPCol_ListOfShape()));
+ pLS = &myIndex(myIndex.Add(aST, TopTools_ListOfShape()));
}
pLS->Append(aS);
//
continue;
}
//
- BOPCol_ListIteratorOfListOfShape aItIm(*pLSIm);
+ TopTools_ListIteratorOfListOfShape aItIm(*pLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSTIm = aItIm.Value();
//
- BOPCol_ListOfShape* pLS = myIndex.ChangeSeek(aSTIm);
+ TopTools_ListOfShape* pLS = myIndex.ChangeSeek(aSTIm);
if (!pLS) {
- pLS = &myIndex(myIndex.Add(aSTIm, BOPCol_ListOfShape()));
+ pLS = &myIndex(myIndex.Add(aSTIm, TopTools_ListOfShape()));
}
pLS->Append(aS);
//
const TopTools_ListOfShape& aLSOr = myIndex(i);
//
Standard_Integer iType = BOPTools_AlgoTools::Dimension(aSP);
- BOPCol_MapIteratorOfMapOfInteger aItM(aMDims);
+ TColStd_MapIteratorOfMapOfInteger aItM(aMDims);
for (; aItM.More(); aItM.Next()) {
Standard_Integer k = aItM.Value();
if (k >= iType) {
TopExp_Explorer aExp(aSP, TypeToExplore(k));
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aSS = aExp.Current();
- BOPCol_ListOfShape* pLSSOr = myIndex.ChangeSeek(aSS);
+ TopTools_ListOfShape* pLSSOr = myIndex.ChangeSeek(aSS);
if (!pLSSOr) {
myIndex.Add(aSS, aLSOr);
continue;
}
// add ancestors of the shape to the ancestors of the sub-shape
- BOPCol_ListIteratorOfListOfShape aItLS(aLSOr);
+ TopTools_ListIteratorOfListOfShape aItLS(aLSOr);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSOr = aItLS.Value();
// provide uniqueness of the ancestors
- BOPCol_ListIteratorOfListOfShape aItLSS(*pLSSOr);
+ TopTools_ListIteratorOfListOfShape aItLSS(*pLSSOr);
for (; aItLSS.More(); aItLSS.Next()) {
if (aSOr.IsSame(aItLSS.Value())) {
break;
//function : AddToResult
//purpose :
//=======================================================================
-void BOPAlgo_CellsBuilder::AddToResult(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid,
+void BOPAlgo_CellsBuilder::AddToResult(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid,
const Standard_Integer theMaterial,
const Standard_Boolean theUpdate)
{
// find parts
- BOPCol_ListOfShape aParts;
+ TopTools_ListOfShape aParts;
FindParts(theLSToTake, theLSToAvoid, aParts);
if (aParts.IsEmpty()) {
return;
}
//
// collect result parts to avoid multiple adding of the same parts
- BOPCol_MapOfShape aResParts;
+ TopTools_MapOfShape aResParts;
TopoDS_Iterator aIt(myShape);
for (; aIt.More(); aIt.Next()) {
aResParts.Add(aIt.Value());
//
Standard_Boolean bChanged = Standard_False;
// add parts to result
- BOPCol_ListIteratorOfListOfShape aItLP(aParts);
+ TopTools_ListIteratorOfListOfShape aItLP(aParts);
for (; aItLP.More(); aItLP.Next()) {
const TopoDS_Shape& aPart = aItLP.Value();
// provide uniqueness of the parts
//
// update the material
if (theMaterial != 0) {
- BOPCol_ListOfShape aLSP;
+ TopTools_ListOfShape aLSP;
aItLP.Initialize(aParts);
for (; aItLP.More(); aItLP.Next()) {
const TopoDS_Shape& aPart = aItLP.Value();
} // for (; aIt.More(); aIt.Next()) {
//
if (aLSP.Extent()) {
- BOPCol_ListOfShape* pLS = myMaterials.ChangeSeek(theMaterial);
+ TopTools_ListOfShape* pLS = myMaterials.ChangeSeek(theMaterial);
if (!pLS) {
- pLS = myMaterials.Bound(theMaterial, BOPCol_ListOfShape());
+ pLS = myMaterials.Bound(theMaterial, TopTools_ListOfShape());
}
pLS->Append(aLSP);
} // if (aLSP.Extent()) {
myShape = myAllParts;
//
if (theMaterial != 0) {
- BOPCol_ListOfShape* pLSM = myMaterials.Bound(theMaterial, BOPCol_ListOfShape());
+ TopTools_ListOfShape* pLSM = myMaterials.Bound(theMaterial, TopTools_ListOfShape());
//
TopoDS_Iterator aIt(myAllParts);
for (; aIt.More(); aIt.Next()) {
//function : RemoveFromResult
//purpose :
//=======================================================================
-void BOPAlgo_CellsBuilder::RemoveFromResult(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid)
+void BOPAlgo_CellsBuilder::RemoveFromResult(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid)
{
// find parts
- BOPCol_ListOfShape aParts;
+ TopTools_ListOfShape aParts;
FindParts(theLSToTake, theLSToAvoid, aParts);
if (aParts.IsEmpty()) {
return;
}
//
// collect parts into the map and remove parts from materials
- BOPCol_MapOfShape aPartsToRemove;
- BOPCol_ListIteratorOfListOfShape aItP(aParts);
+ TopTools_MapOfShape aPartsToRemove;
+ TopTools_ListIteratorOfListOfShape aItP(aParts);
for (; aItP.More(); aItP.Next()) {
const TopoDS_Shape& aPart = aItP.Value();
aPartsToRemove.Add(aPart);
//
const Standard_Integer* pMaterial = myShapeMaterial.Seek(aPart);
if (pMaterial) {
- BOPCol_ListOfShape* pLSM = myMaterials.ChangeSeek(*pMaterial);
+ TopTools_ListOfShape* pLSM = myMaterials.ChangeSeek(*pMaterial);
if (pLSM) {
- BOPCol_ListIteratorOfListOfShape aItM(*pLSM);
+ TopTools_ListIteratorOfListOfShape aItM(*pLSM);
for (; aItM.More(); aItM.Next()) {
if (aPart.IsSame(aItM.Value())) {
pLSM->Remove(aItM);
Standard_Boolean bChanged = Standard_False;
// try to remove the internal boundaries between the
// shapes of the same material
- BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape aItM(myMaterials);
- BOPCol_ListOfShape aLSUnify[2];
+ TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape aItM(myMaterials);
+ TopTools_ListOfShape aLSUnify[2];
TopTools_MapOfShape aKeepMap[2];
for (; aItM.More(); aItM.Next()) {
Standard_Integer iMaterial = aItM.Key();
- BOPCol_ListOfShape& aLS = aItM.ChangeValue();
+ TopTools_ListOfShape& aLS = aItM.ChangeValue();
//
if (aLS.IsEmpty()) {
continue;
}
//
// check the shapes of the same material to be of the same type
- BOPCol_ListIteratorOfListOfShape aItLS(aLS);
+ TopTools_ListIteratorOfListOfShape aItLS(aLS);
TopAbs_ShapeEnum aType = aItLS.Value().ShapeType();
for (aItLS.Next(); aItLS.More(); aItLS.Next()) {
if (aType != aItLS.Value().ShapeType()) {
Standard_Integer iType = (aType == TopAbs_EDGE ? 0 : 1);
CollectMaterialBoundaries(aLS, aKeepMap[iType]);
// save shapes to unify later
- BOPCol_ListOfShape aCopy(aLS);
+ TopTools_ListOfShape aCopy(aLS);
aLSUnify[iType].Append(aCopy);
continue;
}
{
// aType is Solid;
// remove internal faces between solids of the same material just now
- BOPCol_ListOfShape aLSNew;
+ TopTools_ListOfShape aLSNew;
if (RemoveInternals(aLS, aLSNew))
{
bChanged = Standard_True;
{
if (aLSUnify[iType].IsEmpty())
continue;
- BOPCol_ListOfShape aLSN;
+ TopTools_ListOfShape aLSN;
if (RemoveInternals(aLSUnify[iType], aLSN, aKeepMap[iType]))
bChanged = Standard_True;
// add shapes to result ([unified] edges or faces)
- for (BOPCol_ListIteratorOfListOfShape aItLS(aLSN); aItLS.More(); aItLS.Next()) {
+ for (TopTools_ListIteratorOfListOfShape aItLS(aLSN); aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aS = aItLS.Value();
aBB.Add(aResult, aS);
}
//function : FindPart
//purpose :
//=======================================================================
-void BOPAlgo_CellsBuilder::FindParts(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid,
- BOPCol_ListOfShape& theParts)
+void BOPAlgo_CellsBuilder::FindParts(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid,
+ TopTools_ListOfShape& theParts)
{
if (theLSToTake.IsEmpty()) {
return;
}
//
// map shapes to avoid
- BOPCol_MapOfShape aMSToAvoid;
- BOPCol_ListIteratorOfListOfShape aItArgs(theLSToAvoid);
+ TopTools_MapOfShape aMSToAvoid;
+ TopTools_ListIteratorOfListOfShape aItArgs(theLSToAvoid);
for (; aItArgs.More(); aItArgs.Next()) {
const TopoDS_Shape& aS = aItArgs.Value();
aMSToAvoid.Add(aS);
}
//
// map shapes to be taken
- BOPCol_MapOfShape aMSToTake;
+ TopTools_MapOfShape aMSToTake;
aItArgs.Initialize(theLSToTake);
for (; aItArgs.More(); aItArgs.Next()) {
const TopoDS_Shape& aS = aItArgs.Value();
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aST = aExp.Current();
// get split parts of the shape
- BOPCol_ListOfShape aLSTIm;
+ TopTools_ListOfShape aLSTIm;
if (!myImages.IsBound(aST)) {
aLSTIm.Append(aST);
} else {
aLSTIm = myImages.Find(aST);
}
//
- BOPCol_ListIteratorOfListOfShape aItIm(aLSTIm);
+ TopTools_ListIteratorOfListOfShape aItIm(aLSTIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aPart = aItIm.Value();
//
}
//
// get input shapes in which the split part is contained
- const BOPCol_ListOfShape& aLS = myIndex.FindFromKey(aPart);
+ const TopTools_ListOfShape& aLS = myIndex.FindFromKey(aPart);
if (aLS.Extent() < aNbS) {
continue;
}
//
// check that input shapes containing the part should not be avoided
- BOPCol_MapOfShape aMS;
+ TopTools_MapOfShape aMS;
aItArgs.Initialize(aLS);
for (; aItArgs.More(); aItArgs.Next()) {
const TopoDS_Shape& aS = aItArgs.Value();
aBB.MakeCompound(aResult);
//
// basic elements of type EDGE, FACE and SOLID added into result
- BOPCol_ListOfShape aLS[3];
+ TopTools_ListOfShape aLS[3];
//
TopoDS_Iterator aIt(myShape);
for (; aIt.More(); aIt.Next()) {
//
TopoDS_Compound aC;
aBB.MakeCompound(aC);
- BOPCol_ListIteratorOfListOfShape aItLS(aLS[i]);
+ TopTools_ListIteratorOfListOfShape aItLS(aLS[i]);
for (; aItLS.More(); aItLS.Next()) {
aBB.Add(aC, aItLS.Value());
}
//function : RemoveInternals
//purpose :
//=======================================================================
-Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const BOPCol_ListOfShape& theLS,
- BOPCol_ListOfShape& theLSNew,
+Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShape& theLS,
+ TopTools_ListOfShape& theLSNew,
const TopTools_MapOfShape& theMapKeepBnd)
{
Standard_Boolean bRemoved = Standard_False;
BOPTools_AlgoTools::MakeContainer
((aType == TopAbs_FACE) ? TopAbs_SHELL : TopAbs_WIRE, aShape);
//
- for (BOPCol_ListIteratorOfListOfShape aIt(theLS); aIt.More(); aIt.Next()) {
+ for (TopTools_ListIteratorOfListOfShape aIt(theLS); aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
aBB.Add(aShape, aS);
}
}
//
// fill map of modified shapes
- BOPCol_IndexedMapOfShape aMG;
+ TopTools_IndexedMapOfShape aMG;
Standard_Integer i, aNb;
//
- BOPTools::MapShapes(aShape, TopAbs_VERTEX, aMG);
- BOPTools::MapShapes(aShape, TopAbs_EDGE, aMG);
- BOPTools::MapShapes(aShape, TopAbs_FACE, aMG);
+ TopExp::MapShapes(aShape, TopAbs_VERTEX, aMG);
+ TopExp::MapShapes(aShape, TopAbs_EDGE, aMG);
+ TopExp::MapShapes(aShape, TopAbs_FACE, aMG);
//
aNb = aMG.Extent();
for (i = 1; i <= aNb; ++i) {
TopoDS_Compound aSolids;
aBB.MakeCompound(aSolids);
//
- BOPCol_ListIteratorOfListOfShape aItLS(theLS);
+ TopTools_ListIteratorOfListOfShape aItLS(theLS);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSol = aItLS.Value();
aBB.Add(aSolids, aSol);
//
// Make connexity blocks of solids to create from each isolated block one solid.
// It will allow attaching internal entities of the solids to new solid.
- BOPCol_ListOfShape aLCB;
+ TopTools_ListOfShape aLCB;
BOPTools_AlgoTools::MakeConnexityBlocks(aSolids, TopAbs_FACE, TopAbs_SOLID, aLCB);
//
// for each block remove internal faces
- BOPCol_ListIteratorOfListOfShape aItLCB(aLCB);
+ TopTools_ListIteratorOfListOfShape aItLCB(aLCB);
for (; aItLCB.More(); aItLCB.Next()) {
const TopoDS_Shape& aCB = aItLCB.Value();
//
// Map faces and solids to find boundary faces that can be removed
- BOPCol_IndexedDataMapOfShapeListOfShape aDMFS;
+ TopTools_IndexedDataMapOfShapeListOfShape aDMFS;
// internal entities
- BOPCol_ListOfShape aLSInt;
+ TopTools_ListOfShape aLSInt;
//
TopoDS_Iterator aItS(aCB);
for (; aItS.More(); aItS.Next()) {
TopoDS_Iterator aItF(aSI);
for (; aItF.More(); aItF.Next()) {
const TopoDS_Shape& aF = aItF.Value();
- BOPCol_ListOfShape *pLSols = aDMFS.ChangeSeek(aF);
+ TopTools_ListOfShape *pLSols = aDMFS.ChangeSeek(aF);
if (!pLSols) {
- pLSols = &aDMFS(aDMFS.Add(aF, BOPCol_ListOfShape()));
+ pLSols = &aDMFS(aDMFS.Add(aF, TopTools_ListOfShape()));
}
pLSols->Append(aSol);
}
}
//
// to build unified solid, select only faces attached to only one solid
- BOPCol_ListOfShape aLFUnique;
+ TopTools_ListOfShape aLFUnique;
Standard_Integer i, aNb = aDMFS.Extent();
for (i = 1; i <= aNb; ++i) {
if (aDMFS(i).Extent() == 1) {
{
TopoDS_Compound aUniqeFaces;
aBB.MakeCompound(aUniqeFaces);
- BOPCol_ListIteratorOfListOfShape aItLFUniqe(aLFUnique);
+ TopTools_ListIteratorOfListOfShape aItLFUniqe(aLFUnique);
for (; aItLFUniqe.More(); aItLFUniqe.Next()) {
aBB.Add(aUniqeFaces, aItLFUniqe.Value());
}
//
// put all internal parts into new solid
aSNew.Free(Standard_True);
- BOPCol_ListIteratorOfListOfShape aItLSI(aLSInt);
+ TopTools_ListIteratorOfListOfShape aItLSI(aLSInt);
for (; aItLSI.More(); aItLSI.Next()) {
aBB.Add(aSNew, aItLSI.Value());
}
}
//
if (bHasImage) {
- const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
- BOPCol_ListIteratorOfListOfShape aIt(aLSp);
+ const TopTools_ListOfShape& aLSp = myImages.Find(theS);
+ TopTools_ListIteratorOfListOfShape aIt(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSp = aIt.Value();
const TopoDS_Shape& aSpR = myShapesSD.IsBound(aSp) ?
return myHistShapes;
}
//
- BOPCol_MapOfShape aMFence;
- const BOPCol_ListOfShape& aLSp = myImages.Find(theS);
- BOPCol_ListIteratorOfListOfShape aIt(aLSp);
+ TopTools_MapOfShape aMFence;
+ const TopTools_ListOfShape& aLSp = myImages.Find(theS);
+ TopTools_ListIteratorOfListOfShape aIt(aLSp);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape aSp = aIt.Value();
const TopoDS_Shape& aSpR = myShapesSD.IsBound(aSp) ?
return;
}
//
- BOPCol_ListOfShape aLCB;
+ TopTools_ListOfShape aLCB;
BOPTools_AlgoTools::MakeConnexityBlocks(theSC, aConnexityType, aPartType, aLCB);
if (aLCB.IsEmpty()) {
return;
//
BRep_Builder aBB;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aItCB;
+ TopTools_ListIteratorOfListOfShape aItCB;
//
aItCB.Initialize(aLCB);
for (; aItCB.More(); aItCB.Next()) {
//function : CollectMaterialBoundaries
//purpose : Add to theMapKeepBnd the boundary shapes of the area defined by shapes from the list
//=======================================================================
-static void CollectMaterialBoundaries(const BOPCol_ListOfShape& theLS,
+static void CollectMaterialBoundaries(const TopTools_ListOfShape& theLS,
TopTools_MapOfShape& theMapKeepBnd)
{
TopAbs_ShapeEnum aType = theLS.First().ShapeType();
TopAbs_ShapeEnum aTypeSubsh = (aType == TopAbs_FACE ? TopAbs_EDGE : TopAbs_VERTEX);
TopTools_IndexedDataMapOfShapeListOfShape aMapSubSh;
- BOPCol_ListIteratorOfListOfShape anIt(theLS);
+ TopTools_ListIteratorOfListOfShape anIt(theLS);
for (; anIt.More(); anIt.Next())
{
const TopoDS_Shape& aS = anIt.Value();
#include <TopTools_MapOfShape.hxx>
#include <BOPAlgo_Builder.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_DataMapOfIntegerListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapOfIntegerListOfShape.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
//!
//! The algorithm is based on the General Fuse algorithm (GFA). The result of
//! Examples:<br>
//! 1. API<br>
//! BOPAlgo_CellsBuilder aCBuilder;<br>
-//! BOPCol_ListOfShape aLS = ...; // arguments<br>
+//! TopTools_ListOfShape aLS = ...; // arguments<br>
//! /* parallel or single mode (the default value is FALSE)*/<br>
//! Standard_Boolean bRunParallel = Standard_False;<br>
//! /* fuzzy option (default value is 0)*/<br>
//! /* all split parts */<br>
//! const TopoDS_Shape& aRes = aCBuilder.GetAllParts();<br>
//! //<br>
-//! BOPCol_ListOfShape aLSToTake = ...; // parts of these arguments will be taken into result<br>
-//! BOPCol_ListOfShape aLSToAvoid = ...; // parts of these arguments will not be taken into result<br>
+//! TopTools_ListOfShape aLSToTake = ...; // parts of these arguments will be taken into result<br>
+//! TopTools_ListOfShape aLSToAvoid = ...; // parts of these arguments will not be taken into result<br>
//! //<br>
//! /* defines the material common for the cells, i.e.
//! the boundaries between cells with the same material
//! cells with the same material will be removed. Default value is 0.<br>
//! Thus, to remove any boundary the value of this variable should not be equal to 0.<br>
//! <theUpdate> parameter defines whether to remove boundaries now or not.
- Standard_EXPORT void AddToResult(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid,
+ Standard_EXPORT void AddToResult(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid,
const Standard_Integer theMaterial = 0,
const Standard_Boolean theUpdate = Standard_False);
//! <theLSToAvoid> defines the arguments which parts should not be removed from result.<br>
//! To be removed from the result the part must be IN for all shapes from the list
//! <theLSToTake> and must be OUT of all shapes from the list <theLSToAvoid>.
- Standard_EXPORT void RemoveFromResult(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid);
+ Standard_EXPORT void RemoveFromResult(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid);
//! Remove all parts from result.
Standard_EXPORT void RemoveAllFromResult();
Standard_EXPORT void IndexParts();
//! Looking for the parts defined by two lists.
- Standard_EXPORT void FindParts(const BOPCol_ListOfShape& theLSToTake,
- const BOPCol_ListOfShape& theLSToAvoid,
- BOPCol_ListOfShape& theParts);
+ Standard_EXPORT void FindParts(const TopTools_ListOfShape& theLSToTake,
+ const TopTools_ListOfShape& theLSToAvoid,
+ TopTools_ListOfShape& theParts);
//! Removes internal boundaries between cells with the same material.<br>
//! Returns TRUE if any internal boundaries have been removed.
- Standard_EXPORT Standard_Boolean RemoveInternals(const BOPCol_ListOfShape& theLS,
- BOPCol_ListOfShape& theLSNew,
+ Standard_EXPORT Standard_Boolean RemoveInternals(const TopTools_ListOfShape& theLS,
+ TopTools_ListOfShape& theLSNew,
const TopTools_MapOfShape& theMapKeepBnd = TopTools_MapOfShape());
// fields
TopoDS_Shape myAllParts;
- BOPCol_IndexedDataMapOfShapeListOfShape myIndex;
- BOPCol_DataMapOfIntegerListOfShape myMaterials;
- BOPCol_DataMapOfShapeInteger myShapeMaterial;
- BOPCol_DataMapOfShapeShape myMapModified;
+ TopTools_IndexedDataMapOfShapeListOfShape myIndex;
+ TopTools_DataMapOfIntegerListOfShape myMaterials;
+ TopTools_DataMapOfShapeInteger myShapeMaterial;
+ TopTools_DataMapOfShapeShape myMapModified;
};
#endif //_BOPAlgo_CellsBuilder_HeaderFile
return myShape2;
}
-const BOPCol_ListOfShape& BOPAlgo_CheckResult::GetFaultyShapes1() const
+const TopTools_ListOfShape& BOPAlgo_CheckResult::GetFaultyShapes1() const
{
return myFaulty1;
}
-const BOPCol_ListOfShape& BOPAlgo_CheckResult::GetFaultyShapes2() const
+const TopTools_ListOfShape& BOPAlgo_CheckResult::GetFaultyShapes2() const
{
return myFaulty2;
}
#include <TopoDS_Shape.hxx>
#include <BOPAlgo_CheckStatus.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <Standard_Real.hxx>
class TopoDS_Shape;
Standard_EXPORT const TopoDS_Shape& GetShape2() const;
//! returns list of faulty shapes for object
- Standard_EXPORT const BOPCol_ListOfShape& GetFaultyShapes1() const;
+ Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes1() const;
//! returns list of faulty shapes for tool
- Standard_EXPORT const BOPCol_ListOfShape& GetFaultyShapes2() const;
+ Standard_EXPORT const TopTools_ListOfShape& GetFaultyShapes2() const;
//! set status of faulty
Standard_EXPORT void SetCheckStatus (const BOPAlgo_CheckStatus TheStatus);
TopoDS_Shape myShape1;
TopoDS_Shape myShape2;
BOPAlgo_CheckStatus myStatus;
- BOPCol_ListOfShape myFaulty1;
- BOPCol_ListOfShape myFaulty2;
+ TopTools_ListOfShape myFaulty1;
+ TopTools_ListOfShape myFaulty2;
Standard_Real myMaxDist1;
Standard_Real myMaxDist2;
Standard_Real myMaxPar1;
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
#include <BOPDS_VectorOfInterfVV.hxx>
-#include <BOPTools.hxx>
+#include <BRep_Tool.hxx>
+#include <gp_Torus.hxx>
+#include <TopExp.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_Tools.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
#include <TopTools_ListOfShape.hxx>
-#include <BRep_Tool.hxx>
-#include <gp_Torus.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//class : BOPAlgo_FaceSelfIntersect
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_FaceSelfIntersect> BOPAlgo_VectorOfFaceSelfIntersect;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_FaceSelfIntersect,
BOPAlgo_VectorOfFaceSelfIntersect> BOPAlgo_FaceSelfIntersectFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_FaceSelfIntersectFunctor,
BOPAlgo_VectorOfFaceSelfIntersect> BOPAlgo_FaceSelfIntersectCnt;
// 0
BOPDS_VectorOfInterfVV& aVVs=myDS->InterfVV();
- aNb=aVVs.Extent();
+ aNb=aVVs.Length();
for (i=0; i!=aNb; ++i) {
const BOPDS_InterfVV& aVV=aVVs(i);
aVV.Indices(n1, n2);
//
// 1
BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE();
- aNb=aVEs.Extent();
+ aNb=aVEs.Length();
for (i=0; i!=aNb; ++i) {
const BOPDS_InterfVE& aVE=aVEs(i);
aVE.Indices(n1, n2);
//
// 2
BOPDS_VectorOfInterfEE& aEEs=myDS->InterfEE();
- aNb=aEEs.Extent();
+ aNb=aEEs.Length();
for (i=0; i!=aNb; ++i) {
const BOPDS_InterfEE& aEE=aEEs(i);
aEE.Indices(n1, n2);
//
// 3
BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
- aNb=aVFs.Extent();
+ aNb=aVFs.Length();
for (i=0; i!=aNb; ++i) {
const BOPDS_InterfVF& aVF=aVFs(i);
aVF.Indices(n1, n2);
//
// 4
BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
- aNb=aEFs.Extent();
+ aNb=aEFs.Length();
for (i=0; i!=aNb; ++i) {
const BOPDS_InterfEF& aEF=aEFs(i);
if (aEF.CommonPart().Type()==TopAbs_SHAPE) {
//
// 5
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
- aNb=aFFs.Extent();
+ aNb=aFFs.Length();
for (i=0; i!=aNb; ++i) {
Standard_Boolean bTangentFaces, bFlag;
Standard_Integer aNbC, aNbP, j, iFound;
aFF.Indices(n1, n2);
//
bTangentFaces=aFF.TangentFaces();
- aNbP=aFF.Points().Extent();
+ aNbP=aFF.Points().Length();
const BOPDS_VectorOfCurve& aVC=aFF.Curves();
- aNbC=aVC.Extent();
+ aNbC=aVC.Length();
if (!aNbP && !aNbC && !bTangentFaces) {
continue;
}
//
// 6
BOPDS_VectorOfInterfVZ& aVZs=myDS->InterfVZ();
- aNb=aVZs.Extent();
+ aNb=aVZs.Length();
for (i=0; i!=aNb; ++i) {
//
const BOPDS_InterfVZ& aVZ=aVZs(i);
//
// 7
BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
- aNb=aEZs.Extent();
+ aNb=aEZs.Length();
for (i=0; i!=aNb; ++i) {
//
const BOPDS_InterfEZ& aEZ=aEZs(i);
//
// 8
BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
- aNb=aFZs.Extent();
+ aNb=aFZs.Length();
for (i=0; i!=aNb; ++i) {
//
const BOPDS_InterfFZ& aFZ=aFZs(i);
//
// 9
BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
- aNb=aZZs.Extent();
+ aNb=aZZs.Length();
for (i=0; i!=aNb; ++i) {
//
const BOPDS_InterfZZ& aZZ=aZZs(i);
Standard_Real aTolF = BRep_Tool::Tolerance(aF);
- BOPAlgo_FaceSelfIntersect& aFaceSelfIntersect = aVFace.Append1();
+ BOPAlgo_FaceSelfIntersect& aFaceSelfIntersect = aVFace.Appended();
//
aFaceSelfIntersect.SetIndex(i);
aFaceSelfIntersect.SetFace(aF);
aFaceSelfIntersect.SetProgressIndicator(myProgressIndicator);
}
- Standard_Integer aNbFace = aVFace.Extent();
+ Standard_Integer aNbFace = aVFace.Length();
//======================================================
BOPAlgo_FaceSelfIntersectCnt::Perform(myRunParallel, aVFace);
//======================================================
#include <BOPDS_Interf.hxx>
#include <BOPDS_IteratorSI.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <IntTools_Context.hxx>
#include <gp_Pnt.hxx>
-#include <TopoDS_Vertex.hxx>
+
+#include <NCollection_Vector.hxx>
#include <TopAbs_State.hxx>
+#include <TopoDS_Vertex.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Solid.hxx>
Handle(IntTools_Context) myContext;
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_VertexSolid> BOPAlgo_VectorOfVertexSolid;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_VertexSolid,
BOPAlgo_VectorOfVertexSolid,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_VertexSolidFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_VertexSolidFunctor,
BOPAlgo_VectorOfVertexSolid,
Handle(IntTools_Context)> BOPAlgo_VertexSolidCnt;
BOPDS_DS* myDS;
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_ShapeSolid> BOPAlgo_VectorOfShapeSolid;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_ShapeSolid,
BOPAlgo_VectorOfShapeSolid> BOPAlgo_ShapeSolidFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_ShapeSolidFunctor,
BOPAlgo_VectorOfShapeSolid> BOPAlgo_ShapeSolidCnt;
//
};
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_SolidSolid> BOPAlgo_VectorOfSolidSolid;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_SolidSolid,
BOPAlgo_VectorOfSolidSolid> BOPAlgo_SolidSolidFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_SolidSolidFunctor,
BOPAlgo_VectorOfSolidSolid> BOPAlgo_SolidSolidCnt;
//
const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&myDS->Shape(nVSD));
const TopoDS_Solid& aZ=*((TopoDS_Solid*)&myDS->Shape(nZ));
//
- BOPAlgo_VertexSolid& aVertexSolid=aVVS.Append1();
+ BOPAlgo_VertexSolid& aVertexSolid=aVVS.Appended();
aVertexSolid.SetIndices(nV, nZ);
aVertexSolid.SetVertex(aV);
aVertexSolid.SetSolid(aZ);
}
//
- aNbVVS=aVVS.Extent();
+ aNbVVS=aVVS.Length();
//=============================================================
BOPAlgo_VertexSolidCnt::Perform(myRunParallel, aVVS, myContext);
//=============================================================
if (aState==TopAbs_IN) {
aVertexSolid.Indices(nV, nZ);
//
- BOPDS_InterfVZ& aVZ=aVZs.Append1();
+ BOPDS_InterfVZ& aVZ=aVZs.Appended();
aVZ.SetIndices(nV, nZ);
//
myDS->AddInterf(nV, nZ);
for (; myIterator->More(); myIterator->Next()) {
myIterator->Value(nZ1, nZ);
//
- BOPAlgo_SolidSolid& aSolidSolid=aVSolidSolid.Append1();
+ BOPAlgo_SolidSolid& aSolidSolid=aVSolidSolid.Appended();
aSolidSolid.SetIndices(nZ1, nZ);
aSolidSolid.SetDS(myDS);
}
//
- aNbSolidSolid=aVSolidSolid.Extent();
+ aNbSolidSolid=aVSolidSolid.Length();
//======================================================
BOPAlgo_SolidSolidCnt::Perform(myRunParallel, aVSolidSolid);
//======================================================
if (bHasInterf) {
aSolidSolid.Indices(nZ1, nZ);
//
- BOPDS_InterfZZ& aZZ=aZZs.Append1();
+ BOPDS_InterfZZ& aZZ=aZZs.Appended();
aZZ.SetIndices(nZ1, nZ);
//
myDS->AddInterf(nZ1, nZ);
for (; myIterator->More(); myIterator->Next()) {
myIterator->Value(nS, nZ);
//
- BOPAlgo_ShapeSolid& aShapeSolid=aVShapeSolid.Append1();
+ BOPAlgo_ShapeSolid& aShapeSolid=aVShapeSolid.Appended();
aShapeSolid.SetIndices(nS, nZ);
aShapeSolid.SetDS(myDS);
}
//
- aNbShapeSolid=aVShapeSolid.Extent();
+ aNbShapeSolid=aVShapeSolid.Length();
//======================================================
BOPAlgo_ShapeSolidCnt::Perform(myRunParallel, aVShapeSolid);
//======================================================
aShapeSolid.Indices(nS, nZ);
//
if (aTS==TopAbs_EDGE) {
- BOPDS_InterfEZ& aEZ=aEZs.Append1();
+ BOPDS_InterfEZ& aEZ=aEZs.Appended();
aEZ.SetIndices(nS, nZ);
}
else {//if (aTS==TopAbs_FACE)
- BOPDS_InterfFZ& aFZ=aFZs.Append1();
+ BOPDS_InterfFZ& aFZ=aFZs.Appended();
aFZ.SetIndices(nS, nZ);
}
//
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Solid.hxx>
+#include <TopTools_ListOfShape.hxx>
static
void AddFace(const TopoDS_Shape& theF,
- BOPCol_ListOfShape& theLF);
+ TopTools_ListOfShape& theLF);
//=======================================================================
//function : CheckData
//to create the compound of them and use it as one argument
TopoDS_Compound anArgs;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_ListOfShape aLS;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TopTools_ListOfShape aLS;
//
aBB.MakeCompound(anArgs);
aIt.Initialize(myArguments);
return;
}
//
- BOPCol_MapOfShape aBoxFaces;
- BOPCol_ListOfShape aLSR;
+ TopTools_MapOfShape aBoxFaces;
+ TopTools_ListOfShape aLSR;
//
// 5. Create bounding box
MakeBox(aBoxFaces);
UserBreak();
//
Standard_Integer i, aNbShapes;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_MapOfShape aMFence;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TopTools_MapOfShape aMFence;
//
aNbShapes = myDS->NbSourceShapes();
for (i = 0; i < aNbShapes; ++i) {
//
const TopoDS_Shape& aF = aSI.Shape();
if (myImages.IsBound(aF)) {
- const BOPCol_ListOfShape& aLFIm = myImages.Find(aF);
+ const TopTools_ListOfShape& aLFIm = myImages.Find(aF);
aIt.Initialize(aLFIm);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aFIm = aIt.Value();
//function : MakeBox
//purpose :
//=======================================================================
-void BOPAlgo_MakerVolume::MakeBox(BOPCol_MapOfShape& theBoxFaces)
+void BOPAlgo_MakerVolume::MakeBox(TopTools_MapOfShape& theBoxFaces)
{
UserBreak();
//
//function : BuildSolids
//purpose :
//=======================================================================
-void BOPAlgo_MakerVolume::BuildSolids(BOPCol_ListOfShape& theLSR)
+void BOPAlgo_MakerVolume::BuildSolids(TopTools_ListOfShape& theLSR)
{
UserBreak();
//
//function : TreatResult
//purpose :
//=======================================================================
-void BOPAlgo_MakerVolume::RemoveBox(BOPCol_ListOfShape& theLSR,
- const BOPCol_MapOfShape& theBoxFaces)
+void BOPAlgo_MakerVolume::RemoveBox(TopTools_ListOfShape& theLSR,
+ const TopTools_MapOfShape& theBoxFaces)
{
UserBreak();
//
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
TopExp_Explorer aExp;
Standard_Boolean bFound;
//
//function : BuildShape
//purpose :
//=======================================================================
-void BOPAlgo_MakerVolume::BuildShape(const BOPCol_ListOfShape& theLSR)
+void BOPAlgo_MakerVolume::BuildShape(const TopTools_ListOfShape& theLSR)
{
if (theLSR.Extent() == 1) {
myShape = theLSR.First();
}
else {
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(theLSR);
for (; aIt.More(); aIt.Next()) {
//function : FillInternalShapes
//purpose :
//=======================================================================
-void BOPAlgo_MakerVolume::FillInternalShapes(const BOPCol_ListOfShape& theLSR)
+void BOPAlgo_MakerVolume::FillInternalShapes(const TopTools_ListOfShape& theLSR)
{
if (myAvoidInternalShapes) {
return;
TopAbs_State aState;
TopoDS_Iterator aItS;
BRep_Builder aBB;
- BOPCol_MapOfShape aMFence;
- BOPCol_IndexedMapOfShape aMSS;
- BOPCol_ListOfShape aLVE, aLSC, aLSIn;
- BOPCol_ListIteratorOfListOfShape aIt, aIt1;
+ TopTools_MapOfShape aMFence;
+ TopTools_IndexedMapOfShape aMSS;
+ TopTools_ListOfShape aLVE, aLSC, aLSIn;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
//
// 1. Collect shapes to process: vertices, edges, wires
- const BOPCol_ListOfShape& anArguments = myDS->Arguments();
+ const TopTools_ListOfShape& anArguments = myDS->Arguments();
aIt.Initialize(anArguments);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
aIt.Initialize(theLSR);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
- BOPTools::MapShapes(aS, TopAbs_EDGE, aMSS);
- BOPTools::MapShapes(aS, TopAbs_VERTEX, aMSS);
+ TopExp::MapShapes(aS, TopAbs_EDGE, aMSS);
+ TopExp::MapShapes(aS, TopAbs_VERTEX, aMSS);
}
//
aIt.Initialize(aLVE);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape &aLSp = myImages.Find(aS);
+ const TopTools_ListOfShape &aLSp = myImages.Find(aS);
aIt1.Initialize(aLSp);
for (; aIt1.More(); aIt1.Next()) {
const TopoDS_Shape& aSp = aIt1.Value();
//purpose :
//=======================================================================
void AddFace(const TopoDS_Shape& theF,
- BOPCol_ListOfShape& theLF)
+ TopTools_ListOfShape& theLF)
{
TopoDS_Shape aFF = theF;
aFF.Orientation(TopAbs_FORWARD);
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-
#include <Standard_Boolean.hxx>
+
+#include <BOPAlgo_Builder.hxx>
#include <Bnd_Box.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopoDS_Solid.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPAlgo_Builder.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
class TopoDS_Solid;
class BOPAlgo_PaveFiller;
virtual ~BOPAlgo_MakerVolume();
//! Empty contructor.
- BOPAlgo_MakerVolume(const BOPCol_BaseAllocator& theAllocator);
+ BOPAlgo_MakerVolume(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Clears the data.
virtual void Clear() Standard_OVERRIDE;
const TopoDS_Solid& Box() const;
//! Returns the processed faces <myFaces>.
- const BOPCol_ListOfShape& Faces() const;
+ const TopTools_ListOfShape& Faces() const;
//! Defines the preventing of addition of internal for solid parts into the result.
//! By default the internal parts are added into result.
Standard_EXPORT void CollectFaces();
//! Makes solid box.
- Standard_EXPORT void MakeBox (BOPCol_MapOfShape& theBoxFaces);
+ Standard_EXPORT void MakeBox (TopTools_MapOfShape& theBoxFaces);
//! Builds solids.
- Standard_EXPORT void BuildSolids (BOPCol_ListOfShape& theLSR);
+ Standard_EXPORT void BuildSolids (TopTools_ListOfShape& theLSR);
//! Removes the covering box.
- Standard_EXPORT void RemoveBox (BOPCol_ListOfShape& theLSR, const BOPCol_MapOfShape& theBoxFaces);
+ Standard_EXPORT void RemoveBox (TopTools_ListOfShape& theLSR, const TopTools_MapOfShape& theBoxFaces);
//! Fills the solids with internal shapes.
- Standard_EXPORT void FillInternalShapes (const BOPCol_ListOfShape& theLSR);
+ Standard_EXPORT void FillInternalShapes (const TopTools_ListOfShape& theLSR);
//! Builds the result.
- Standard_EXPORT void BuildShape (const BOPCol_ListOfShape& theLSR);
+ Standard_EXPORT void BuildShape (const TopTools_ListOfShape& theLSR);
Standard_Boolean myIntersect;
Bnd_Box myBBox;
TopoDS_Solid mySBox;
- BOPCol_ListOfShape myFaces;
+ TopTools_ListOfShape myFaces;
Standard_Boolean myAvoidInternalShapes;
private:
//function : Faces
//purpose :
//=======================================================================
-inline const BOPCol_ListOfShape& BOPAlgo_MakerVolume::Faces()const
+inline const TopTools_ListOfShape& BOPAlgo_MakerVolume::Faces()const
{
return myFaces;
}
#include <Message_Report.hxx>
#include <Standard_OStream.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
class Message_ProgressIndicator;
Standard_EXPORT BOPAlgo_Options();
//! Constructor with allocator
- Standard_EXPORT BOPAlgo_Options(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_Options(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Destructor
Standard_EXPORT virtual ~BOPAlgo_Options();
//! Returns allocator
- const BOPCol_BaseAllocator& Allocator() const
+ const Handle(NCollection_BaseAllocator)& Allocator() const
{
return myAllocator;
}
protected:
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
Handle(Message_Report) myReport;
Standard_Boolean myRunParallel;
Standard_Real myFuzzyValue;
//function : SetArguments
//purpose :
//=======================================================================
-void BOPAlgo_PaveFiller::SetArguments(const BOPCol_ListOfShape& theLS)
+void BOPAlgo_PaveFiller::SetArguments(const TopTools_ListOfShape& theLS)
{
myArguments=theLS;
}
//function : Arguments
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& BOPAlgo_PaveFiller::Arguments()const
+const TopTools_ListOfShape& BOPAlgo_PaveFiller::Arguments()const
{
return myArguments;
}
return;
}
//
- BOPCol_ListIteratorOfListOfShape aIt(myArguments);
+ TopTools_ListIteratorOfListOfShape aIt(myArguments);
for (; aIt.More(); aIt.Next()) {
if (aIt.Value().IsNull()) {
AddError (new BOPAlgo_AlertNullInputShapes);
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPDS_PDS.hxx>
-#include <BOPDS_PIterator.hxx>
-#include <BOPAlgo_SectionAttribute.hxx>
-#include <Standard_Real.hxx>
#include <BOPAlgo_Algo.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <Standard_Integer.hxx>
+#include <BOPAlgo_GlueEnum.hxx>
+#include <BOPAlgo_SectionAttribute.hxx>
+#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
+#include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_DataMapOfIntegerReal.hxx>
-#include <BOPCol_ListOfInteger.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
-#include <BOPCol_DataMapOfIntegerInteger.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
-#include <IntSurf_ListOfPntOn2S.hxx>
-#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
-#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_MapOfPair.hxx>
+#include <BOPDS_MapOfPaveBlock.hxx>
+#include <BOPDS_PDS.hxx>
+#include <BOPDS_PIterator.hxx>
#include <BOPDS_VectorOfCurve.hxx>
-#include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
-#include <BOPCol_IndexedDataMapOfShapeInteger.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPAlgo_GlueEnum.hxx>
+#include <IntSurf_ListOfPntOn2S.hxx>
#include <IntTools_ShrunkRange.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
+#include <Standard_Real.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_DataMapOfIntegerReal.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
class IntTools_Context;
class BOPDS_DS;
class BOPAlgo_SectionAttribute;
Standard_EXPORT virtual ~BOPAlgo_PaveFiller();
- Standard_EXPORT BOPAlgo_PaveFiller(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_PaveFiller(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT const BOPDS_DS& DS();
Standard_EXPORT const BOPDS_PIterator& Iterator();
- Standard_EXPORT void SetArguments (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
- Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
+ Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
Standard_EXPORT const Handle(IntTools_Context)& Context();
//! into common table of interferences or not.<br>
//! If some of the Pave Blocks are forming the Common Blocks, the splits
//! of the Pave Blocks will also form a Common Block.
- Standard_EXPORT void SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
+ Standard_EXPORT void SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
const Standard_Boolean theAddInterfs);
Standard_EXPORT virtual void PerformVF();
Standard_EXPORT void TreatVerticesEE();
- Standard_EXPORT void MakeSDVerticesFF(const BOPCol_DataMapOfIntegerListOfInteger& aDMVLV,
- BOPCol_DataMapOfIntegerInteger& theDMNewSD);
+ Standard_EXPORT void MakeSDVerticesFF(const TColStd_DataMapOfIntegerListOfInteger& aDMVLV,
+ TColStd_DataMapOfIntegerInteger& theDMNewSD);
Standard_EXPORT void MakeSplitEdges();
Standard_EXPORT void MakePCurves();
- Standard_EXPORT Standard_Integer MakeSDVertices(const BOPCol_ListOfInteger& theVertIndices,
+ Standard_EXPORT Standard_Integer MakeSDVertices(const TColStd_ListOfInteger& theVertIndices,
const Standard_Boolean theAddInterfs = 1);
Standard_EXPORT void ProcessDE();
//! Performs intersection of new vertices, obtained in E/E and E/F intersections
Standard_EXPORT void PerformNewVertices(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB,
- const BOPCol_BaseAllocator& theAllocator,
+ const Handle(NCollection_BaseAllocator)& theAllocator,
const Standard_Boolean theIsEEIntersection = Standard_True);
- Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, const BOPCol_MapOfInteger& theMIF);
+ Standard_EXPORT Standard_Boolean CheckFacePaves (const TopoDS_Vertex& theVnew, const TColStd_MapOfInteger& theMIF);
- Standard_EXPORT static Standard_Boolean CheckFacePaves (const Standard_Integer theN, const BOPCol_MapOfInteger& theMIFOn, const BOPCol_MapOfInteger& theMIFIn);
+ Standard_EXPORT static Standard_Boolean CheckFacePaves (const Standard_Integer theN, const TColStd_MapOfInteger& theMIFOn, const TColStd_MapOfInteger& theMIFIn);
- Standard_EXPORT Standard_Boolean IsExistingVertex (const gp_Pnt& theP, const Standard_Real theTol, const BOPCol_MapOfInteger& theMVOn) const;
+ Standard_EXPORT Standard_Boolean IsExistingVertex (const gp_Pnt& theP, const Standard_Real theTol, const TColStd_MapOfInteger& theMVOn) const;
//! Checks and puts paves from <theMVOn> on the curve <theNC>.
- Standard_EXPORT void PutPavesOnCurve (const BOPCol_MapOfInteger& theMVOn,
+ Standard_EXPORT void PutPavesOnCurve (const TColStd_MapOfInteger& theMVOn,
BOPDS_Curve& theNC,
const Standard_Integer nF1,
const Standard_Integer nF2,
- const BOPCol_MapOfInteger& theMI,
- const BOPCol_MapOfInteger& theMVEF,
- BOPCol_DataMapOfIntegerReal& theMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
+ const TColStd_MapOfInteger& theMI,
+ const TColStd_MapOfInteger& theMVEF,
+ TColStd_DataMapOfIntegerReal& theMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV);
Standard_EXPORT void FilterPavesOnCurves(const BOPDS_VectorOfCurve& theVNC);
//! 1 - checks only EE;
//! 2 - checks only EF;
//! other - checks both types of intersections.
- Standard_EXPORT Standard_Boolean ExtendedTolerance (const Standard_Integer nV, const BOPCol_MapOfInteger& aMI, Standard_Real& aTolVExt, const Standard_Integer aType = 0);
+ Standard_EXPORT Standard_Boolean ExtendedTolerance (const Standard_Integer nV, const TColStd_MapOfInteger& aMI, Standard_Real& aTolVExt, const Standard_Integer aType = 0);
Standard_EXPORT void PutBoundPaveOnCurve(const TopoDS_Face& theF1,
const TopoDS_Face& theF2,
BOPDS_Curve& theNC,
- BOPCol_ListOfInteger& theLBV);
+ TColStd_ListOfInteger& theLBV);
Standard_EXPORT Standard_Boolean IsExistingPaveBlock
(const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC,
const BOPDS_MapOfPaveBlock& theMPBCommon,
Handle(BOPDS_PaveBlock)& thePBOut, Standard_Real& theTolNew);
- Standard_EXPORT Standard_Boolean IsExistingPaveBlock (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, const BOPCol_ListOfInteger& theLSE);
+ Standard_EXPORT Standard_Boolean IsExistingPaveBlock (const Handle(BOPDS_PaveBlock)& thePB, const BOPDS_Curve& theNC, const TColStd_ListOfInteger& theLSE);
//! Treatment of section edges.
Standard_EXPORT void PostTreatFF (BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB,
BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDMExEdges,
- BOPCol_DataMapOfIntegerInteger& theDMNewSD,
- const BOPCol_IndexedMapOfShape& theMicroEdges,
- const BOPCol_IndexedMapOfShape& theVertsOnRejectedPB,
- const BOPCol_BaseAllocator& theAllocator);
+ TColStd_DataMapOfIntegerInteger& theDMNewSD,
+ const TopTools_IndexedMapOfShape& theMicroEdges,
+ const TopTools_IndexedMapOfShape& theVertsOnRejectedPB,
+ const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT void FindPaveBlocks (const Standard_Integer theV, const Standard_Integer theF, BOPDS_ListOfPaveBlock& theLPB);
//! Checks and puts paves created in EF intersections on the curve <theNC>.
Standard_EXPORT void PutEFPavesOnCurve (BOPDS_Curve& theNC,
- const BOPCol_MapOfInteger& theMI,
- const BOPCol_MapOfInteger& theMVEF,
- BOPCol_DataMapOfIntegerReal& theMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
+ const TColStd_MapOfInteger& theMI,
+ const TColStd_MapOfInteger& theMVEF,
+ TColStd_DataMapOfIntegerReal& theMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV);
//! Puts stick paves on the curve <theNC>
Standard_EXPORT void PutStickPavesOnCurve (const TopoDS_Face& aF1,
const TopoDS_Face& aF2,
- const BOPCol_MapOfInteger& theMI,
+ const TColStd_MapOfInteger& theMI,
BOPDS_Curve& theNC,
- const BOPCol_MapOfInteger& theMVStick,
- BOPCol_DataMapOfIntegerReal& theMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV);
+ const TColStd_MapOfInteger& theMVStick,
+ TColStd_DataMapOfIntegerReal& theMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV);
//! Collects indices of vertices created in all intersections between
//! two faces (<nF1> and <nF2>) to the map <theMVStick>.
//! Also, it collects indices of EF vertices to the <theMVEF> map
//! and indices of all subshapes of these two faces to the <theMI> map.
- Standard_EXPORT void GetStickVertices (const Standard_Integer nF1, const Standard_Integer nF2, BOPCol_MapOfInteger& theMVStick, BOPCol_MapOfInteger& theMVEF, BOPCol_MapOfInteger& theMI);
+ Standard_EXPORT void GetStickVertices (const Standard_Integer nF1, const Standard_Integer nF2, TColStd_MapOfInteger& theMVStick, TColStd_MapOfInteger& theMVEF, TColStd_MapOfInteger& theMI);
//! Collects index nF and indices of all subshapes of the shape with index <nF>
//! to the map <theMI>.
- Standard_EXPORT void GetFullShapeMap (const Standard_Integer nF, BOPCol_MapOfInteger& theMI);
+ Standard_EXPORT void GetFullShapeMap (const Standard_Integer nF, TColStd_MapOfInteger& theMI);
//! Removes indices of vertices that are already on the
//! curve <theNC> from the map <theMV>.
//! It is used in PutEFPavesOnCurve and PutStickPavesOnCurve methods.
- Standard_EXPORT void RemoveUsedVertices (BOPDS_Curve& theNC, BOPCol_MapOfInteger& theMV);
+ Standard_EXPORT void RemoveUsedVertices (BOPDS_Curve& theNC, TColStd_MapOfInteger& theMV);
//! Puts the pave nV on the curve theNC.
Standard_EXPORT void PutPaveOnCurve (const Standard_Integer nV,
const Standard_Real theTolR3D,
const BOPDS_Curve& theNC,
- const BOPCol_MapOfInteger& theMI,
- BOPCol_DataMapOfIntegerReal& theMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV,
+ const TColStd_MapOfInteger& theMI,
+ TColStd_DataMapOfIntegerReal& theMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV,
const Standard_Integer aType = 0);
//! Adds the existing edges from the map <theMPBOnIn> which interfere
//! with the vertices from <theMVB> map to the post treatment of section edges.
- Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, const BOPCol_DataMapOfIntegerListOfInteger& theDMBV, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, BOPCol_DataMapOfShapeInteger& theMVI, BOPDS_MapOfPaveBlock& theMPB);
+ Standard_EXPORT void ProcessExistingPaveBlocks (const Standard_Integer theInt, const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn, const TColStd_DataMapOfIntegerListOfInteger& theDMBV, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB, TopTools_DataMapOfShapeInteger& theMVI, BOPDS_MapOfPaveBlock& theMPB);
//! Replaces existing pave block <thePB> with new pave blocks <theLPB>.
//! Treatment of vertices that were created in EE intersections.
- Standard_EXPORT void TreatNewVertices(const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, BOPCol_IndexedDataMapOfShapeListOfShape& theImages);
+ Standard_EXPORT void TreatNewVertices(const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB, TopTools_IndexedDataMapOfShapeListOfShape& theImages);
//! Put paves on the curve <aBC> in case when <aBC>
//! Keeps data for post treatment
- Standard_EXPORT void PreparePostTreatFF (const Standard_Integer aInt, const Standard_Integer aCur, const Handle(BOPDS_PaveBlock)& aPB, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, BOPCol_DataMapOfShapeInteger& aMVI, BOPDS_ListOfPaveBlock& aLPB);
+ Standard_EXPORT void PreparePostTreatFF (const Standard_Integer aInt, const Standard_Integer aCur, const Handle(BOPDS_PaveBlock)& aPB, BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB, TopTools_DataMapOfShapeInteger& aMVI, BOPDS_ListOfPaveBlock& aLPB);
//! Updates the information about faces
- Standard_EXPORT void UpdateFaceInfo (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, const BOPCol_DataMapOfIntegerInteger& theDMV);
+ Standard_EXPORT void UpdateFaceInfo (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME, const TColStd_DataMapOfIntegerInteger& theDMV);
//! Updates tolerance of vertex with index <nV>
//! Returns TRUE if intersection happened.
Standard_EXPORT Standard_Boolean ForceInterfVE(const Standard_Integer nV,
Handle(BOPDS_PaveBlock)& aPB,
- BOPCol_MapOfInteger& theMEdges);
+ TColStd_MapOfInteger& theMEdges);
//! Updates tolerance of vertex with index <nV>
//! to make it interfere with face with index <nF>
//! Updates pave blocks which have the paves with indices contained
//! in the map <aDMNewSD>.
- Standard_EXPORT void UpdatePaveBlocks(const BOPCol_DataMapOfIntegerInteger& aDMNewSD);
+ Standard_EXPORT void UpdatePaveBlocks(const TColStd_DataMapOfIntegerInteger& aDMNewSD);
//! Updates tolerance vertex nV due to V/E interference.
//! It always creates new vertex if nV is from arguments.
Standard_EXPORT void UpdateEdgeTolerance(const Standard_Integer nE,
const Standard_Real aTolNew);
- Standard_EXPORT void RemovePaveBlocks(const BOPCol_MapOfInteger theEdges);
+ Standard_EXPORT void RemovePaveBlocks(const TColStd_MapOfInteger theEdges);
Standard_EXPORT void CorrectToleranceOfSE();
Standard_EXPORT void ForceInterfEE();
- BOPCol_ListOfShape myArguments;
+ TopTools_ListOfShape myArguments;
BOPDS_PDS myDS;
BOPDS_PIterator myIterator;
Handle(IntTools_Context) myContext;
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_DataMapOfIntegerInteger.hxx>
-#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
-#include <BOPCol_IndexedDataMapOfIntegerListOfInteger.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfInteger.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <IntTools_Context.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <Precision.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Compound.hxx>
+#include <TopTools_ListOfShape.hxx>
//=======================================================================
// function: PerformVV
//-----------------------------------------------------scope f
aAllocator=
NCollection_BaseAllocator::CommonBaseAllocator();
- BOPCol_IndexedDataMapOfIntegerListOfInteger aMILI(100, aAllocator);
- NCollection_List<BOPCol_ListOfInteger> aMBlocks(aAllocator);
+ NCollection_IndexedDataMap<Standard_Integer, TColStd_ListOfInteger>aMILI(100, aAllocator);
+ NCollection_List<TColStd_ListOfInteger> aMBlocks(aAllocator);
//
// 1. Map V/LV
for (; myIterator->More(); myIterator->Next()) {
BOPAlgo_Tools::MakeBlocks<Standard_Integer, TColStd_MapIntegerHasher>(aMILI, aMBlocks, aAllocator);
//
// 3. Make vertices
- NCollection_List<BOPCol_ListOfInteger>::Iterator aItB(aMBlocks);
+ NCollection_List<TColStd_ListOfInteger>::Iterator aItB(aMBlocks);
for (; aItB.More(); aItB.Next()) {
- const BOPCol_ListOfInteger& aLI = aItB.Value();
+ const TColStd_ListOfInteger& aLI = aItB.Value();
MakeSDVertices(aLI);
}
//
- BOPCol_DataMapIteratorOfDataMapOfIntegerInteger aItDMII;
+ TColStd_DataMapIteratorOfDataMapOfIntegerInteger aItDMII;
//
- BOPCol_DataMapOfIntegerInteger& aDMII=myDS->ShapesSD();
+ TColStd_DataMapOfIntegerInteger& aDMII=myDS->ShapesSD();
aItDMII.Initialize(aDMII);
for (; aItDMII.More(); aItDMII.Next()) {
n1=aItDMII.Key();
// purpose:
//=======================================================================
Standard_Integer BOPAlgo_PaveFiller::MakeSDVertices
- (const BOPCol_ListOfInteger& theVertIndices,
+ (const TColStd_ListOfInteger& theVertIndices,
const Standard_Boolean theAddInterfs)
{
TopoDS_Vertex aVSD, aVn;
Standard_Integer nSD = -1;
- BOPCol_ListIteratorOfListOfInteger aItLI(theVertIndices);
- BOPCol_ListOfShape aLV;
+ TColStd_ListIteratorOfListOfInteger aItLI(theVertIndices);
+ TopTools_ListOfShape aLV;
for (; aItLI.More(); aItLI.Next()) {
Standard_Integer nX = aItLI.Value(), nSD1;
if (myDS->HasShapeSD(nX, nSD1)) {
Standard_Integer iR1 = myDS->Rank(n1);
const TopoDS_Shape& aV1 = myDS->Shape(n1);
//
- BOPCol_ListIteratorOfListOfInteger aItLI2 = aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI2 = aItLI;
aItLI2.Next();
for (; aItLI2.More(); aItLI2.Next()) {
Standard_Integer n2 = aItLI2.Value();
//
if (theAddInterfs) {
myDS->AddInterf(n1, n2);
- BOPDS_InterfVV& aVV = aVVs.Append1();
+ BOPDS_InterfVV& aVV = aVVs.Appended();
//
aVV.SetIndices(n1, n2);
aVV.SetIndexNew(nV);
}
//
Standard_Boolean bFlag;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
bFlag=Standard_False;
aItLS.Initialize(myArguments);
Standard_Integer nV, nVx;
Standard_Real aTolV;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
//
BOPDS_ShapeInfo& aSIE=myDS->ChangeShapeInfo(nE);
- const BOPCol_ListOfInteger& aLI=aSIE.SubShapes();
+ const TColStd_ListOfInteger& aLI=aSIE.SubShapes();
//
if (myNonDestructive) {
bIsNewShape=myDS->IsNewShape(nE);
Standard_Integer aNbPBP;
//
BOPDS_VectorOfListOfPaveBlock& aPBP=myDS->ChangePaveBlocksPool();
- aNbPBP=aPBP.Extent();
+ aNbPBP=aPBP.Length();
if(!aNbPBP) {
return;
}
//purpose :
//=======================================================================
template <class InterfType>
- void UpdateIntfsWithSDVertices(BOPDS_PDS theDS, BOPCol_NCVector<InterfType>& theInterfs)
+ void UpdateIntfsWithSDVertices(BOPDS_PDS theDS, NCollection_Vector<InterfType>& theInterfs)
{
for (Standard_Integer i = 0; i < theInterfs.Length(); i++)
{
//
// Map of connections of interfering shapes
NCollection_IndexedDataMap<TopoDS_Shape,
- BOPCol_IndexedMapOfShape,
+ TopTools_IndexedMapOfShape,
TopTools_ShapeMapHasher> aMCSI;
BOPDS_MapOfCommonBlock aMCBFence;
//
//
// Analyze the shared vertices and common blocks
//
- BOPCol_MapOfInteger aMSubS;
- BOPCol_ListIteratorOfListOfInteger aItLI(aSI.SubShapes());
+ TColStd_MapOfInteger aMSubS;
+ TColStd_ListIteratorOfListOfInteger aItLI(aSI.SubShapes());
for (; aItLI.More(); aItLI.Next()) {
Standard_Integer nV = aItLI.Value();
myDS->HasShapeSD(nV, nV);
if (!aR.Contains(nV[k]) && !aMSubS.Contains(nV[k])) {
// Add connection
const TopoDS_Shape& aV = myDS->Shape(nV[k]);
- BOPCol_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aV);
+ TopTools_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aV);
if (!pMSOr) {
- pMSOr = &aMCSI(aMCSI.Add(aV, BOPCol_IndexedMapOfShape()));
+ pMSOr = &aMCSI(aMCSI.Add(aV, TopTools_IndexedMapOfShape()));
}
pMSOr->Add(aS);
}
if (aMCBFence.Add(aCB)) {
const BOPDS_ListOfPaveBlock& aLPBCB = aCB->PaveBlocks();
//
- BOPCol_ListOfInteger aLE;
+ TColStd_ListOfInteger aLE;
BOPDS_ListIteratorOfListOfPaveBlock aItCB(aLPBCB);
for (; aItCB.More(); aItCB.Next()) {
const Handle(BOPDS_PaveBlock)& aPBCB = aItCB.Value();
TopoDS_Compound aWC;
aBB.MakeCompound(aWC);
//
- BOPCol_ListIteratorOfListOfInteger aItLE(aLE);
+ TColStd_ListIteratorOfListOfInteger aItLE(aLE);
for (; aItLE.More(); aItLE.Next()) {
const TopoDS_Shape& aE1 = myDS->Shape(aItLE.Value());
aBB.Add(aWC, aE1);
const BOPDS_FaceInfo& aFI = myDS->FaceInfo(j);
//
for (Standard_Integer k = 0; k < 2; ++k) {
- const BOPCol_MapOfInteger& aMVF = !k ? aFI.VerticesIn() : aFI.VerticesSc();
- BOPCol_MapIteratorOfMapOfInteger aItM(aMVF);
+ const TColStd_MapOfInteger& aMVF = !k ? aFI.VerticesIn() : aFI.VerticesSc();
+ TColStd_MapIteratorOfMapOfInteger aItM(aMVF);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aV = myDS->Shape(aItM.Value());
// add connection
- BOPCol_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aV);
+ TopTools_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aV);
if (!pMSOr) {
- pMSOr = &aMCSI(aMCSI.Add(aV, BOPCol_IndexedMapOfShape()));
+ pMSOr = &aMCSI(aMCSI.Add(aV, TopTools_IndexedMapOfShape()));
}
pMSOr->Add(aS);
}
const Handle(BOPDS_PaveBlock)& aPB = aMPBF(iPB);
const TopoDS_Shape& aE = myDS->Shape(aPB->Edge());
// add connection
- BOPCol_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aE);
+ TopTools_IndexedMapOfShape* pMSOr = aMCSI.ChangeSeek(aE);
if (!pMSOr) {
- pMSOr = &aMCSI(aMCSI.Add(aE, BOPCol_IndexedMapOfShape()));
+ pMSOr = &aMCSI(aMCSI.Add(aE, TopTools_IndexedMapOfShape()));
}
pMSOr->Add(aS);
}
// Analyze connections
Standard_Integer aNbC = aMCSI.Extent();
for (j = 1; j <= aNbC; ++j) {
- const BOPCol_IndexedMapOfShape& aMCS = aMCSI(j);
+ const TopTools_IndexedMapOfShape& aMCS = aMCSI(j);
if (aMCS.Extent() > 1) {
// Add acquired self-interference warning:
// Several faces from one argument contain the same vertex or edge
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Interf.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
+#include <NCollection_Vector.hxx>
#include <Precision.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
Handle(BOPDS_PaveBlock) myPB;
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_VertexEdge> BOPAlgo_VectorOfVertexEdge;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_VertexEdge,
BOPAlgo_VectorOfVertexEdge,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_VertexEdgeFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_VertexEdgeFunctor,
BOPAlgo_VectorOfVertexEdge,
Handle(IntTools_Context)> BOPAlgo_VertexEdgeCnt;
continue;
}
//
- BOPCol_ListOfInteger* pLV = aMVEPairs.ChangeSeek(aPB);
+ TColStd_ListOfInteger* pLV = aMVEPairs.ChangeSeek(aPB);
if (!pLV)
- pLV = &aMVEPairs(aMVEPairs.Add(aPB, BOPCol_ListOfInteger()));
+ pLV = &aMVEPairs(aMVEPairs.Add(aPB, TColStd_ListOfInteger()));
pLV->Append(nV);
}
//
// for all vertices having the same SD vertex.
// It will also be used as a Fence map to avoid repeated
// intersection of the same SD vertex with edge
- NCollection_DataMap<BOPDS_Pair, BOPCol_ListOfInteger, BOPDS_PairMapHasher> aDMVSD;
+ NCollection_DataMap<BOPDS_Pair, TColStd_ListOfInteger, BOPDS_PairMapHasher> aDMVSD;
//
for (i = 1; i <= aNbVE; ++i) {
const Handle(BOPDS_PaveBlock)& aPB = theVEPairs.FindKey(i);
Standard_Integer nE = aPB->OriginalEdge();
//
- const BOPCol_ListOfInteger& aLV = theVEPairs(i);
- BOPCol_ListIteratorOfListOfInteger aItLV(aLV);
+ const TColStd_ListOfInteger& aLV = theVEPairs(i);
+ TColStd_ListIteratorOfListOfInteger aItLV(aLV);
for (; aItLV.More(); aItLV.Next()) {
Standard_Integer nV = aItLV.Value();
//
myDS->HasShapeSD(nV, nVSD);
//
BOPDS_Pair aPair(nVSD, nE);
- BOPCol_ListOfInteger* pLI = aDMVSD.ChangeSeek(aPair);
+ TColStd_ListOfInteger* pLI = aDMVSD.ChangeSeek(aPair);
if (pLI) {
// Already added
pLI->Append(nV);
continue;
}
// New pair
- pLI = aDMVSD.Bound(aPair, BOPCol_ListOfInteger());
+ pLI = aDMVSD.Bound(aPair, TColStd_ListOfInteger());
pLI->Append(nV);
//
const TopoDS_Vertex& aV = TopoDS::Vertex(myDS->Shape(nVSD));
const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(nE));
//
- BOPAlgo_VertexEdge& aVESolver = aVVE.Append1();
+ BOPAlgo_VertexEdge& aVESolver = aVVE.Appended();
aVESolver.SetIndices(nVSD, nE);
aVESolver.SetVertex(aV);
aVESolver.SetEdge(aE);
//=============================================================
//
// Keep the modified edges for further update
- BOPCol_MapOfInteger aMEdges;
+ TColStd_MapOfInteger aMEdges;
//
// Analyze intersections
- aNbVE = aVVE.Extent();
+ aNbVE = aVVE.Length();
for (i = 0; i < aNbVE; ++i) {
const BOPAlgo_VertexEdge& aVESolver = aVVE(i);
if (aVESolver.Flag() != 0) {
if (theAddInterfs) {
// Add interferences into DS
BOPDS_Pair aPair(nV, nE);
- const BOPCol_ListOfInteger& aLI = aDMVSD.Find(aPair);
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ const TColStd_ListOfInteger& aLI = aDMVSD.Find(aPair);
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next()) {
const Standard_Integer nVOld = aItLI.Value();
// 3. Create interference V/E
- BOPDS_InterfVE& aVE = aVEs.Append1();
+ BOPDS_InterfVE& aVE = aVEs.Appended();
aVE.SetIndices(nVOld, nE);
aVE.SetParameter(aT);
// 2. Add a pair in the whole table of interferences
//=======================================================================
static
void MakeNewCommonBlock(const BOPDS_ListOfPaveBlock& theLPB,
- const BOPCol_ListOfInteger& theLFaces,
+ const TColStd_ListOfInteger& theLFaces,
BOPDS_PDS& theDS)
{
// Make Common Block from the pave blocks in the list
// function: SplitPaveBlocks
// purpose:
//=======================================================================
-void BOPAlgo_PaveFiller::SplitPaveBlocks(const BOPCol_MapOfInteger& theMEdges,
+void BOPAlgo_PaveFiller::SplitPaveBlocks(const TColStd_MapOfInteger& theMEdges,
const Standard_Boolean theAddInterfs)
{
// Fence map to avoid unification of the same vertices twice
BOPDS_ListOfPaveBlock,
TColStd_MapTransientHasher> aMCBNewPB;
//
- BOPCol_MapIteratorOfMapOfInteger aItM(theMEdges);
+ TColStd_MapIteratorOfMapOfInteger aItM(theMEdges);
for (; aItM.More(); aItM.Next()) {
Standard_Integer nE = aItM.Value();
BOPDS_ListOfPaveBlock& aLPB = myDS->ChangePaveBlocks(nE);
BOPDS_Pair aPair;
aPair.SetIndices(nV1, nV2);
if (aMPairs.Add(aPair)) {
- BOPCol_ListOfInteger aLV;
+ TColStd_ListOfInteger aLV;
aLV.Append(nV1);
aLV.Append(nV2);
MakeSDVertices(aLV, theAddInterfs);
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfInterfEE.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Tools.hxx>
#include <NCollection_IncAllocator.hxx>
+#include <NCollection_Vector.hxx>
#include <Precision.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
};
//
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_EdgeEdge> BOPAlgo_VectorOfEdgeEdge;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_EdgeEdge,
BOPAlgo_VectorOfEdgeEdge> BOPAlgo_EdgeEdgeFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_EdgeEdgeFunctor,
BOPAlgo_VectorOfEdgeEdge> BOPAlgo_EdgeEdgeCnt;
//
BOPAlgo_VectorOfEdgeEdge aVEdgeEdge;
BOPDS_MapIteratorOfMapOfPaveBlock aItPB;
// keep modified edges for further update
- BOPCol_MapOfInteger aMEdges;
+ TColStd_MapOfInteger aMEdges;
//
aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
//-----------------------------------------------------scope f
bExpressCompute=((nV11==nV21 && nV12==nV22) ||
(nV12==nV21 && nV11==nV22));
//
- BOPAlgo_EdgeEdge& anEdgeEdge=aVEdgeEdge.Append1();
+ BOPAlgo_EdgeEdge& anEdgeEdge=aVEdgeEdge.Appended();
//
anEdgeEdge.UseQuickCoincidenceCheck(bExpressCompute);
//
}//for (; aIt1.More(); aIt1.Next()) {
}//for (; myIterator->More(); myIterator->Next()) {
//
- aNbEdgeEdge=aVEdgeEdge.Extent();
+ aNbEdgeEdge=aVEdgeEdge.Length();
//======================================================
BOPAlgo_EdgeEdgeCnt::Perform(myRunParallel, aVEdgeEdge);
//======================================================
}
}
if (bFlag) {
- BOPDS_InterfEE& aEE = aEEs.Append1();
+ BOPDS_InterfEE& aEE = aEEs.Appended();
aEE.SetIndices(nE1, nE2);
aEE.SetCommonPart(aCPart);
continue;
{
Standard_Integer nVS[2], iFound;
Standard_Real aTolVx, aD2, aDT2;
- BOPCol_MapOfInteger aMV;
+ TColStd_MapOfInteger aMV;
gp_Pnt aPnew, aPx;
//
iFound=0;
}
//
// 1
- BOPDS_InterfEE& aEE=aEEs.Append1();
- iX=aEEs.Extent()-1;
+ BOPDS_InterfEE& aEE=aEEs.Appended();
+ iX=aEEs.Length()-1;
aEE.SetIndices(nE1, nE2);
aEE.SetCommonPart(aCPart);
// 2
break;
}
// 1
- BOPDS_InterfEE& aEE=aEEs.Append1();
- iX=aEEs.Extent()-1;
+ BOPDS_InterfEE& aEE=aEEs.Appended();
+ iX=aEEs.Length()-1;
aEE.SetIndices(nE1, nE2);
aEE.SetCommonPart(aCPart);
// 2
Standard_Real aTolAdd = myFuzzyValue / 2.;
//
// 1. Fuse the new vertices
- BOPCol_IndexedDataMapOfShapeListOfShape aImages;
+ TopTools_IndexedDataMapOfShapeListOfShape aImages;
TreatNewVertices(theMVCPB, aImages);
//
// 2. Add new vertices to myDS and connect indices to CPB structure
Standard_Integer i, aNb = aImages.Extent();
for (i = 1; i <= aNb; ++i) {
const TopoDS_Vertex& aV = TopoDS::Vertex(aImages.FindKey(i));
- const BOPCol_ListOfShape& aLVSD = aImages.FindFromIndex(i);
+ const TopTools_ListOfShape& aLVSD = aImages.FindFromIndex(i);
//
BOPDS_ShapeInfo aSI;
aSI.SetShapeType(TopAbs_VERTEX);
aBox.Add(BRep_Tool::Pnt(aV));
aBox.SetGap(BRep_Tool::Tolerance(aV) + aTolAdd);
//
- BOPCol_ListIteratorOfListOfShape aItLS(aLVSD);
+ TopTools_ListIteratorOfListOfShape aItLS(aLVSD);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aVx = aItLS.Value();
BOPDS_CoupleOfPaveBlocks &aCPB = theMVCPB.ChangeFromKey(aVx);
Handle(BOPDS_PaveBlock) aPB[2];
aCPB.PaveBlocks(aPB[0], aPB[1]);
for (Standard_Integer j = 0; j < 2; ++j) {
- BOPCol_ListOfInteger *pLI = aMPBLI.ChangeSeek(aPB[j]);
+ TColStd_ListOfInteger *pLI = aMPBLI.ChangeSeek(aPB[j]);
if (!pLI) {
- pLI = &aMPBLI(aMPBLI.Add(aPB[j], BOPCol_ListOfInteger(theAllocator)));
+ pLI = &aMPBLI(aMPBLI.Add(aPB[j], TColStd_ListOfInteger(theAllocator)));
}
pLI->Append(iV);
//
//=======================================================================
void BOPAlgo_PaveFiller::TreatNewVertices
(const BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMVCPB,
- BOPCol_IndexedDataMapOfShapeListOfShape& myImages)
+ TopTools_IndexedDataMapOfShapeListOfShape& myImages)
{
//
// Prepare for intersection
- BOPCol_IndexedDataMapOfShapeReal aVerts;
+ TopTools_IndexedDataMapOfShapeReal aVerts;
Standard_Integer i, aNbV = theMVCPB.Extent();
for (i = 1; i <= aNbV; ++i) {
const TopoDS_Shape& aV = theMVCPB.FindKey(i);
}
//
// Perform intersection
- BOPCol_ListOfListOfShape aChains;
+ TopTools_ListOfListOfShape aChains;
BOPAlgo_Tools::IntersectVertices(aVerts, myRunParallel, myFuzzyValue, aChains);
//
// Treat the results - make new vertices for each chain
- BOPCol_ListOfListOfShape::Iterator aItC(aChains);
+ TopTools_ListOfListOfShape::Iterator aItC(aChains);
for (; aItC.More(); aItC.Next()) {
- const BOPCol_ListOfShape& aLVSD = aItC.Value();
+ const TopTools_ListOfShape& aLVSD = aItC.Value();
//
TopoDS_Vertex aVNew;
BOPTools_AlgoTools::MakeVertex(aLVSD, aVNew);
//=======================================================================
Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV,
Handle(BOPDS_PaveBlock)& aPB,
- BOPCol_MapOfInteger& theMEdges)
+ TColStd_MapOfInteger& theMEdges)
{
Standard_Integer nE, nVx, nVSD, iFlag;
Standard_Real aT, aTolVNew;
BOPDS_VectorOfInterfVE& aVEs=myDS->InterfVE();
aVEs.SetIncrement(10);
// 1
- BOPDS_InterfVE& aVE=aVEs.Append1();
+ BOPDS_InterfVE& aVE=aVEs.Appended();
aVE.SetIndices(nV, nE);
aVE.SetParameter(aT);
// 2
BOPDS_MapOfPaveBlock aMPBFence(1, anAlloc);
BOPDS_VectorOfListOfPaveBlock& aPBP = myDS->ChangePaveBlocksPool();
- Standard_Integer aNbPBP = aPBP.Extent();
+ Standard_Integer aNbPBP = aPBP.Length();
for (i = 0; i < aNbPBP; ++i)
{
BOPDS_ListOfPaveBlock& aLPB = aPBP(i);
aPB2->Range(aT21, aT22);
// Add pair for intersection
- BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge.Append1();
+ BOPAlgo_EdgeEdge& anEdgeEdge = aVEdgeEdge.Appended();
anEdgeEdge.UseQuickCoincidenceCheck(Standard_True);
anEdgeEdge.SetPaveBlock1(aPB1);
anEdgeEdge.SetPaveBlock2(aPB2);
}
}
- Standard_Integer aNbPairs = aVEdgeEdge.Extent();
+ Standard_Integer aNbPairs = aVEdgeEdge.Length();
if (!aNbPairs)
return;
const Standard_Integer nE1 = aPB[0]->OriginalEdge();
const Standard_Integer nE2 = aPB[1]->OriginalEdge();
- BOPDS_InterfEE& aEE = aEEs.Append1();
+ BOPDS_InterfEE& aEE = aEEs.Appended();
aEE.SetIndices(nE1, nE2);
aEE.SetCommonPart(aCP);
myDS->AddInterf(nE1, nE2);
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_SubIterator.hxx>
#include <BOPDS_VectorOfInterfVF.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBndLib.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
+#include <NCollection_Vector.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
Handle(IntTools_Context) myContext;
};
//=======================================================================
-typedef BOPCol_NCVector<BOPAlgo_VertexFace>
+typedef NCollection_Vector<BOPAlgo_VertexFace>
BOPAlgo_VectorOfVertexFace;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_VertexFace,
BOPAlgo_VectorOfVertexFace,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_VertexFaceFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_VertexFaceFunctor,
BOPAlgo_VectorOfVertexFace,
Handle(IntTools_Context)> BOPAlgo_VertexFaceCnt;
const TopoDS_Vertex& aV=(*(TopoDS_Vertex *)(&myDS->Shape(nVx)));
const TopoDS_Face& aF=(*(TopoDS_Face *)(&myDS->Shape(nF)));
//
- BOPAlgo_VertexFace& aVertexFace=aVVF.Append1();
+ BOPAlgo_VertexFace& aVertexFace=aVVF.Appended();
//
aVertexFace.SetIndices(nV, nF);
aVertexFace.SetVertex(aV);
aVertexFace.SetProgressIndicator(myProgressIndicator);
}//for (; myIterator->More(); myIterator->Next()) {
//
- aNbVF=aVVF.Extent();
+ aNbVF=aVVF.Length();
//================================================================
BOPAlgo_VertexFaceCnt::Perform(myRunParallel, aVVF, myContext);
//================================================================
aVertexFace.Indices(nV, nF);
aVertexFace.Parameters(aT1, aT2);
// 1
- BOPDS_InterfVF& aVF=aVFs.Append1();
+ BOPDS_InterfVF& aVF=aVFs.Appended();
aVF.SetIndices(nV, nF);
aVF.SetUV(aT1, aT2);
// 2
}
// 5 update FaceInfo
BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
- BOPCol_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
+ TColStd_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
aMVIn.Add(nVx);
}//for (k=0; k < aNbVF; ++k) {
//
{
Standard_Integer i, aNbS,aNbEEs, nF, nV, iFlag;
Standard_Real aT1, aT2, dummy;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
Handle(NCollection_BaseAllocator) aAllocator;
//
aAllocator=
NCollection_BaseAllocator::CommonBaseAllocator();
- BOPCol_ListOfInteger aLIV(aAllocator), aLIF(aAllocator);
- BOPCol_MapOfInteger aMI(100, aAllocator);
+ TColStd_ListOfInteger aLIV(aAllocator), aLIF(aAllocator);
+ TColStd_MapOfInteger aMI(100, aAllocator);
BOPDS_MapOfPaveBlock aMPBF(100, aAllocator);
//
aNbS=myDS->NbSourceShapes();
//
BOPDS_VectorOfInterfEE& aEEs=myDS->InterfEE();
- aNbEEs=aEEs.Extent();
+ aNbEEs=aEEs.Length();
for (i=0; i<aNbEEs; ++i) {
BOPDS_InterfEE& aEE=aEEs(i);
if (aEE.HasIndexNew()) {
aIt.Value(nV, nF);
//
BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
- const BOPCol_MapOfInteger& aMVOn=aFI.VerticesOn();
+ const TColStd_MapOfInteger& aMVOn=aFI.VerticesOn();
//
if (!aMVOn.Contains(nV)) {
const TopoDS_Vertex& aV=(*(TopoDS_Vertex *)(&myDS->Shape(nV)));
iFlag = myContext->ComputeVF(aV, aF, aT1, aT2, dummy, myFuzzyValue);
if (!iFlag) {
// 1
- BOPDS_InterfVF& aVF=aVFs.Append1();
- i=aVFs.Extent()-1;
+ BOPDS_InterfVF& aVF=aVFs.Appended();
+ i=aVFs.Length()-1;
aVF.SetIndices(nV, nF);
aVF.SetUV(aT1, aT2);
// 2
myDS->AddInterf(nV, nF);
//
- BOPCol_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
+ TColStd_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
aMVIn.Add(nV);
}
}
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_SequenceOfCommonPrts.hxx>
#include <IntTools_Tools.hxx>
+#include <NCollection_Vector.hxx>
#include <Precision.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
};
//
//=======================================================================
-typedef BOPCol_NCVector<BOPAlgo_EdgeFace> BOPAlgo_VectorOfEdgeFace;
+typedef NCollection_Vector<BOPAlgo_EdgeFace> BOPAlgo_VectorOfEdgeFace;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_EdgeFace,
BOPAlgo_VectorOfEdgeFace,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_EdgeFaceFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_EdgeFaceFunctor,
BOPAlgo_VectorOfEdgeFace,
Handle(IntTools_Context)> BOPAlgo_EdgeFaceCnt;
//
aAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_MapOfInteger aMIEFC(100, aAllocator);
+ TColStd_MapOfInteger aMIEFC(100, aAllocator);
BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks aMVCPB(100, aAllocator);
BOPDS_IndexedDataMapOfPaveBlockListOfInteger aMPBLI(100, aAllocator);
BOPAlgo_DataMapOfPaveBlockBndBox aDMPBBox(100, aAllocator);
BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
const BOPDS_IndexedMapOfPaveBlock& aMPBF=aFI.PaveBlocksOn();
//
- const BOPCol_MapOfInteger& aMVIn=aFI.VerticesIn();
- const BOPCol_MapOfInteger& aMVOn=aFI.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn=aFI.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn=aFI.VerticesOn();
//
aTolE=BRep_Tool::Tolerance(aE);
aTolF=BRep_Tool::Tolerance(aF);
bV2=aMVIn.Contains(nV2) || aMVOn.Contains(nV2);
bExpressCompute=bV1 && bV2;
//
- BOPAlgo_EdgeFace& aEdgeFace=aVEdgeFace.Append1();
+ BOPAlgo_EdgeFace& aEdgeFace=aVEdgeFace.Appended();
//
aEdgeFace.SetIndices(nE, nF);
aEdgeFace.SetPaveBlock(aPB);
}//for (; aIt.More(); aIt.Next()) {
}//for (; myIterator->More(); myIterator->Next()) {
//
- aNbEdgeFace=aVEdgeFace.Extent();
+ aNbEdgeFace=aVEdgeFace.Length();
//=================================================================
BOPAlgo_EdgeFaceCnt::Perform(myRunParallel, aVEdgeFace, myContext);
//=================================================================
IntTools_Range aR1(aT1, aTS1), aR2(aTS2, aT2);
//
BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
- const BOPCol_MapOfInteger& aMIFOn=aFI.VerticesOn();
- const BOPCol_MapOfInteger& aMIFIn=aFI.VerticesIn();
+ const TColStd_MapOfInteger& aMIFOn=aFI.VerticesOn();
+ const TColStd_MapOfInteger& aMIFIn=aFI.VerticesIn();
//
Standard_Boolean bLinePlane = Standard_False;
if (aNbCPrts) {
if (bV[0] && bV[1]) {
IntTools_CommonPrt aCP = aCPart;
aCP.SetType(TopAbs_EDGE);
- BOPDS_InterfEF& aEF=aEFs.Append1();
- iX=aEFs.Extent()-1;
+ BOPDS_InterfEF& aEF=aEFs.Appended();
+ iX=aEFs.Length()-1;
aEF.SetIndices(nE, nF);
aEF.SetCommonPart(aCP);
myDS->AddInterf(nE, nF);
//
aMIEFC.Add(nF);
// 1
- BOPDS_InterfEF& aEF=aEFs.Append1();
- iX=aEFs.Extent()-1;
+ BOPDS_InterfEF& aEF=aEFs.Appended();
+ iX=aEFs.Length()-1;
aEF.SetIndices(nE, nF);
aEF.SetCommonPart(aCPart);
// 2
aMIEFC.Add(nF);
//
// 1
- BOPDS_InterfEF& aEF=aEFs.Append1();
- iX=aEFs.Extent()-1;
+ BOPDS_InterfEF& aEF=aEFs.Appended();
+ iX=aEFs.Length()-1;
aEF.SetIndices(nE, nF);
//
bV[0]=CheckFacePaves(nV[0], aMIFOn, aMIFIn);
PerformNewVertices(aMVCPB, aAllocator, Standard_False);
//
// Update FaceInfoIn for all faces having EF common parts
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TColStd_MapIteratorOfMapOfInteger aItMI;
aItMI.Initialize(aMIEFC);
for (; aItMI.More(); aItMI.Next()) {
nF=aItMI.Value();
//=======================================================================
Standard_Boolean BOPAlgo_PaveFiller::CheckFacePaves
(const Standard_Integer nVx,
- const BOPCol_MapOfInteger& aMIFOn,
- const BOPCol_MapOfInteger& aMIFIn)
+ const TColStd_MapOfInteger& aMIFOn,
+ const TColStd_MapOfInteger& aMIFIn)
{
Standard_Boolean bRet;
Standard_Integer nV;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
//
bRet=Standard_False;
//
//=======================================================================
Standard_Boolean BOPAlgo_PaveFiller::CheckFacePaves
(const TopoDS_Vertex& aVnew,
- const BOPCol_MapOfInteger& aMIF)
+ const TColStd_MapOfInteger& aMIF)
{
Standard_Boolean bRet;
Standard_Integer nV, iFlag;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
//
bRet=Standard_True;
//
BOPDS_VectorOfInterfVF& aVFs=myDS->InterfVF();
aVFs.SetIncrement(10);
// 1
- BOPDS_InterfVF& aVF=aVFs.Append1();
+ BOPDS_InterfVF& aVF=aVFs.Appended();
//
aVF.SetIndices(nV, nF);
aVF.SetUV(U, V);
}
//
BOPDS_FaceInfo& aFI=myDS->ChangeFaceInfo(nF);
- BOPCol_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
+ TColStd_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
aMVIn.Add(nVx);
//
// check for self-interference
}
//
BOPDS_VectorOfInterfEE& aEEs = myDS->InterfEE();
- Standard_Integer aNbEEs = aEEs.Extent();
+ Standard_Integer aNbEEs = aEEs.Length();
if (!aNbEEs) {
return;
}
Standard_Real aTR1, aTR2;
//
// get face's edges to check that E/E contains the edge from the face
- BOPCol_MapOfInteger aMFE;
- const BOPCol_ListOfInteger& aLI = myDS->ShapeInfo(theF).SubShapes();
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ TColStd_MapOfInteger aMFE;
+ const TColStd_ListOfInteger& aLI = myDS->ShapeInfo(theF).SubShapes();
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next()) {
nE1 = aItLI.Value();
if (myDS->ShapeInfo(nE1).ShapeType() == TopAbs_EDGE) {
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <Bnd_Box.hxx>
#include <BOPAlgo_PaveFiller.hxx>
+#include <Bnd_Box.hxx>
+#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_CoupleOfPaveBlocks.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_VectorOfCurve.hxx>
#include <BOPDS_VectorOfPoint.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
#include <BRep_TEdge.hxx>
-#include <BRepLib.hxx>
+#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepLib.hxx>
#include <BRepTools.hxx>
-#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
+#include <Geom2d_Curve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_SequenceOfPntOn2Faces.hxx>
#include <IntTools_ShrunkRange.hxx>
#include <IntTools_Tools.hxx>
+#include <NCollection_Vector.hxx>
#include <Precision.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_ListOfShape.hxx>
//
static Standard_Real ToleranceFF(const BRepAdaptor_Surface& aBAS1,
};
//
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_FaceFace> BOPAlgo_VectorOfFaceFace;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_FaceFace,
BOPAlgo_VectorOfFaceFace> BOPAlgo_FaceFaceFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_FaceFaceFunctor,
BOPAlgo_VectorOfFaceFace> BOPAlgo_FaceFaceCnt;
/////////////////////////////////////////////////////////////////////////
Standard_Boolean bSplitCurve = Standard_False;
//
// Fence map to store faces with updated FaceInfo structure
- BOPCol_MapOfInteger aMIFence;
+ TColStd_MapOfInteger aMIFence;
// Prepare the pairs of faces for intersection
BOPAlgo_VectorOfFaceFace aVFaceFace;
Standard_Integer nF1, nF2;
// Check if the planes are really interfering
Standard_Boolean bToIntersect = CheckPlanes(nF1, nF2);
if (!bToIntersect) {
- BOPDS_InterfFF& aFF = aFFs.Append1();
+ BOPDS_InterfFF& aFF = aFFs.Appended();
aFF.SetIndices(nF1, nF2);
aFF.Init(0, 0);
continue;
}
}
//
- BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Append1();
+ BOPAlgo_FaceFace& aFaceFace=aVFaceFace.Appended();
//
aFaceFace.SetIndices(nF1, nF2);
aFaceFace.SetFaces(aF1, aF2);
}
else {
// for the Glue mode just add all interferences of that type
- BOPDS_InterfFF& aFF = aFFs.Append1();
+ BOPDS_InterfFF& aFF = aFFs.Appended();
aFF.SetIndices(nF1, nF2);
aFF.SetTangentFaces(Standard_False);
aFF.Init(0, 0);
BOPAlgo_FaceFaceCnt::Perform(myRunParallel, aVFaceFace);
//======================================================
// Treatment of the results
- Standard_Integer k, aNbFaceFace = aVFaceFace.Extent();
+ Standard_Integer k, aNbFaceFace = aVFaceFace.Length();
for (k = 0; k < aNbFaceFace; ++k) {
BOPAlgo_FaceFace& aFaceFace = aVFaceFace(k);
aFaceFace.Indices(nF1, nF2);
if (!aFaceFace.IsDone() || aFaceFace.HasErrors()) {
- BOPDS_InterfFF& aFF = aFFs.Append1();
+ BOPDS_InterfFF& aFF = aFFs.Appended();
aFF.SetIndices(nF1, nF2);
aFF.Init(0, 0);
// Warn about failed intersection of faces
myDS->AddInterf(nF1, nF2);
}
//
- BOPDS_InterfFF& aFF = aFFs.Append1();
+ BOPDS_InterfFF& aFF = aFFs.Appended();
aFF.SetIndices(nF1, nF2);
aFF.SetTangentFaces(bTangentFaces);
aFF.Init(aNbCurves, aNbPoints);
const IntTools_Curve& aIC = aCvsX(i);
Standard_Boolean bIsValid = IntTools_Tools::CheckCurve(aIC, aBox);
if (bIsValid) {
- BOPDS_Curve& aNC = aVNC.Append1();
+ BOPDS_Curve& aNC = aVNC.Appended();
aNC.SetCurve(aIC);
// make sure that the bounding box has the maximal gap
aBox.Enlarge(aBoxExpandValue);
const IntTools_PntOn2Faces& aPi = aPntsX(i);
const gp_Pnt& aP = aPi.P1().Pnt();
//
- BOPDS_Point& aNP = aVNP.Append1();
+ BOPDS_Point& aNP = aVNP.Appended();
aNP.SetPnt(aP);
}
}
}
//
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
- Standard_Integer aNbFF = aFFs.Extent();
+ Standard_Integer aNbFF = aFFs.Length();
if (!aNbFF) {
return;
}
aAllocator=
NCollection_BaseAllocator::CommonBaseAllocator();
//
- BOPCol_ListOfInteger aLSE(aAllocator), aLBV(aAllocator);
- BOPCol_MapOfInteger aMVOnIn(100, aAllocator),
+ TColStd_ListOfInteger aLSE(aAllocator), aLBV(aAllocator);
+ TColStd_MapOfInteger aMVOnIn(100, aAllocator),
aMVStick(100,aAllocator), aMVEF(100, aAllocator),
aMI(100, aAllocator), aMVBounds(100, aAllocator);
BOPDS_IndexedMapOfPaveBlock aMPBOnIn(100, aAllocator);
BOPDS_MapOfPaveBlock aMPBAdd(100, aAllocator), aMPBCommon;
BOPDS_ListOfPaveBlock aLPB(aAllocator);
BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks aMSCPB(100, aAllocator);
- BOPCol_DataMapOfShapeInteger aMVI(100, aAllocator);
+ TopTools_DataMapOfShapeInteger aMVI(100, aAllocator);
BOPDS_DataMapOfPaveBlockListOfPaveBlock aDMExEdges(100, aAllocator);
- BOPCol_DataMapOfIntegerReal aMVTol(100, aAllocator);
- BOPCol_DataMapOfIntegerInteger aDMNewSD(100, aAllocator);
- BOPCol_DataMapOfIntegerListOfInteger aDMVLV;
- BOPCol_DataMapOfIntegerListOfInteger aDMBV(100, aAllocator);
- BOPCol_DataMapIteratorOfDataMapOfIntegerReal aItMV;
- BOPCol_IndexedMapOfShape aMicroEdges(100, aAllocator);
- BOPCol_IndexedMapOfShape aVertsOnRejectedPB;
+ TColStd_DataMapOfIntegerReal aMVTol(100, aAllocator);
+ TColStd_DataMapOfIntegerInteger aDMNewSD(100, aAllocator);
+ TColStd_DataMapOfIntegerListOfInteger aDMVLV;
+ TColStd_DataMapOfIntegerListOfInteger aDMBV(100, aAllocator);
+ TColStd_DataMapIteratorOfDataMapOfIntegerReal aItMV;
+ TopTools_IndexedMapOfShape aMicroEdges(100, aAllocator);
+ TopTools_IndexedMapOfShape aVertsOnRejectedPB;
//
for (i=0; i<aNbFF; ++i) {
//
aFF.Indices(nF1, nF2);
//
BOPDS_VectorOfPoint& aVP=aFF.ChangePoints();
- aNbP=aVP.Extent();
+ aNbP=aVP.Length();
BOPDS_VectorOfCurve& aVC=aFF.ChangeCurves();
- aNbC=aVC.Extent();
+ aNbC=aVC.Length();
if (!aNbP && !aNbC) {
continue;
}
//
if (!aLBV.IsEmpty()) {
aDMBV.Bind(j, aLBV);
- BOPCol_ListIteratorOfListOfInteger aItI(aLBV);
+ TColStd_ListIteratorOfListOfInteger aItI(aLBV);
for (; aItI.More(); aItI.Next()) {
aMVBounds.Add(aItI.Value());
}
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::MakeSDVerticesFF
- (const BOPCol_DataMapOfIntegerListOfInteger& theDMVLV,
- BOPCol_DataMapOfIntegerInteger& theDMNewSD)
+ (const TColStd_DataMapOfIntegerListOfInteger& theDMVLV,
+ TColStd_DataMapOfIntegerInteger& theDMNewSD)
{
// Create a new SD vertex for each group of coinciding vertices
// and put new substitutions to theDMNewSD.
- BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItG(theDMVLV);
+ TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItG(theDMVLV);
for (; aItG.More(); aItG.Next()) {
- const BOPCol_ListOfInteger& aList = aItG.Value();
+ const TColStd_ListOfInteger& aList = aItG.Value();
// make SD vertices w/o creation of interfs
Standard_Integer nSD = MakeSDVertices(aList, Standard_False);
// update theDMNewSD
- BOPCol_ListIteratorOfListOfInteger aItL(aList);
+ TColStd_ListIteratorOfListOfInteger aItL(aList);
for (; aItL.More(); aItL.Next()) {
Standard_Integer nV = aItL.Value();
theDMNewSD.Bind(nV, nSD);
void BOPAlgo_PaveFiller::PostTreatFF
(BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& theMSCPB,
BOPDS_DataMapOfPaveBlockListOfPaveBlock& aDMExEdges,
- BOPCol_DataMapOfIntegerInteger& aDMNewSD,
- const BOPCol_IndexedMapOfShape& theMicroEdges,
- const BOPCol_IndexedMapOfShape& theVertsOnRejectedPB,
+ TColStd_DataMapOfIntegerInteger& aDMNewSD,
+ const TopTools_IndexedMapOfShape& theMicroEdges,
+ const TopTools_IndexedMapOfShape& theVertsOnRejectedPB,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
Standard_Integer aNbS = theMSCPB.Extent();
Standard_Integer aNbLPBx;
TopAbs_ShapeEnum aType;
TopoDS_Shape aV, aE;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListIteratorOfListOfShape aItLS;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
BOPDS_PDS aPDS;
Handle(BOPDS_PaveBlock) aPB1;
BOPDS_Pave aPave[2];
BOPDS_ShapeInfo aSI;
//
- BOPCol_ListOfShape aLS(theAllocator);
+ TopTools_ListOfShape aLS(theAllocator);
BOPAlgo_PaveFiller aPF(theAllocator);
aPF.SetIsPrimary(Standard_False);
aPF.SetNonDestructive(myNonDestructive);
}
//
// 1 prepare arguments
- BOPCol_MapOfShape anAddedSD;
+ TopTools_MapOfShape anAddedSD;
for (k=1; k<=aNbS; ++k) {
const TopoDS_Shape& aS=theMSCPB.FindKey(k);
aLS.Append(aS);
}//for (; aItLS.More(); aItLS.Next()) {
// Update SD for vertices that did not participate in operation
- BOPCol_DataMapOfIntegerInteger::Iterator itDM(aDMNewSD);
+ TColStd_DataMapOfIntegerInteger::Iterator itDM(aDMNewSD);
for (; itDM.More(); itDM.Next())
{
const Standard_Integer* pSD = aDMNewSD.Seek(itDM.Value());
//=======================================================================
void BOPAlgo_PaveFiller::UpdateFaceInfo
(BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME,
- const BOPCol_DataMapOfIntegerInteger& theDMV)
+ const TColStd_DataMapOfIntegerInteger& theDMV)
{
Standard_Integer i, j, nV1, nF1, nF2,
aNbFF, aNbC, aNbP;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
- BOPCol_MapOfInteger aMF;
+ TColStd_MapOfInteger aMF;
//
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
- aNbFF=aFFs.Extent();
+ aNbFF=aFFs.Length();
//
//1. Sections (curves, points);
for (i=0; i<aNbFF; ++i) {
//
// 1.1. Section edges
BOPDS_VectorOfCurve& aVNC=aFF.ChangeCurves();
- aNbC=aVNC.Extent();
+ aNbC=aVNC.Length();
for (j=0; j<aNbC; ++j) {
BOPDS_Curve& aNC=aVNC(j);
BOPDS_ListOfPaveBlock& aLPBC=aNC.ChangePaveBlocks();
//
// 1.2. Section vertices
const BOPDS_VectorOfPoint& aVNP=aFF.Points();
- aNbP=aVNP.Extent();
+ aNbP=aVNP.Length();
for (j=0; j<aNbP; ++j) {
const BOPDS_Point& aNP=aVNP(j);
nV1=aNP.Index();
// 2. Update Face Info information with new vertices and new
// pave blocks created in PostTreatFF from existing ones
Standard_Integer nV2, aNbPB;
- BOPCol_MapIteratorOfMapOfInteger aItMF;
- BOPCol_DataMapIteratorOfDataMapOfIntegerInteger aItMV;
+ TColStd_MapIteratorOfMapOfInteger aItMF;
+ TColStd_DataMapIteratorOfDataMapOfIntegerInteger aItMV;
//
aItMF.Initialize(aMF);
for (; aItMF.More(); aItMF.Next()) {
//
// 2.1. Update information about vertices
if (bVerts) {
- BOPCol_MapOfInteger& aMVOn = aFI.ChangeVerticesOn();
- BOPCol_MapOfInteger& aMVIn = aFI.ChangeVerticesIn();
+ TColStd_MapOfInteger& aMVOn = aFI.ChangeVerticesOn();
+ TColStd_MapOfInteger& aMVIn = aFI.ChangeVerticesIn();
//
aItMV.Initialize(theDMV);
for (; aItMV.More(); aItMV.Next()) {
Standard_Boolean BOPAlgo_PaveFiller::IsExistingVertex
(const gp_Pnt& aP,
const Standard_Real theTolR3D,
- const BOPCol_MapOfInteger& aMVOnIn)const
+ const TColStd_MapOfInteger& aMVOnIn)const
{
Standard_Boolean bRet;
Standard_Integer nV, iFlag;
Standard_Real aTolCheck;
gp_Pnt aPV;
Bnd_Box aBoxP;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
//
aTolCheck = theTolR3D + myFuzzyValue;
bRet=Standard_True;
Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
(const Handle(BOPDS_PaveBlock)& thePB,
const BOPDS_Curve& theNC,
- const BOPCol_ListOfInteger& theLSE)
+ const TColStd_ListOfInteger& theLSE)
{
Standard_Boolean bRet=Standard_True;
//
Standard_Integer nE, iFlag, nV1, nV2;
gp_Pnt aPm;
Bnd_Box aBoxPm;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
//
thePB->Range(aT1, aT2);
thePB->Indices(nV1, nV2);
void BOPAlgo_PaveFiller::PutBoundPaveOnCurve(const TopoDS_Face& aF1,
const TopoDS_Face& aF2,
BOPDS_Curve& aNC,
- BOPCol_ListOfInteger& aLVB)
+ TColStd_ListOfInteger& aLVB)
{
Standard_Boolean bVF;
Standard_Integer nV, iFlag, nVn, j, aNbEP;
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::PutPavesOnCurve
- (const BOPCol_MapOfInteger& aMVOnIn,
+ (const TColStd_MapOfInteger& aMVOnIn,
BOPDS_Curve& aNC,
const Standard_Integer nF1,
const Standard_Integer nF2,
- const BOPCol_MapOfInteger& aMI,
- const BOPCol_MapOfInteger& aMVEF,
- BOPCol_DataMapOfIntegerReal& aMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV)
+ const TColStd_MapOfInteger& aMI,
+ const TColStd_MapOfInteger& aMVEF,
+ TColStd_DataMapOfIntegerReal& aMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV)
{
Standard_Boolean bInBothFaces;
Standard_Integer nV;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
//
const Bnd_Box& aBoxC=aNC.Box();
Standard_Real aTolR3D = Max(aNC.Tolerance(), aNC.TangentialTolerance());
NCollection_IndexedDataMap<Standard_Integer,NCollection_List<PaveBlockDist> > aIDMVertPBs;
Standard_Integer i;
const Standard_Real anEps = gp::Resolution();
- for (i = 0; i < theVNC.Extent(); ++i)
+ for (i = 0; i < theVNC.Length(); ++i)
{
const BOPDS_Curve& aNC = theVNC(i);
const IntTools_Curve& aIC = aNC.Curve();
//=======================================================================
Standard_Boolean BOPAlgo_PaveFiller::ExtendedTolerance
(const Standard_Integer nV,
- const BOPCol_MapOfInteger& aMI,
+ const TColStd_MapOfInteger& aMI,
Standard_Real& aTolVExt,
const Standard_Integer aType)
{
BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
//
for (; k<aNbInt; ++k) {
- aNbLines = !k ? aEEs.Extent() : aEFs.Extent();
+ aNbLines = !k ? aEEs.Length() : aEFs.Length();
for (i = 0; i < aNbLines; ++i) {
BOPDS_Interf *aInt = !k ? (BOPDS_Interf*) (&aEEs(i)) :
(BOPDS_Interf*) (&aEFs(i));
{
Standard_Integer nE, nF, nFOpposite, aNbEFs, i;
Standard_Real U1, U2, V1, V2, f, l;
- BOPCol_MapOfInteger aMI;
+ TColStd_MapOfInteger aMI;
//
//collect indexes of all shapes from nF1 and nF2.
GetFullShapeMap(nF1, aMI);
GetFullShapeMap(nF2, aMI);
//
BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
- aNbEFs = aEFs.Extent();
+ aNbEFs = aEFs.Length();
//
for(i = 0; i < aNbEFs; ++i) {
const BOPDS_InterfEF& aEF = aEFs(i);
//=======================================================================
void BOPAlgo_PaveFiller::PutEFPavesOnCurve
(BOPDS_Curve& aNC,
- const BOPCol_MapOfInteger& aMI,
- const BOPCol_MapOfInteger& aMVEF,
- BOPCol_DataMapOfIntegerReal& aMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV)
+ const TColStd_MapOfInteger& aMI,
+ const TColStd_MapOfInteger& aMVEF,
+ TColStd_DataMapOfIntegerReal& aMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV)
{
if (!aMVEF.Extent()) {
return;
}
//
Standard_Integer nV;
- BOPCol_MapOfInteger aMV;
+ TColStd_MapOfInteger aMV;
//
aMV.Assign(aMVEF);
RemoveUsedVertices(aNC, aMV);
const Handle(Geom_Curve)& aC3D=aIC.Curve();
GeomAPI_ProjectPointOnCurve& aProjPT = myContext->ProjPT(aC3D);
//
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TColStd_MapIteratorOfMapOfInteger aItMI;
aItMI.Initialize(aMV);
for (; aItMI.More(); aItMI.Next()) {
nV = aItMI.Value();
void BOPAlgo_PaveFiller::PutStickPavesOnCurve
(const TopoDS_Face& aF1,
const TopoDS_Face& aF2,
- const BOPCol_MapOfInteger& aMI,
+ const TColStd_MapOfInteger& aMI,
BOPDS_Curve& aNC,
- const BOPCol_MapOfInteger& aMVStick,
- BOPCol_DataMapOfIntegerReal& aMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV)
+ const TColStd_MapOfInteger& aMVStick,
+ TColStd_DataMapOfIntegerReal& aMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV)
{
- BOPCol_MapOfInteger aMV;
+ TColStd_MapOfInteger aMV;
aMV.Assign(aMVStick);
RemoveUsedVertices(aNC, aMV);
//
gp_Pnt aPC[2], aPV;
gp_Dir aDN[2];
gp_Pnt2d aP2D;
- BOPCol_MapIteratorOfMapOfInteger aItMI, aItMI1;
+ TColStd_MapIteratorOfMapOfInteger aItMI, aItMI1;
//
aDT2=2e-7; // the rich criteria
aDScPr=5.e-9; // the creasing criteria
//=======================================================================
void BOPAlgo_PaveFiller::GetStickVertices(const Standard_Integer nF1,
const Standard_Integer nF2,
- BOPCol_MapOfInteger& aMVStick,
- BOPCol_MapOfInteger& aMVEF,
- BOPCol_MapOfInteger& aMI)
+ TColStd_MapOfInteger& aMVStick,
+ TColStd_MapOfInteger& aMVEF,
+ TColStd_MapOfInteger& aMI)
{
Standard_Integer nS1, nS2, nVNew, aTypeInt, i;
//
BOPDS_VectorOfInterfEF& aEFs=myDS->InterfEF();
//
Standard_Integer aNbLines[5] = {
- aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
- aVFs.Extent(), aEFs.Extent()
+ aVVs.Length(), aVEs.Length(), aEEs.Length(),
+ aVFs.Length(), aEFs.Length()
};
//collect indices of all shapes from nF1 and nF2.
aMI.Clear();
// purpose:
//=======================================================================
void BOPAlgo_PaveFiller::GetFullShapeMap(const Standard_Integer nF,
- BOPCol_MapOfInteger& aMI)
+ TColStd_MapOfInteger& aMI)
{
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
Standard_Integer nS;
//
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(nF);
- const BOPCol_ListOfInteger& aLI = aSI.SubShapes();
+ const TColStd_ListOfInteger& aLI = aSI.SubShapes();
//
aMI.Add(nF);
aIt.Initialize(aLI);
// purpose:
//=======================================================================
void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
- BOPCol_MapOfInteger& aMV)
+ TColStd_MapOfInteger& aMV)
{
if (!aMV.Extent()) {
return;
(const Standard_Integer nV,
const Standard_Real aTolR3D,
const BOPDS_Curve& aNC,
- const BOPCol_MapOfInteger& aMI,
- BOPCol_DataMapOfIntegerReal& aMVTol,
- BOPCol_DataMapOfIntegerListOfInteger& aDMVLV,
+ const TColStd_MapOfInteger& aMI,
+ TColStd_DataMapOfIntegerReal& aMVTol,
+ TColStd_DataMapOfIntegerListOfInteger& aDMVLV,
const Standard_Integer iCheckExtend)
{
Standard_Boolean bIsVertexOnLine;
bExist = aPB->ContainsParameter(aT, aPTol, nVUsed);
if (bExist) {
// use existing pave
- BOPCol_ListOfInteger* pList = aDMVLV.ChangeSeek(nVUsed);
+ TColStd_ListOfInteger* pList = aDMVLV.ChangeSeek(nVUsed);
if (!pList) {
- pList = aDMVLV.Bound(nVUsed, BOPCol_ListOfInteger());
+ pList = aDMVLV.Bound(nVUsed, TColStd_ListOfInteger());
pList->Append(nVUsed);
if (!aMVTol.IsBound(nVUsed)) {
const TopoDS_Vertex& aVUsed = (*(TopoDS_Vertex *)(&myDS->Shape(nVUsed)));
}
}
// avoid repeated elements in the list
- BOPCol_ListIteratorOfListOfInteger aItLI(*pList);
+ TColStd_ListIteratorOfListOfInteger aItLI(*pList);
for (; aItLI.More(); aItLI.Next()) {
if (aItLI.Value() == nV) {
break;
void BOPAlgo_PaveFiller::ProcessExistingPaveBlocks
(const Standard_Integer theInt,
const BOPDS_IndexedMapOfPaveBlock& aMPBOnIn,
- const BOPCol_DataMapOfIntegerListOfInteger& aDMBV,
+ const TColStd_DataMapOfIntegerListOfInteger& aDMBV,
BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB,
- BOPCol_DataMapOfShapeInteger& aMVI,
+ TopTools_DataMapOfShapeInteger& aMVI,
BOPDS_MapOfPaveBlock& aMPB)
{
if (aDMBV.IsEmpty()) {
//
Standard_Real aT, dummy;
Standard_Integer i, nV, nE, iC, aNbPB, iFlag;
- BOPCol_ListIteratorOfListOfInteger aItLI;
- BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItBV;
+ TColStd_ListIteratorOfListOfInteger aItLI;
+ TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItBV;
//
BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
BOPDS_InterfFF& aFF = aFFs(theInt);
aItBV.Initialize(aDMBV);
for (; aItBV.More(); aItBV.Next()) {
iC = aItBV.Key();
- const BOPCol_ListOfInteger& aLBV = aItBV.Value();
+ const TColStd_ListOfInteger& aLBV = aItBV.Value();
//
BOPDS_Curve& aNC = aVC.ChangeValue(iC);
BOPDS_ListOfPaveBlock& aLPBC = aNC.ChangePaveBlocks();
if (bCB) {
// Create new common blocks
BOPDS_ListOfPaveBlock aLPBNew;
- const BOPCol_ListOfInteger& aFaces = aCB1->Faces();
+ const TColStd_ListOfInteger& aFaces = aCB1->Faces();
aIt.Initialize(aLPB);
for (; aIt.More(); aIt.Next()) {
const Handle(BOPDS_PaveBlock)& aPBValue = aIt.Value();
const Standard_Integer aCur,
const Handle(BOPDS_PaveBlock)& aPB,
BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB,
- BOPCol_DataMapOfShapeInteger& aMVI,
+ TopTools_DataMapOfShapeInteger& aMVI,
BOPDS_ListOfPaveBlock& aLPBC)
{
Standard_Integer nV1, nV2;
{
Standard_Boolean bToIntersect;
Standard_Integer i, nV2, iCnt;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
//
bToIntersect=Standard_False;
//
const BOPDS_FaceInfo& aFI1=myDS->ChangeFaceInfo(nF1);
const BOPDS_FaceInfo& aFI2=myDS->ChangeFaceInfo(nF2);
//
- const BOPCol_MapOfInteger& aMVIn1=aFI1.VerticesIn();
- const BOPCol_MapOfInteger& aMVOn1=aFI1.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn();
//
iCnt=0;
for (i=0; (i<2 && !bToIntersect); ++i) {
- const BOPCol_MapOfInteger& aMV2=(!i) ? aFI2.VerticesIn()
+ const TColStd_MapOfInteger& aMV2=(!i) ? aFI2.VerticesIn()
: aFI2.VerticesOn();
//
aIt.Initialize(aMV2);
//purpose :
//=======================================================================
void BOPAlgo_PaveFiller::UpdatePaveBlocks
-(const BOPCol_DataMapOfIntegerInteger& aDMNewSD)
+(const TColStd_DataMapOfIntegerInteger& aDMNewSD)
{
if (aDMNewSD.IsEmpty()) {
return;
Standard_Boolean bCB, bRebuild;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
BOPDS_MapOfPaveBlock aMPB;
- BOPCol_MapOfInteger aMicroEdges;
+ TColStd_MapOfInteger aMicroEdges;
//
BOPDS_ListOfPaveBlock anAllPBs;
// Get pave blocks of section edges
BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
- Standard_Integer aNbFF = aFFs.Extent();
+ Standard_Integer aNbFF = aFFs.Length();
for (i = 0; i < aNbFF; ++i)
{
const BOPDS_InterfFF& aFF = aFFs(i);
const BOPDS_VectorOfCurve& aVNC = aFF.Curves();
- Standard_Integer aNbC = aVNC.Extent();
+ Standard_Integer aNbC = aVNC.Length();
for (j = 0; j < aNbC; ++j)
{
const BOPDS_Curve& aNC = aVNC(j);
// Get pave blocks from the pool
BOPDS_VectorOfListOfPaveBlock& aPBP = myDS->ChangePaveBlocksPool();
- aNbPBP = aPBP.Extent();
+ aNbPBP = aPBP.Length();
for (i = 0; i < aNbPBP; ++i) {
BOPDS_ListOfPaveBlock& aLPB = aPBP(i);
aItPB.Initialize(aLPB);
//function : RemovePaveBlocks
//purpose :
//=======================================================================
-void BOPAlgo_PaveFiller::RemovePaveBlocks(const BOPCol_MapOfInteger theEdges)
+void BOPAlgo_PaveFiller::RemovePaveBlocks(const TColStd_MapOfInteger theEdges)
{
// Remove all pave blocks referring to input edges:
//
// 1. from the Pave Blocks Pool
BOPDS_VectorOfListOfPaveBlock& aPBP = myDS->ChangePaveBlocksPool();
- Standard_Integer aNbPBP = aPBP.Extent(), i;
+ Standard_Integer aNbPBP = aPBP.Length(), i;
for (i = 0; i < aNbPBP; ++i) {
BOPDS_ListOfPaveBlock& aLPB = aPBP(i);
//
}
// 2. from Face Info and section curves
- BOPCol_MapOfInteger aMPassed;
+ TColStd_MapOfInteger aMPassed;
BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
- Standard_Integer aNbFF = aFFs.Extent(), j;
+ Standard_Integer aNbFF = aFFs.Length(), j;
for (i = 0; i < aNbFF; ++i) {
BOPDS_InterfFF& aFF = aFFs(i);
Standard_Integer nF1, nF2;
}
// remove from Section pave blocks
BOPDS_VectorOfCurve& aVNC = aFF.ChangeCurves();
- Standard_Integer aNbC = aVNC.Extent();
+ Standard_Integer aNbC = aVNC.Length();
for (j = 0; j < aNbC; ++j) {
BOPDS_Curve& aNC = aVNC(j);
BOPDS_ListOfPaveBlock& aLPB = aNC.ChangePaveBlocks();
Standard_Integer aNbFF;
//
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
- aNbFF=aFFs.Extent();
+ aNbFF=aFFs.Length();
if (!aNbFF) {
return;
}
Standard_Boolean bOnCurve, bHasShapeSD;
Standard_Integer i, nF1, nF2, aNbC, j, nV, nVSD;
Standard_Real aTolV;
- BOPCol_MapOfInteger aMF;
+ TColStd_MapOfInteger aMF;
//
for (i=0; i<aNbFF; ++i) {
BOPDS_InterfFF& aFF=aFFs(i);
//
BOPDS_VectorOfCurve& aVC=aFF.ChangeCurves();
- aNbC=aVC.Extent();
+ aNbC=aVC.Length();
if (!aNbC) {
continue;
}
}
//
// Collect old vertices that are shared for nF1, nF2 ->aMI;
- BOPCol_MapOfInteger aMI;
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TColStd_MapOfInteger aMI;
+ TColStd_MapIteratorOfMapOfInteger aItMI;
//
BOPDS_FaceInfo& aFI1=myDS->ChangeFaceInfo(nF1);
BOPDS_FaceInfo& aFI2=myDS->ChangeFaceInfo(nF2);
//
- const BOPCol_MapOfInteger& aMVOn1=aFI1.VerticesOn();
- const BOPCol_MapOfInteger& aMVIn1=aFI1.VerticesIn();
- const BOPCol_MapOfInteger& aMVOn2=aFI2.VerticesOn();
- const BOPCol_MapOfInteger& aMVIn2=aFI2.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn2=aFI2.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn2=aFI2.VerticesIn();
//
for (j=0; j<2; ++j) {
- const BOPCol_MapOfInteger& aMV1=(!j) ? aMVOn1 : aMVIn1;
+ const TColStd_MapOfInteger& aMV1=(!j) ? aMVOn1 : aMVIn1;
aItMI.Initialize(aMV1);
for (; aItMI.More(); aItMI.Next()) {
nV=aItMI.Value();
{
BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
NCollection_IndexedDataMap<Standard_Integer,BOPDS_ListOfPaveBlock> aMVIPBs;
- BOPCol_MapOfInteger aMVIToReduce;
+ TColStd_MapOfInteger aMVIToReduce;
// Fence map to avoid repeated checking of the same edge
BOPDS_MapOfPaveBlock aMPB;
//
// 1. iterate on all sections F-F
- Standard_Integer aNb = aFFs.Extent(), i;
+ Standard_Integer aNb = aFFs.Length(), i;
for (i = 0; i < aNb; ++i) {
BOPDS_InterfFF& aFF = aFFs(i);
//
BOPDS_VectorOfCurve& aVNC = aFF.ChangeCurves();
- Standard_Integer aNbC = aVNC.Extent(), k;
+ Standard_Integer aNbC = aVNC.Length(), k;
for (k = 0; k < aNbC; ++k) {
BOPDS_Curve& aNC = aVNC(k);
BOPDS_ListOfPaveBlock& aLPB = aNC.ChangePaveBlocks();
// reducing the tolerance to the value less than the tolerances of edges,
// i.e. minimal tolerance for the vertex is the max tolerance of the
// edges containing this vertex
- BOPCol_DataMapOfIntegerReal aMVITol;
+ TColStd_DataMapOfIntegerReal aMVITol;
BOPDS_VectorOfListOfPaveBlock& aPBP = myDS->ChangePaveBlocksPool();
- aNb = aPBP.Extent();
+ aNb = aPBP.Length();
for (i = 0; i < aNb; ++i) {
const BOPDS_ListOfPaveBlock& aLPB = aPBP(i);
BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
BOPDS_IndexedMapOfPaveBlock aMPBScAll;
//
BOPDS_VectorOfInterfFF& aFFs = myDS->InterfFF();
- Standard_Integer i, j, aNbFF = aFFs.Extent();
+ Standard_Integer i, j, aNbFF = aFFs.Length();
//
for (i = 0; i < aNbFF; ++i) {
const BOPDS_VectorOfCurve& aVNC = aFFs(i).Curves();
- Standard_Integer aNbC = aVNC.Extent();
+ Standard_Integer aNbC = aVNC.Length();
for (j = 0; j < aNbC; ++j) {
const BOPDS_ListOfPaveBlock& aLPBC = aVNC(j).PaveBlocks();
BOPDS_ListIteratorOfListOfPaveBlock aItPB(aLPBC);
//
// Get vertices of the face to check that vertices of the
// processed section edge belong to the face
- BOPCol_MapOfInteger aMFVerts;
+ TColStd_MapOfInteger aMFVerts;
// Get vertices from ON, IN and Sc pave blocks of the face
for (j = 0; j < 3; ++j) {
const BOPDS_IndexedMapOfPaveBlock& aMPB =
}
// Add ON, IN and Sc vertices of the face
for (j = 0; j < 3; ++j) {
- const BOPCol_MapOfInteger& aMFV = !j ? aFI.VerticesOn() :
+ const TColStd_MapOfInteger& aMFV = !j ? aFI.VerticesOn() :
(j == 1 ? aFI.VerticesIn() : aFI.VerticesSc());
- BOPCol_MapIteratorOfMapOfInteger aItMI(aMFV);
+ TColStd_MapIteratorOfMapOfInteger aItMI(aMFV);
for (; aItMI.More(); aItMI.Next()) {
aMFVerts.Add(aItMI.Value());
}
#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
#include <BOPAlgo_Tools.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRepLib.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_Tools.hxx>
+#include <NCollection_Vector.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
static
};
//
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_SplitEdge> BOPAlgo_VectorOfSplitEdge;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_SplitEdge,
BOPAlgo_VectorOfSplitEdge,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_SplitEdgeFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_SplitEdgeFunctor,
BOPAlgo_VectorOfSplitEdge,
Handle(IntTools_Context)> BOPAlgo_SplitEdgeCnt;
};
//
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_MPC> BOPAlgo_VectorOfMPC;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_MPC,
BOPAlgo_VectorOfMPC,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_MPCFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_MPCFunctor,
BOPAlgo_VectorOfMPC,
Handle(IntTools_Context)> BOPAlgo_MPCCnt;
Standard_Boolean myToUpdate;
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_BPC> BOPAlgo_VectorOfBPC;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_BPC,
BOPAlgo_VectorOfBPC> BOPAlgo_BPCFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_BPCFunctor,
BOPAlgo_VectorOfBPC> BOPAlgo_BPCCnt;
//
void BOPAlgo_PaveFiller::MakeSplitEdges()
{
BOPDS_VectorOfListOfPaveBlock& aPBP=myDS->ChangePaveBlocksPool();
- Standard_Integer aNbPBP = aPBP.Extent();
+ Standard_Integer aNbPBP = aPBP.Length();
if(!aNbPBP) {
return;
}
//
UpdateCommonBlocksWithSDVertices();
//
- aNbPBP=aPBP.Extent();
+ aNbPBP=aPBP.Length();
//
for (i=0; i<aNbPBP; ++i) {
BOPDS_ListOfPaveBlock& aLPB=aPBP(i);
aV2=(*(TopoDS_Vertex *)(&myDS->Shape(nV2)));
aV2.Orientation(TopAbs_REVERSED);
//
- BOPAlgo_SplitEdge& aBSE=aVBSE.Append1();
+ BOPAlgo_SplitEdge& aBSE=aVBSE.Appended();
//
aBSE.SetData(aE, aV1, aT1, aV2, aT2);
aBSE.SetPaveBlock(aPB);
} // for (; aItPB.More(); aItPB.Next()) {
} // for (i=0; i<aNbPBP; ++i) {
//
- aNbVBSE=aVBSE.Extent();
+ aNbVBSE=aVBSE.Length();
//======================================================
BOPAlgo_SplitEdgeCnt::Perform(myRunParallel, aVBSE, myContext);
//======================================================
// 1. Process Common Blocks
const BOPDS_VectorOfFaceInfo& aFIP=myDS->FaceInfoPool();
//
- aNbFI=aFIP.Extent();
+ aNbFI=aFIP.Length();
for (i=0; i<aNbFI; ++i) {
const BOPDS_FaceInfo& aFI=aFIP(i);
nF1=aFI.Index();
nE=aPB->Edge();
const TopoDS_Edge& aE=(*(TopoDS_Edge *)(&myDS->Shape(nE)));
//
- BOPAlgo_MPC& aMPC=aVMPC.Append1();
+ BOPAlgo_MPC& aMPC=aVMPC.Appended();
aMPC.SetEdge(aE);
aMPC.SetFace(aF1F);
aMPC.SetProgressIndicator(myProgressIndicator);
continue;
}
//
- BOPAlgo_MPC& aMPC=aVMPC.Append1();
+ BOPAlgo_MPC& aMPC=aVMPC.Appended();
//
aItLPB.Initialize(aLPB);
for(; aItLPB.More(); aItLPB.Next()) {
// container to remember already added edge-face pairs
BOPDS_MapOfPair anEFPairs;
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
- aNbFF=aFFs.Extent();
+ aNbFF=aFFs.Length();
for (i=0; i<aNbFF; ++i) {
const BOPDS_InterfFF& aFF=aFFs(i);
const BOPDS_VectorOfCurve& aVNC = aFF.Curves();
- aNbC = aVNC.Extent();
+ aNbC = aVNC.Length();
if (aNbC == 0)
continue;
Standard_Integer nF[2];
{
if (bPCurveOnS[m] && anEFPairs.Add(BOPDS_Pair(nE, nF[m])))
{
- BOPAlgo_MPC& aMPC = aVMPC.Append1();
+ BOPAlgo_MPC& aMPC = aVMPC.Appended();
aMPC.SetEdge(aE);
aMPC.SetFace(aFf[m]);
aMPC.SetFlag(Standard_True);
//======================================================
// Add warnings of the failed projections and update edges with new pcurves
- Standard_Integer aNb = aVMPC.Extent();
+ Standard_Integer aNb = aVMPC.Length();
for (i = 0; i < aNb; ++i)
{
const BOPAlgo_MPC& aMPC = aVMPC(i);
Standard_Boolean bIsBasedOnPlane;
Standard_Integer i, aNb, n1, nF, aNbF;
TopExp_Explorer aExp;
- BOPCol_IndexedMapOfShape aMF;
+ TopTools_IndexedMapOfShape aMF;
//
aNb=3;
for(i=0; i<aNb; ++i) {
aExp.Init(aF, aType[1]);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE=*((TopoDS_Edge *)&aExp.Current());
- BOPAlgo_BPC& aBPC=aVBPC.Append1();
+ BOPAlgo_BPC& aBPC=aVBPC.Appended();
aBPC.SetEdge(aE);
aBPC.SetFace(aF);
}
// pcurves are built, and now update edges
BRep_Builder aBB;
TopoDS_Edge E;
- for (i = 0; i < aVBPC.Extent(); i++) {
+ for (i = 0; i < aVBPC.Length(); i++) {
const BOPAlgo_BPC& aBPC=aVBPC(i);
if (aBPC.IsToUpdate()) {
Standard_Real aTolE = BRep_Tool::Tolerance(aBPC.GetEdge());
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
-#include <BOPCol_ListOfInteger.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntTools_Context.hxx>
#include <Precision.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
Standard_Integer nF, aNb, nE, nV, nVSD, aNbPB;
Handle(NCollection_BaseAllocator) aAllocator;
Handle(BOPDS_PaveBlock) aPBD;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
//
// 1. Find degnerated edges
//-----------------------------------------------------scope f
#include <Bnd_Box.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_SectionAttribute.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_Curve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ShapeInfo.hxx>
+#include <BOPTools_Parallel.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_ShrunkRange.hxx>
+#include <NCollection_Vector.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
};
//
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_ShrunkRange> BOPAlgo_VectorOfShrunkRange;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_ShrunkRange,
BOPAlgo_VectorOfShrunkRange,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_ShrunkRangeFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_ShrunkRangeFunctor,
BOPAlgo_VectorOfShrunkRange,
Handle(IntTools_Context)> BOPAlgo_ShrunkRangeCnt;
Standard_Integer i, nS[2], nE, nV1, nV2, aNbVSD, k;
Standard_Real aT1, aT2;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
- BOPCol_MapOfInteger aMI;
+ TColStd_MapOfInteger aMI;
BOPAlgo_VectorOfShrunkRange aVSD;
TopAbs_ShapeEnum aType[2] = { aType1, aType2 };
//
const TopoDS_Vertex& aV2=
(*(TopoDS_Vertex *)(&myDS->Shape(nV2)));
//
- BOPAlgo_ShrunkRange& aSD=aVSD.Append1();
+ BOPAlgo_ShrunkRange& aSD=aVSD.Appended();
//
aSD.SetPaveBlock(aPB);
aSD.SetData(aE, aT1, aT2, aV1, aV2);
}
}
//
- aNbVSD=aVSD.Extent();
+ aNbVSD=aVSD.Length();
//=============================================================
BOPAlgo_ShrunkRangeCnt::Perform(myRunParallel, aVSD, myContext);
//=============================================================
// commercial license or contractual agreement.
-#include <BOPAlgo_BuilderSolid.hxx>
-#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Section.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
+#include <BOPAlgo_BuilderSolid.hxx>
+#include <BOPAlgo_PaveFiller.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfFaceInfo.hxx>
#include <BOPDS_VectorOfListOfPaveBlock.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopAbs_ShapeEnum.hxx>
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
-//
-//
//=======================================================================
//function :
//purpose :
TopoDS_Shape aRC, aRC1;
BRep_Builder aBB;
TopExp_Explorer aExp;
- BOPCol_ListOfShape aLSA, aLS;
- BOPCol_ListIteratorOfListOfShape aIt, aItIm, aItLS;
- BOPCol_IndexedDataMapOfShapeInteger aMSI(100, myAllocator);
- BOPCol_IndexedMapOfShape aMS(100, myAllocator);
- BOPCol_MapOfShape aMFence(100, myAllocator);
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TopTools_ListOfShape aLSA, aLS;
+ TopTools_ListIteratorOfListOfShape aIt, aItIm, aItLS;
+ NCollection_IndexedDataMap<TopoDS_Shape,
+ Standard_Integer,
+ TopTools_ShapeMapHasher> aMSI(100, myAllocator);
+ TopTools_IndexedMapOfShape aMS(100, myAllocator);
+ TopTools_MapOfShape aMFence(100, myAllocator);
+ TColStd_MapIteratorOfMapOfInteger aItMI;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
//
GetReport()->Clear();
const BOPDS_FaceInfo& aFI=myDS->FaceInfo(i);
//
// 1.1 Vertices that are section vertices
- const BOPCol_MapOfInteger& aMVSc=aFI.VerticesSc();
+ const TColStd_MapOfInteger& aMVSc=aFI.VerticesSc();
aItMI.Initialize(aMVSc);
for(; aItMI.More(); aItMI.Next()) {
nV=aItMI.Key();
}
//
// 1.2 Vertices that are in a face
- const BOPCol_MapOfInteger& aMI=aFI.VerticesIn();
+ const TColStd_MapOfInteger& aMI=aFI.VerticesIn();
aItMI.Initialize(aMI);
for(; aItMI.More(); aItMI.Next()) {
nV=aItMI.Key();
const Handle(BOPDS_PaveBlock)& aPB=aItPB.Value();
Handle(BOPDS_CommonBlock) aCB=myDS->CommonBlock(aPB);
if (!aCB.IsNull()) {
- const BOPCol_ListOfInteger& aLF=aCB->Faces();
+ const TColStd_ListOfInteger& aLF=aCB->Faces();
aNbF=aLF.Extent();
if (aNbF) {
const Handle(BOPDS_PaveBlock)& aPBR=aCB->PaveBlock1();
const TopoDS_Shape& aS=aItLS.Value();
//
if (myImages.IsBound(aS)){
- const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
+ const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
- BOPTools::MapShapes(aSIm, TopAbs_VERTEX, aMS);
- BOPTools::MapShapes(aSIm, TopAbs_EDGE , aMS);
+ TopExp::MapShapes(aSIm, TopAbs_VERTEX, aMS);
+ TopExp::MapShapes(aSIm, TopAbs_EDGE , aMS);
}
}// if (myImages.IsBound(aF)){
else {
- BOPTools::MapShapes(aS, TopAbs_VERTEX, aMS);
- BOPTools::MapShapes(aS, TopAbs_EDGE , aMS);
+ TopExp::MapShapes(aS, TopAbs_VERTEX, aMS);
+ TopExp::MapShapes(aS, TopAbs_EDGE , aMS);
}
}//for (; aItLS.More(); aItLS.Next()) {
//
aMFence.Clear();
//
// 4. Build the result
- BOPCol_IndexedDataMapOfShapeListOfShape aMVE(100, myAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aMVE(100, myAllocator);
//
- BOPTools::MapShapesAndAncestors(aRC1,
+ TopExp::MapShapesAndAncestors(aRC1,
TopAbs_VERTEX,
TopAbs_EDGE,
aMVE);
const TopoDS_Shape& aV=aMSI.FindKey(i);
const Standard_Integer& iCnt=aMSI.FindFromIndex(i);
if (iCnt>1) {
- BOPTools::MapShapesAndAncestors(aV,
+ TopExp::MapShapesAndAncestors(aV,
TopAbs_VERTEX,
TopAbs_EDGE,
aMVE);
aNbMS=aMVE.Extent();
for (i=1; i<=aNbMS; ++i) {
const TopoDS_Shape& aV=aMVE.FindKey(i);
- const BOPCol_ListOfShape& aLE=aMVE.FindFromIndex(i);
+ const TopTools_ListOfShape& aLE=aMVE.FindFromIndex(i);
aNbLE=aLE.Extent();
if (!aNbLE) {
// alone vertices
#include <Standard_Handle.hxx>
#include <BOPAlgo_Builder.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopTools_ListOfShape.hxx>
class BOPAlgo_PaveFiller;
class TopoDS_Shape;
//! Empty constructor
//!
//! protected methods
- Standard_EXPORT BOPAlgo_Section(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_Section(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT virtual void BuildSection();
// Created: Thu Jan 16 08:33:50 2014
#include <BOPAlgo_ShellSplitter.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_MapOfOrientedShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_CoupleOfShape.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <IntTools_Context.hxx>
+#include <NCollection_Vector.hxx>
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//
static
- void MakeShell(const BOPCol_ListOfShape& ,
+ void MakeShell(const TopTools_ListOfShape& ,
TopoDS_Shell& );
//
static
void RefineShell(TopoDS_Shell& theShell,
- const BOPCol_IndexedDataMapOfShapeListOfShape& theMEF,
- BOPCol_ListOfShape& aLShX);
+ const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
+ TopTools_ListOfShape& aLShX);
//=======================================================================
//class : BOPAlgo_CBK
BOPTools_ConnexityBlock *myPCB;
};
//=======================================================================
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_CBK> BOPAlgo_VectorOfCBK;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_CBK,
BOPAlgo_VectorOfCBK> BOPAlgo_CBKFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_CBKFunctor,
BOPAlgo_VectorOfCBK> BOPAlgo_CBKCnt;
//
//function : StartElements
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& BOPAlgo_ShellSplitter::StartElements()const
+const TopTools_ListOfShape& BOPAlgo_ShellSplitter::StartElements()const
{
return myStartShapes;
}
//function : Loops
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& BOPAlgo_ShellSplitter::Shells()const
+const TopTools_ListOfShape& BOPAlgo_ShellSplitter::Shells()const
{
return myShells;
}
BRep_Builder aBB;
TopoDS_Iterator aItS;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aItF;
+ TopTools_ListIteratorOfListOfShape aItF;
BOPTools_CoupleOfShape aCSOff;
- BOPCol_MapOfOrientedShape AddedFacesMap;
- BOPCol_IndexedDataMapOfShapeListOfShape aEFMap, aMEFP;
+ TopTools_MapOfOrientedShape AddedFacesMap;
+ TopTools_IndexedDataMapOfShapeListOfShape aEFMap, aMEFP;
Handle (IntTools_Context) aContext;
//
aContext=new IntTools_Context;
//
- const BOPCol_ListOfShape& myShapes=aCB.Shapes();
+ const TopTools_ListOfShape& myShapes=aCB.Shapes();
//
- BOPCol_ListOfShape& myLoops=aCB.ChangeLoops();
+ TopTools_ListOfShape& myLoops=aCB.ChangeLoops();
myLoops.Clear();
//
// Copy faces into the map, for recursive search of free bounds
- BOPCol_MapOfOrientedShape aMFaces;
+ TopTools_MapOfOrientedShape aMFaces;
aItF.Initialize (myShapes);
for (; aItF.More(); aItF.Next()) {
aMFaces.Add(aItF.Value());
for (; aItF.More(); aItF.Next()) {
const TopoDS_Shape& aF = aItF.Value();
if (aMFaces.Contains(aF)) {
- BOPTools::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
+ TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aEFMap);
}
}
//
for (i = 1; i <= aNbE; ++i) {
const TopoDS_Edge& aE = TopoDS::Edge(aEFMap.FindKey(i));
if (!(BRep_Tool::Degenerated(aE) || aE.Orientation() == TopAbs_INTERNAL)) {
- const BOPCol_ListOfShape& aLF = aEFMap(i);
+ const TopTools_ListOfShape& aLF = aEFMap(i);
if (aLF.Extent() == 1) {
// remove the face
aMFaces.Remove(aLF.First());
}
//
// use only connected faces
- BOPCol_ListOfShape aLFConnected;
+ TopTools_ListOfShape aLFConnected;
aItF.Initialize (myShapes);
for (; aItF.More(); aItF.Next()) {
const TopoDS_Shape& aF = aItF.Value();
aBB.MakeShell(aShellStart);
aBB.Add(aShellStart, aFF);
//
- BOPCol_ListOfShape aLShells;
+ TopTools_ListOfShape aLShells;
aLShells.Append(aShellStart);
//
- BOPCol_ListIteratorOfListOfShape aItLShells(aLShells);
+ TopTools_ListIteratorOfListOfShape aItLShells(aLShells);
for (; aItLShells.More(); aItLShells.Next()) {
TopoDS_Shell& aShell = TopoDS::Shell(aItLShells.ChangeValue());
//
aMEFP.Clear();
- BOPTools::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP);
+ TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP);
//
// loop on faces added to Shell;
// add their neighbor faces to Shell and so on
//
// proceed only free edges in this shell
if (aMEFP.Contains(aE)) {
- const BOPCol_ListOfShape& aLFP = aMEFP.FindFromKey(aE);
+ const TopTools_ListOfShape& aLFP = aMEFP.FindFromKey(aE);
aNbFP = aLFP.Extent();
if (aNbFP > 1) {
continue;
}
//
// candidate faces list
- const BOPCol_ListOfShape& aLF = aEFMap.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF = aEFMap.FindFromKey(aE);
aNbLF = aLF.Extent();
if (!aNbLF) {
continue;
// take only not-processed faces as a candidates
BOPTools_ListOfCoupleOfShape aLCSOff;
//
- BOPCol_ListIteratorOfListOfShape aItLF(aLF);
+ TopTools_ListIteratorOfListOfShape aItLF(aLF);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Face& aFL = (*(TopoDS_Face*)(&aItLF.Value()));
if (aF.IsSame(aFL) || AddedFacesMap.Contains(aFL)) {
//
if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
aBB.Add(aShell, aSelF);
- BOPTools::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
+ TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
}
} // for (; aExp.More(); aExp.Next()) {
} // for (; aItS.More(); aItS.Next()) {
//
// split the shell on multi-connected edges
- BOPCol_ListOfShape aLShSp;
+ TopTools_ListOfShape aLShSp;
RefineShell(aShell, aMEFP, aLShSp);
//
// collect the not closed shells for further processing
- BOPCol_ListOfShape aLShNC;
+ TopTools_ListOfShape aLShNC;
//
- BOPCol_ListIteratorOfListOfShape aItLShSp(aLShSp);
+ TopTools_ListIteratorOfListOfShape aItLShSp(aLShSp);
for (; aItLShSp.More(); aItLShSp.Next()) {
TopoDS_Shell& aShSp = *((TopoDS_Shell*)&aItLShSp.Value());
//
// remove th faces of not closed shells from the map of processed faces
// and try to rebuild the shells using all not processed faces,
// because faces of one shell might be needed for building the other
- BOPCol_ListIteratorOfListOfShape aItLShNC(aLShNC);
+ TopTools_ListIteratorOfListOfShape aItLShNC(aLShNC);
for (; aItLShNC.More(); aItLShNC.Next()) {
TopoDS_Iterator aItNC(aItLShNC.Value());
for (; aItNC.More(); aItNC.Next()) {
//purpose :
//=======================================================================
void RefineShell(TopoDS_Shell& theShell,
- const BOPCol_IndexedDataMapOfShapeListOfShape& theMEF,
- BOPCol_ListOfShape& theLShSp)
+ const TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
+ TopTools_ListOfShape& theLShSp)
{
TopoDS_Iterator aIt(theShell);
if(!aIt.More()) {
//
// Find edges with more than 2 adjacent faces - branch edges -
// edges on which the input shell should be split
- BOPCol_MapOfShape aMEStop;
+ TopTools_MapOfShape aMEStop;
//
Standard_Integer i, aNbMEF = theMEF.Extent();
for (i = 1; i <= aNbMEF; ++i) {
const TopoDS_Edge& aE = TopoDS::Edge(theMEF.FindKey(i));
- const BOPCol_ListOfShape& aLF = theMEF(i);
+ const TopTools_ListOfShape& aLF = theMEF(i);
if (aLF.Extent() > 2) {
aMEStop.Add(aE);
continue;
// check for internal edges - count faces, in which the edge
// is internal, twice
Standard_Integer aNbF = 0;
- BOPCol_ListIteratorOfListOfShape aItLF(aLF);
+ TopTools_ListIteratorOfListOfShape aItLF(aLF);
for (; aItLF.More() && aNbF <= 2; aItLF.Next()) {
const TopoDS_Face& aF = TopoDS::Face(aItLF.Value());
++aNbF;
//
TopoDS_Builder aBB;
TopExp_Explorer aExp;
- BOPCol_IndexedMapOfShape aMFB;
- BOPCol_MapOfOrientedShape aMFProcessed;
- BOPCol_ListOfShape aLFP, aLFP1;
- BOPCol_ListIteratorOfListOfShape aItLF, aItLFP;
+ TopTools_IndexedMapOfShape aMFB;
+ TopTools_MapOfOrientedShape aMFProcessed;
+ TopTools_ListOfShape aLFP, aLFP1;
+ TopTools_ListIteratorOfListOfShape aItLF, aItLFP;
//
// The first Face
for (; aIt.More(); aIt.Next()) {
continue;
}
//
- const BOPCol_ListOfShape& aLF = theMEF.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF = theMEF.FindFromKey(aE);
//
aItLF.Initialize(aLF);
for (; aItLF.More(); aItLF.Next()) {
Standard_Boolean bIsRegular;
Standard_Integer aNbVCBK, k;
BOPTools_ListIteratorOfListOfConnexityBlock aItCB;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
BOPAlgo_VectorOfCBK aVCBK;
//
myShells.Clear();
if (bIsRegular) {
TopoDS_Shell aShell;
//
- const BOPCol_ListOfShape& aLF=aCB.Shapes();
+ const TopTools_ListOfShape& aLF=aCB.Shapes();
MakeShell(aLF, aShell);
aShell.Closed(Standard_True);
myShells.Append(aShell);
}
else {
- BOPAlgo_CBK& aCBK=aVCBK.Append1();
+ BOPAlgo_CBK& aCBK=aVCBK.Appended();
aCBK.SetConnexityBlock(aCB);
}
}
//
- aNbVCBK=aVCBK.Extent();
+ aNbVCBK=aVCBK.Length();
//===================================================
BOPAlgo_CBKCnt::Perform(myRunParallel, aVCBK);
//===================================================
for (k=0; k<aNbVCBK; ++k) {
BOPAlgo_CBK& aCBK=aVCBK(k);
const BOPTools_ConnexityBlock& aCB=aCBK.ConnexityBlock();
- const BOPCol_ListOfShape& aLS=aCB.Loops();
+ const TopTools_ListOfShape& aLS=aCB.Loops();
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape& aShell=aIt.ChangeValue();
//function : MakeShell
//purpose :
//=======================================================================
-void MakeShell(const BOPCol_ListOfShape& aLS,
+void MakeShell(const TopTools_ListOfShape& aLS,
TopoDS_Shell& aShell)
{
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aBB.MakeShell(aShell);
//
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPTools_ListOfConnexityBlock.hxx>
#include <BOPAlgo_Algo.hxx>
-#include <BOPCol_BaseAllocator.hxx>
#include <BOPTools_ConnexityBlock.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <TopTools_ListOfShape.hxx>
class TopoDS_Shape;
Standard_EXPORT virtual ~BOPAlgo_ShellSplitter();
//! constructor
- Standard_EXPORT BOPAlgo_ShellSplitter(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_ShellSplitter(const Handle(NCollection_BaseAllocator)& theAllocator);
//! adds a face <theS> to process
Standard_EXPORT void AddStartElement (const TopoDS_Shape& theS);
//! return the faces to process
- Standard_EXPORT const BOPCol_ListOfShape& StartElements() const;
+ Standard_EXPORT const TopTools_ListOfShape& StartElements() const;
//! performs the algorithm
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
//! returns the loops
- Standard_EXPORT const BOPCol_ListOfShape& Shells() const;
+ Standard_EXPORT const TopTools_ListOfShape& Shells() const;
Standard_EXPORT static void SplitBlock (BOPTools_ConnexityBlock& theCB);
Standard_EXPORT void MakeShells();
- BOPCol_ListOfShape myStartShapes;
- BOPCol_ListOfShape myShells;
+ TopTools_ListOfShape myStartShapes;
+ TopTools_ListOfShape myShells;
BOPTools_ListOfConnexityBlock myLCB;
private:
}
//
// prepare shapes for intersection
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
//
- BOPCol_ListIteratorOfListOfShape aItLS(myArguments);
+ TopTools_ListIteratorOfListOfShape aItLS(myArguments);
for (; aItLS.More(); aItLS.Next()) {
aLS.Append(aItLS.Value());
}
Standard_EXPORT BOPAlgo_Splitter();
Standard_EXPORT virtual ~BOPAlgo_Splitter();
- Standard_EXPORT BOPAlgo_Splitter(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Performs the operation
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
#include <BOPAlgo_Tools.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Circ.hxx>
-#include <gp_Elips.hxx>
-#include <gp_Hypr.hxx>
-#include <gp_Parab.hxx>
-
-#include <Standard_ErrorHandler.hxx>
-#include <Standard_Failure.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_IndexedMapOfInteger.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
-
-#include <TopExp_Explorer.hxx>
-
-#include <BRepAdaptor_Curve.hxx>
-
-#include <BRepBuilderAPI_MakeFace.hxx>
-
-#include <BRepLib.hxx>
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
-
-#include <BRepBndLib.hxx>
-
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-#include <GeomAPI_ProjectPointOnSurf.hxx>
-
#include <BOPAlgo_Builder.hxx>
#include <BOPAlgo_BuilderFace.hxx>
-
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_PaveBlock.hxx>
-
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
-
-#include <NCollection_UBTreeFiller.hxx>
-#include <NCollection_IncAllocator.hxx>
-
+#include <BOPTools_BoxBndTree.hxx>
+#include <BOPTools_Parallel.hxx>
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepBndLib.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepLib.hxx>
+#include <GeomAPI_ProjectPointOnCurve.hxx>
+#include <GeomAPI_ProjectPointOnSurf.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Elips.hxx>
+#include <gp_Hypr.hxx>
+#include <gp_Parab.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
#include <IntTools_Context.hxx>
+#include <NCollection_IncAllocator.hxx>
+#include <NCollection_UBTreeFiller.hxx>
+#include <NCollection_Vector.hxx>
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+#include <TColStd_IndexedMapOfInteger.hxx>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <algorithm>
<TopoDS_Shape, gp_Pln, TopTools_ShapeMapHasher> BOPAlgo_IndexedDataMapOfShapePln;
static
- void MakeWires(const BOPCol_IndexedMapOfShape& theEdges,
+ void MakeWires(const TopTools_IndexedMapOfShape& theEdges,
TopoDS_Compound& theWires,
const Standard_Boolean theCheckUniquePlane,
BOPAlgo_IndexedDataMapOfShapeDir& theDMEdgeTgt,
- BOPCol_MapOfShape& theMEdgesNoUniquePlane);
+ TopTools_MapOfShape& theMEdgesNoUniquePlane);
static
Standard_Boolean FindPlane(const BRepAdaptor_Curve& theCurve,
Standard_Boolean FindPlane(const TopoDS_Shape& theWire,
gp_Pln& thePlane,
BOPAlgo_IndexedDataMapOfShapeDir& theDMEdgeTgt,
- BOPCol_MapOfShape& theMEdgesNoUniquePlane);
+ TopTools_MapOfShape& theMEdgesNoUniquePlane);
static
Standard_Boolean FindEdgeTangent(const TopoDS_Edge& theEdge,
BOPDS_IndexedDataMapOfPaveBlockListOfInteger& aMPBLI,
const Handle(NCollection_BaseAllocator)& aAllocator)
{
- BOPCol_ListOfInteger *pLI = aMPBLI.ChangeSeek(aPB);
+ TColStd_ListOfInteger *pLI = aMPBLI.ChangeSeek(aPB);
if (!pLI) {
- pLI = &aMPBLI(aMPBLI.Add(aPB, BOPCol_ListOfInteger(aAllocator)));
+ pLI = &aMPBLI(aMPBLI.Add(aPB, TColStd_ListOfInteger(aAllocator)));
}
pLI->Append(nF);
}
// New common block
Handle(BOPDS_CommonBlock) aCB;
// Faces of the common block
- BOPCol_ListOfInteger aLFaces;
+ TColStd_ListOfInteger aLFaces;
// Fence map to avoid duplicates in the list of faces of the common block
- BOPCol_MapOfInteger aMFaces(1, anAllocTmp);
+ TColStd_MapOfInteger aMFaces(1, anAllocTmp);
BOPDS_ListIteratorOfListOfPaveBlock aItLPB(aLPB);
for (; aItLPB.More(); aItLPB.Next())
{
const Handle(BOPDS_CommonBlock)& aCBx = pDS->CommonBlock(aPB);
// Move all faces to the new common block
- BOPCol_ListIteratorOfListOfInteger aItLF(aCBx->Faces());
+ TColStd_ListIteratorOfListOfInteger aItLF(aCBx->Faces());
for (; aItLF.More(); aItLF.Next())
{
const Standard_Integer nF = aItLF.Value();
BOPDS_PDS& pDS)
{
Standard_Integer nF, i, aNb;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
Handle(BOPDS_PaveBlock) aPB;
Handle(BOPDS_CommonBlock) aCB;
//
aCB->AddPaveBlock(aPB);
}
//
- const BOPCol_ListOfInteger& aLI=aMPBLI.FindFromKey(aPB);
- BOPCol_ListOfInteger aNewFaces;
- const BOPCol_ListOfInteger& anOldFaces = aCB->Faces();
+ const TColStd_ListOfInteger& aLI=aMPBLI.FindFromKey(aPB);
+ TColStd_ListOfInteger aNewFaces;
+ const TColStd_ListOfInteger& anOldFaces = aCB->Faces();
aItLI.Initialize(aLI);
for (; aItLI.More(); aItLI.Next()) {
nF=aItLI.Value();
// the both lists aLI and anOldFaces are expected to be short,
// so we can allow to run nested loop here
- BOPCol_ListIteratorOfListOfInteger it(anOldFaces);
+ TColStd_ListIteratorOfListOfInteger it(anOldFaces);
for (; it.More(); it.Next()) {
if (it.Value() == nF)
break;
aTolMax = BRep_Tool::Tolerance(aEOr);
//
const BOPDS_ListOfPaveBlock& aLPB = theCB->PaveBlocks();
- const BOPCol_ListOfInteger& aLFI = theCB->Faces();
+ const TColStd_ListOfInteger& aLFI = theCB->Faces();
//
if ((aLPB.Extent() < 2) && aLFI.IsEmpty()) {
return aTolMax;
if (aLFI.Extent()) {
Standard_Integer nF;
GeomAPI_ProjectPointOnSurf aProjPS;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
//
aItLI.Initialize(aLFI);
for (; aItLI.More(); aItLI.Next()) {
// 1. Check the input edges
//
// List of edges to process
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
//
TopExp_Explorer aExp(theEdges, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
}
else {
aBB.MakeCompound(TopoDS::Compound(aSEdges));
- BOPCol_ListIteratorOfListOfShape aItLE(aLE);
+ TopTools_ListIteratorOfListOfShape aItLE(aLE);
for (; aItLE.More(); aItLE.Next()) {
aBB.Add(aSEdges, aItLE.Value());
}
BOPAlgo_IndexedDataMapOfShapeDir aDMEdgeTgt;
//
// edges for which the plane is not found
- BOPCol_MapOfShape aMEdgesNoUniquePlane;
+ TopTools_MapOfShape aMEdgesNoUniquePlane;
//
// edges for which the plane cannot be found on a single edge
TopoDS_Compound aLEdges;
BOPAlgo_ListOfDir aLPFence;
//
// used edges
- BOPCol_MapOfShape aMEFence;
+ TopTools_MapOfShape aMEFence;
//
// look for a planes on the single edges
Standard_Integer i, j, aNbPlanes = aDMEdgePln.Extent(), aNbEdges = aDMEdgeTgt.Extent();
//
aLPFence.Append(aDI);
//
- BOPCol_IndexedMapOfShape aMEPln;
+ TopTools_IndexedMapOfShape aMEPln;
aMEPln.Add(aEI);
//
- BOPCol_IndexedMapOfShape aMV;
- BOPTools::MapShapes(aEI, TopAbs_VERTEX, aMV);
+ TopTools_IndexedMapOfShape aMV;
+ TopExp::MapShapes(aEI, TopAbs_VERTEX, aMV);
//
// look for other edges with the plane parallel to current one
for (j = i + 1; j <= aNbPlanes; ++j) {
const TopoDS_Shape& aEJ = aDMEdgePln.FindKey(j);
aMEPln.Add(aEJ);
aMEFence.Add(aEJ);
- BOPTools::MapShapes(aEJ, TopAbs_VERTEX, aMV);
+ TopExp::MapShapes(aEJ, TopAbs_VERTEX, aMV);
}
}
//
//
// make blocks of these edges and check blocks to be connected
// to any of the already added edges or forming a wire themselves
- BOPCol_ListOfShape aLCBE;
+ TopTools_ListOfShape aLCBE;
BOPTools_AlgoTools::MakeConnexityBlocks(aCEPln, TopAbs_VERTEX, TopAbs_EDGE, aLCBE);
//
// make wire from each block
- BOPCol_ListIteratorOfListOfShape aItLCB(aLCBE);
+ TopTools_ListIteratorOfListOfShape aItLCB(aLCBE);
for (; aItLCB.More(); aItLCB.Next()) {
const TopoDS_Shape& aCBE = aItLCB.Value();
//
}
//
// make connection map from vertices to edges to find the connected pairs
- BOPCol_IndexedDataMapOfShapeListOfShape aDMVE;
- BOPTools::MapShapesAndAncestors(aLEdges, TopAbs_VERTEX, TopAbs_EDGE, aDMVE);
+ TopTools_IndexedDataMapOfShapeListOfShape aDMVE;
+ TopExp::MapShapesAndAncestors(aLEdges, TopAbs_VERTEX, TopAbs_EDGE, aDMVE);
//
// find planes for connected edges
Standard_Integer aNbV = aDMVE.Extent();
for (i = 1; i <= aNbV; ++i) {
- const BOPCol_ListOfShape& aLEI = aDMVE(i);
+ const TopTools_ListOfShape& aLEI = aDMVE(i);
if (aLEI.Extent() < 2) {
continue;
}
//
- BOPCol_ListIteratorOfListOfShape aItLEI1(aLEI);
+ TopTools_ListIteratorOfListOfShape aItLEI1(aLEI);
for (; aItLEI1.More(); aItLEI1.Next()) {
const TopoDS_Shape& aEI1 = aItLEI1.Value();
const gp_Dir& aDI1 = aDMEdgeTgt.FindFromKey(aEI1);
//
- BOPCol_ListIteratorOfListOfShape aItLEI2(aLEI);
+ TopTools_ListIteratorOfListOfShape aItLEI2(aLEI);
for (; aItLEI2.More(); aItLEI2.Next()) {
const TopoDS_Shape& aEI2 = aItLEI2.Value();
if (aEI2.IsSame(aEI1)) {
aLPFence.Append(aDNI);
//
// find all other edges in the plane parallel to current one
- BOPCol_IndexedMapOfShape aMEPln;
+ TopTools_IndexedMapOfShape aMEPln;
aMEPln.Add(aEI1);
aMEPln.Add(aEI2);
//
} // for (i = 1; i < aNb; ++i) {
//
// 4. Find unused edges and make wires from them
- BOPCol_IndexedMapOfShape aMEAlone, aMEUsed;
- BOPTools::MapShapes(aRWires, TopAbs_EDGE, aMEUsed);
+ TopTools_IndexedMapOfShape aMEAlone, aMEUsed;
+ TopExp::MapShapes(aRWires, TopAbs_EDGE, aMEUsed);
//
for (i = 1; i <= aNbEdges; ++i) {
const TopoDS_Shape& aE = aDMEdgeTgt.FindKey(i);
const Standard_Real theAngTol)
{
BRep_Builder aBB;
- BOPCol_MapOfShape aMFence;
+ TopTools_MapOfShape aMFence;
TopoDS_Compound aRFaces;
aBB.MakeCompound(aRFaces);
//
// map to store the tolerance for the wire
NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> aDMWireTol;
// edges for which the plane is not found
- BOPCol_MapOfShape aMEdgesNoUniquePlane;
+ TopTools_MapOfShape aMEdgesNoUniquePlane;
//
// Find planes for the wires
TopExp_Explorer aExpW(theWires, TopAbs_WIRE);
//
const gp_Pln& aPlnI = aDMWirePln(i);
//
- BOPCol_ListOfShape aLW;
+ TopTools_ListOfShape aLW;
aLW.Append(aWireI);
aMFence.Add(aWireI);
//
}
//
// Take the edges to build the face
- BOPCol_ListOfShape aLE;
- BOPCol_ListIteratorOfListOfShape aItLW(aLW);
+ TopTools_ListOfShape aLE;
+ TopTools_ListIteratorOfListOfShape aItLW(aLW);
for (; aItLW.More(); aItLW.Next()) {
TopoDS_Iterator aItE(aItLW.Value());
for (; aItE.More(); aItE.Next()) {
continue;
}
//
- const BOPCol_ListOfShape& aLFSp = aBF.Areas();
- BOPCol_ListIteratorOfListOfShape aItLF(aLFSp);
+ const TopTools_ListOfShape& aLFSp = aBF.Areas();
+ TopTools_ListIteratorOfListOfShape aItLF(aLFSp);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Shape& aFSp = aItLF.ChangeValue();
aBB.Add(aRFaces, aFSp);
}
//
// fix tolerances of the resulting faces
- BOPCol_IndexedMapOfShape aMEmpty;
+ TopTools_IndexedMapOfShape aMEmpty;
BOPTools_AlgoTools::CorrectTolerances(aRFaces, aMEmpty, 0.05, Standard_False);
BOPTools_AlgoTools::CorrectShapeTolerances(aRFaces, aMEmpty, Standard_False);
//
//function : MakeWires
//purpose : Makes wires from the separate blocks of the given edges
//=======================================================================
-void MakeWires(const BOPCol_IndexedMapOfShape& theEdges,
+void MakeWires(const TopTools_IndexedMapOfShape& theEdges,
TopoDS_Compound& theWires,
const Standard_Boolean theCheckUniquePlane,
BOPAlgo_IndexedDataMapOfShapeDir& theDMEdgeTgt,
- BOPCol_MapOfShape& theMEdgesNoUniquePlane)
+ TopTools_MapOfShape& theMEdgesNoUniquePlane)
{
TopoDS_Compound aCE;
BRep_Builder().MakeCompound(aCE);
BRep_Builder().Add(aCE, theEdges(i));
}
//
- BOPCol_ListOfShape aLCBE;
+ TopTools_ListOfShape aLCBE;
BOPTools_AlgoTools::MakeConnexityBlocks(aCE, TopAbs_VERTEX, TopAbs_EDGE, aLCBE);
//
// make wire from each block
- BOPCol_ListIteratorOfListOfShape aItLCB(aLCBE);
+ TopTools_ListIteratorOfListOfShape aItLCB(aLCBE);
for (; aItLCB.More(); aItLCB.Next()) {
const TopoDS_Shape& aCBE = aItLCB.Value();
//
Standard_Boolean FindPlane(const TopoDS_Shape& theWire,
gp_Pln& thePlane,
BOPAlgo_IndexedDataMapOfShapeDir& theDMEdgeTgt,
- BOPCol_MapOfShape& theMEdgesNoUniquePlane)
+ TopTools_MapOfShape& theMEdgesNoUniquePlane)
{
TopExp_Explorer aExpE1(theWire, TopAbs_EDGE);
if (!aExpE1.More()) {
//purpose :
//=======================================================================
class BOPAlgo_TNV;
-typedef BOPCol_NCVector
+typedef NCollection_Vector
<BOPAlgo_TNV> BOPAlgo_VectorOfTNV;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPAlgo_TNV,
BOPAlgo_VectorOfTNV> BOPAlgo_TNVFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPAlgo_TNVFunctor,
BOPAlgo_VectorOfTNV> BOPAlgo_TNVCnt;
//=======================================================================
-class BOPAlgo_TNV : public BOPCol_BoxBndTreeSelector{
+class BOPAlgo_TNV : public BOPTools_BoxBndTreeSelector{
public:
BOPAlgo_TNV()
- : BOPCol_BoxBndTreeSelector(),
+ : BOPTools_BoxBndTreeSelector(),
myTol (0.), myFuzzyValue(0.), myTree(NULL), myVecTNV(NULL) {
};
//
return myV;
}
//
- void SetTree(BOPCol_BoxBndTree& aTree) {
+ void SetTree(BOPTools_BoxBndTree& aTree) {
myTree=&aTree;
}
//
aTolSum2 *= aTolSum2;
Standard_Real aD2 = myPnt.SquareDistance(aTNV.Pnt());
if (aD2 < aTolSum2)
- return BOPCol_BoxBndTreeSelector::Accept(theIndex);
+ return BOPTools_BoxBndTreeSelector::Accept(theIndex);
return Standard_False;
}
//
Standard_Real myFuzzyValue;
gp_Pnt myPnt;
TopoDS_Vertex myV;
- BOPCol_BoxBndTree *myTree;
+ BOPTools_BoxBndTree *myTree;
const BOPAlgo_VectorOfTNV *myVecTNV;
};
//
//function : IntersectVertices
//purpose : Builds the chains of intersecting vertices
//=======================================================================
-void BOPAlgo_Tools::IntersectVertices(const BOPCol_IndexedDataMapOfShapeReal& theVertices,
+void BOPAlgo_Tools::IntersectVertices(const TopTools_IndexedDataMapOfShapeReal& theVertices,
const Standard_Boolean theRunParallel,
const Standard_Real theFuzzyValue,
- BOPCol_ListOfListOfShape& theChains)
+ TopTools_ListOfListOfShape& theChains)
{
Standard_Integer i, j, aNbV = theVertices.Extent();
if (aNbV <= 1) {
if (aNbV == 1) {
- theChains.Append(BOPCol_ListOfShape()).Append(theVertices.FindKey(1));
+ theChains.Append(TopTools_ListOfShape()).Append(theVertices.FindKey(1));
}
return;
}
//
// Use unbalanced binary tree of bounding boxes for sorting of the vertices.
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer,
Bnd_Box> aTreeFiller(aBBTree);
// Perform intersection of the vertices
//
aTreeFiller.Add(i, aBox);
//
- BOPAlgo_TNV& aTNV=aVTNV.Append1();
+ BOPAlgo_TNV& aTNV=aVTNV.Appended();
aTNV.SetTree(aBBTree);
aTNV.SetBox(aBox);
aTNV.SetVertex(aV);
BOPAlgo_TNVCnt::Perform(theRunParallel, aVTNV);
//
// Fence map
- BOPCol_MapOfInteger aMFence;
+ TColStd_MapOfInteger aMFence;
// Build chains of intersecting vertices
for (i = 1; i <= aNbV; ++i) {
if (!aMFence.Add(i)) {
continue;
}
// Start the chain
- BOPCol_IndexedMapOfInteger aMChain;
+ TColStd_IndexedMapOfInteger aMChain;
aMChain.Add(i);
//
for (j = 1; j <= aMChain.Extent(); ++j) {
BOPAlgo_TNV& aTNV = aVTNV(aMChain(j) - 1);
- const BOPCol_ListOfInteger& aLI = aTNV.Indices();
+ const TColStd_ListOfInteger& aLI = aTNV.Indices();
// Add these vertices into the chain
- for (BOPCol_ListIteratorOfListOfInteger aItLI(aLI); aItLI.More(); aItLI.Next()) {
+ for (TColStd_ListIteratorOfListOfInteger aItLI(aLI); aItLI.More(); aItLI.Next()) {
if (aMFence.Add(aItLI.Value())) {
aMChain.Add(aItLI.Value());
}
}
//
// Put vertices of the chain into the list
- BOPCol_ListOfShape& aChain = theChains.Append(BOPCol_ListOfShape());
+ TopTools_ListOfShape& aChain = theChains.Append(TopTools_ListOfShape());
//
Standard_Integer aNbVChain = aMChain.Extent();
for (j = 1; j <= aNbVChain; ++j) {
//purpose :
//=======================================================================
void BOPAlgo_Tools::TreatCompound(const TopoDS_Shape& theS,
- BOPCol_MapOfShape& aMFence,
- BOPCol_ListOfShape& theLS)
+ TopTools_MapOfShape& aMFence,
+ TopTools_ListOfShape& theLS)
{
TopAbs_ShapeEnum aType = theS.ShapeType();
if (aType != TopAbs_COMPOUND)
Bnd_Box myBox;
};
// Vector of ShapeBox
-typedef BOPCol_NCVector<BOPAlgo_ShapeBox> BOPAlgo_VectorOfShapeBox;
+typedef NCollection_Vector<BOPAlgo_ShapeBox> BOPAlgo_VectorOfShapeBox;
//=======================================================================
//class : BOPAlgo_FillIn3DParts
};
//! Sets own INTERNAL faces of the solid
- void SetOwnIF(const BOPCol_ListOfShape& theLIF)
+ void SetOwnIF(const TopTools_ListOfShape& theLIF)
{
myOwnIF = theLIF;
};
//! Returns own INTERNAL faces of the solid
- const BOPCol_ListOfShape& OwnIF() const
+ const TopTools_ListOfShape& OwnIF() const
{
return myOwnIF;
};
//! Sets the Bounding Box tree
- void SetBBTree(const BOPCol_BoxBndTree& theBBTree)
+ void SetBBTree(const BOPTools_BoxBndTree& theBBTree)
{
- myBBTree = (BOPCol_BoxBndTree*)&theBBTree;
+ myBBTree = (BOPTools_BoxBndTree*)&theBBTree;
};
//! Sets the ShapeBox structure
virtual void Perform();
//! Returns the faces classified as IN for solid
- const BOPCol_ListOfShape& InFaces() const
+ const TopTools_ListOfShape& InFaces() const
{
return myInFaces;
};
//! Prepares Edge-Face connection map of the given shape
void MapEdgesAndFaces(const TopoDS_Shape& theF,
- BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
+ TopTools_IndexedDataMapOfShapeListOfShape& theEFMap,
const Handle(NCollection_BaseAllocator)& theAlloc);
//! Makes the connexity block of faces using the connection map
void MakeConnexityBlock(const TopoDS_Face& theF,
- const BOPCol_IndexedMapOfShape& theMEToAvoid,
- const BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
- BOPCol_MapOfShape& theMFDone,
- BOPCol_ListOfShape& theLCB,
+ const TopTools_IndexedMapOfShape& theMEToAvoid,
+ const TopTools_IndexedDataMapOfShapeListOfShape& theEFMap,
+ TopTools_MapOfShape& theMFDone,
+ TopTools_ListOfShape& theLCB,
TopoDS_Face& theFaceToClassify);
TopoDS_Solid mySolid; //! Solid
Bnd_Box myBoxS; // Bounding box of the solid
- BOPCol_ListOfShape myOwnIF; //! Own INTERNAL faces of the solid
- BOPCol_ListOfShape myInFaces; //! Faces classified as IN
+ TopTools_ListOfShape myOwnIF; //! Own INTERNAL faces of the solid
+ TopTools_ListOfShape myInFaces; //! Faces classified as IN
- BOPCol_BoxBndTree* myBBTree; //! UB tree of bounding boxes
+ BOPTools_BoxBndTree* myBBTree; //! UB tree of bounding boxes
BOPAlgo_VectorOfShapeBox* myVShapeBox; //! ShapeBoxMap
TopoDS_Iterator myItF; //! Iterators
myInFaces.Clear();
// 1. Select boxes of faces that are not out of aBoxS
- BOPCol_BoxBndTreeSelector aSelector;
+ BOPTools_BoxBndTreeSelector aSelector;
aSelector.SetBox(myBoxS);
//
if (!myBBTree->Select(aSelector))
return;
- const BOPCol_ListOfInteger& aLIFP = aSelector.Indices();
+ const TColStd_ListOfInteger& aLIFP = aSelector.Indices();
// 2. Fill maps of edges and faces of the solid
BOPAlgo_VectorOfShapeBox& aVShapeBox = *myVShapeBox;
- BOPCol_IndexedMapOfShape aMSE(1, anAlloc), aMSF(1, anAlloc);
- BOPTools::MapShapes(mySolid, TopAbs_EDGE, aMSE);
- BOPTools::MapShapes(mySolid, TopAbs_FACE, aMSF);
+ TopTools_IndexedMapOfShape aMSE(1, anAlloc), aMSF(1, anAlloc);
+ TopExp::MapShapes(mySolid, TopAbs_EDGE, aMSE);
+ TopExp::MapShapes(mySolid, TopAbs_FACE, aMSF);
// Check if the Solid contains any faces
Standard_Boolean bIsEmpty = aMSF.IsEmpty();
// Add own internal faces of the solid into aMSF
- BOPCol_ListIteratorOfListOfShape aItLS(myOwnIF);
+ TopTools_ListIteratorOfListOfShape aItLS(myOwnIF);
for (; aItLS.More(); aItLS.Next())
aMSF.Add(aItLS.Value());
// 3. aIVec - faces to process.
// Filter the selected faces with faces of the solid.
- BOPCol_NCVector<Standard_Integer> aIVec(256, anAlloc);
+ NCollection_Vector<Standard_Integer> aIVec(256, anAlloc);
- BOPCol_ListIteratorOfListOfInteger aItLI(aLIFP);
+ TColStd_ListIteratorOfListOfInteger aItLI(aLIFP);
for (; aItLI.More(); aItLI.Next()) {
Standard_Integer nFP = aItLI.Value();
const TopoDS_Shape& aFP = aVShapeBox(nFP).Shape();
if (!aMSF.Contains(aFP))
- aIVec.Append1() = nFP;
+ aIVec.Appended() = nFP;
}
// 4. Classify faces relatively solid.
// Store faces that are IN mySolid into <myInFaces>
- Standard_Integer k, aNbFP = aIVec.Extent();
+ Standard_Integer k, aNbFP = aIVec.Length();
// Sort indices if necessary
if (aNbFP > 1)
std::sort(aIVec.begin(), aIVec.end());
}
// Prepare EF map of faces to process for building connexity blocks
- BOPCol_IndexedDataMapOfShapeListOfShape aMEFP(1, anAlloc);
+ TopTools_IndexedDataMapOfShapeListOfShape aMEFP(1, anAlloc);
if (aNbFP > 1)
{
for (k = 0; k < aNbFP; ++k)
// Map of Edge-Face connection, necessary for solid classification.
// It will be filled when first classification is performed.
- BOPCol_IndexedDataMapOfShapeListOfShape aMEFDS(1, anAlloc);
+ TopTools_IndexedDataMapOfShapeListOfShape aMEFDS(1, anAlloc);
// Fence map to avoid processing of the same faces twice
- BOPCol_MapOfShape aMFDone(1, anAlloc);
+ TopTools_MapOfShape aMFDone(1, anAlloc);
for (k = 0; k < aNbFP; ++k)
{
// Make connexity blocks of faces, avoiding passing through the
// borders of the solid. It helps to reduce significantly the
// number of classified faces.
- BOPCol_ListOfShape aLCBF(anAlloc);
+ TopTools_ListOfShape aLCBF(anAlloc);
// The most appropriate face for classification
TopoDS_Face aFaceToClassify;
MakeConnexityBlock(aFP, aMSE, aMEFP, aMFDone, aLCBF, aFaceToClassify);
if (aMEFDS.IsEmpty())
// Fill EF map for Solid
- BOPTools::MapShapesAndAncestors(mySolid, TopAbs_EDGE, TopAbs_FACE, aMEFDS);
+ TopExp::MapShapesAndAncestors(mySolid, TopAbs_EDGE, TopAbs_FACE, aMEFDS);
// All vertices are interfere with the solids box, run classification.
Standard_Boolean bIsIN = BOPTools_AlgoTools::IsInternalFace
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MapEdgesAndFaces(const TopoDS_Shape& theF,
- BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
+ TopTools_IndexedDataMapOfShapeListOfShape& theEFMap,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
myItF.Initialize(theF);
{
const TopoDS_Shape& aE = myItW.Value();
- BOPCol_ListOfShape* pLF = theEFMap.ChangeSeek(aE);
+ TopTools_ListOfShape* pLF = theEFMap.ChangeSeek(aE);
if (!pLF)
- pLF = &theEFMap(theEFMap.Add(aE, BOPCol_ListOfShape(theAllocator)));
+ pLF = &theEFMap(theEFMap.Add(aE, TopTools_ListOfShape(theAllocator)));
pLF->Append(theF);
}
}
// purpose:
//=======================================================================
void BOPAlgo_FillIn3DParts::MakeConnexityBlock(const TopoDS_Face& theFStart,
- const BOPCol_IndexedMapOfShape& theMEAvoid,
- const BOPCol_IndexedDataMapOfShapeListOfShape& theEFMap,
- BOPCol_MapOfShape& theMFDone,
- BOPCol_ListOfShape& theLCB,
+ const TopTools_IndexedMapOfShape& theMEAvoid,
+ const TopTools_IndexedDataMapOfShapeListOfShape& theEFMap,
+ TopTools_MapOfShape& theMFDone,
+ TopTools_ListOfShape& theLCB,
TopoDS_Face& theFaceToClassify)
{
// Add start element
if (theEFMap.IsEmpty())
return;
- BOPCol_ListIteratorOfListOfShape aItCB(theLCB);
+ TopTools_ListIteratorOfListOfShape aItCB(theLCB);
for (; aItCB.More(); aItCB.Next())
{
const TopoDS_Shape& aF = aItCB.Value();
continue;
}
- const BOPCol_ListOfShape* pLF = theEFMap.Seek(aE);
+ const TopTools_ListOfShape* pLF = theEFMap.Seek(aE);
if (!pLF)
continue;
- BOPCol_ListIteratorOfListOfShape aItLF(*pLF);
+ TopTools_ListIteratorOfListOfShape aItLF(*pLF);
for (; aItLF.More(); aItLF.Next())
{
const TopoDS_Shape& aFToAdd = aItLF.Value();
}
// Vector of solid classifiers
-typedef BOPCol_NCVector<BOPAlgo_FillIn3DParts> BOPAlgo_VectorOfFillIn3DParts;
+typedef NCollection_Vector<BOPAlgo_FillIn3DParts> BOPAlgo_VectorOfFillIn3DParts;
// Functors to perform classification
-typedef BOPCol_ContextFunctor<BOPAlgo_FillIn3DParts,
- BOPAlgo_VectorOfFillIn3DParts,
- Handle(IntTools_Context),
- IntTools_Context> BOPCol_FillIn3DPartsFunctor;
+typedef BOPTools_ContextFunctor<BOPAlgo_FillIn3DParts,
+ BOPAlgo_VectorOfFillIn3DParts,
+ Handle(IntTools_Context),
+ IntTools_Context> BOPAlgo_FillIn3DPartsFunctor;
-typedef BOPCol_ContextCnt<BOPCol_FillIn3DPartsFunctor,
- BOPAlgo_VectorOfFillIn3DParts,
- Handle(IntTools_Context)> BOPAlgo_FillIn3DPartsCnt;
+typedef BOPTools_ContextCnt<BOPAlgo_FillIn3DPartsFunctor,
+ BOPAlgo_VectorOfFillIn3DParts,
+ Handle(IntTools_Context)> BOPAlgo_FillIn3DPartsCnt;
//=======================================================================
//function : ClassifyFaces
//purpose :
//=======================================================================
-void BOPAlgo_Tools::ClassifyFaces(const BOPCol_ListOfShape& theFaces,
- const BOPCol_ListOfShape& theSolids,
+void BOPAlgo_Tools::ClassifyFaces(const TopTools_ListOfShape& theFaces,
+ const TopTools_ListOfShape& theSolids,
const Standard_Boolean theRunParallel,
Handle(IntTools_Context)& theContext,
- BOPCol_IndexedDataMapOfShapeListOfShape& theInParts,
- const BOPCol_DataMapOfShapeBox& theShapeBoxMap,
- const BOPCol_DataMapOfShapeListOfShape& theSolidsIF)
+ TopTools_IndexedDataMapOfShapeListOfShape& theInParts,
+ const TopTools_DataMapOfShapeBox& theShapeBoxMap,
+ const TopTools_DataMapOfShapeListOfShape& theSolidsIF)
{
Handle(NCollection_BaseAllocator) anAlloc = new NCollection_IncAllocator;
// Fill the vector of shape box with faces and its bounding boxes
BOPAlgo_VectorOfShapeBox aVSB(256, anAlloc);
- BOPCol_ListIteratorOfListOfShape aItLF(theFaces);
+ TopTools_ListIteratorOfListOfShape aItLF(theFaces);
for (; aItLF.More(); aItLF.Next())
{
const TopoDS_Shape& aF = aItLF.Value();
// Append face to the vector of shape box
- BOPAlgo_ShapeBox& aSB = aVSB.Append1();
+ BOPAlgo_ShapeBox& aSB = aVSB.Appended();
aSB.SetShape(aF);
// Get bounding box for the face
// Prepare UB tree of bounding boxes of the faces to classify
// taking the bounding boxes from the just prepared vector
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
- Standard_Integer aNbF = aVSB.Extent();
+ Standard_Integer aNbF = aVSB.Length();
for (Standard_Integer i = 0; i < aNbF; ++i)
{
aTreeFiller.Add(i, aVSB(i).Box());
// Prepare vector of solids to classify
BOPAlgo_VectorOfFillIn3DParts aVFIP;
- BOPCol_ListIteratorOfListOfShape aItLS(theSolids);
+ TopTools_ListIteratorOfListOfShape aItLS(theSolids);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Solid& aSolid = TopoDS::Solid(aItLS.Value());
// Append solid to the vector
- BOPAlgo_FillIn3DParts& aFIP = aVFIP.Append1();
+ BOPAlgo_FillIn3DParts& aFIP = aVFIP.Appended();
aFIP.SetSolid(aSolid);
// Get bounding box for the solid
aFIP.SetBoxS(aBox);
}
- const BOPCol_ListOfShape* pLIF = theSolidsIF.Seek(aSolid);
+ const TopTools_ListOfShape* pLIF = theSolidsIF.Seek(aSolid);
if (pLIF)
aFIP.SetOwnIF(*pLIF);
// Analyze the results and fill the resulting map
- Standard_Integer aNbS = aVFIP.Extent();
+ Standard_Integer aNbS = aVFIP.Length();
for (Standard_Integer i = 0; i < aNbS; ++i)
{
BOPAlgo_FillIn3DParts& aFIP = aVFIP(i);
const TopoDS_Shape& aS = aFIP.Solid();
- const BOPCol_ListOfShape& aLFIn = aFIP.InFaces();
+ const TopTools_ListOfShape& aLFIn = aFIP.InFaces();
theInParts.Add(aS, aLFIn);
}
}
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_DataMapOfShapeBox.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeReal.hxx>
-#include <BOPCol_ListOfListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
#include <BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx>
#include <BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock.hxx>
#include <BOPDS_PDS.hxx>
-
+#include <NCollection_BaseAllocator.hxx>
+#include <TopTools_DataMapOfShapeBox.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeReal.hxx>
+#include <TopTools_ListOfListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <Standard_Integer.hxx>
class BOPDS_PaveBlock;
class IntTools_Context;
class TopoDS_Shape;
+//! Provides tools used in the intersection part of Boolean operations
class BOPAlgo_Tools
{
public:
template <class theType, class theTypeHasher>
static void MakeBlocks(const NCollection_IndexedDataMap<theType, NCollection_List<theType>, theTypeHasher>& theMILI,
NCollection_List<NCollection_List<theType>>& theMBlocks,
- const BOPCol_BaseAllocator& theAllocator)
+ const Handle(NCollection_BaseAllocator)& theAllocator)
{
NCollection_Map<theType, theTypeHasher> aMFence;
Standard_Integer i, aNb = theMILI.Extent();
static void FillMap(const theType& n1,
const theType& n2,
NCollection_IndexedDataMap<theType, NCollection_List<theType>, theTypeHasher>& theMILI,
- const BOPCol_BaseAllocator& theAllocator)
+ const Handle(NCollection_BaseAllocator)& theAllocator)
{
NCollection_List<theType> *pList1 = theMILI.ChangeSeek(n1);
if (!pList1) {
Standard_EXPORT static void FillMap(const Handle(BOPDS_PaveBlock)& thePB1,
const Standard_Integer theF,
BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMILI,
- const BOPCol_BaseAllocator& theAllocator);
+ const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT static void PerformCommonBlocks(BOPDS_IndexedDataMapOfPaveBlockListOfPaveBlock& theMBlocks,
- const BOPCol_BaseAllocator& theAllocator,
+ const Handle(NCollection_BaseAllocator)& theAllocator,
BOPDS_PDS& theDS);
Standard_EXPORT static void PerformCommonBlocks(const BOPDS_IndexedDataMapOfPaveBlockListOfInteger& theMBlocks,
- const BOPCol_BaseAllocator& theAllocator,
+ const Handle(NCollection_BaseAllocator)& theAllocator,
BOPDS_PDS& pDS);
Standard_EXPORT static Standard_Real ComputeToleranceOfCB
const Standard_Real theAngTol = 1.e-8);
//! Finds chains of intersecting vertices
- Standard_EXPORT static void IntersectVertices(const BOPCol_IndexedDataMapOfShapeReal& theVertices,
+ Standard_EXPORT static void IntersectVertices(const TopTools_IndexedDataMapOfShapeReal& theVertices,
const Standard_Boolean theRunParallel,
const Standard_Real theFuzzyValue,
- BOPCol_ListOfListOfShape& theChains);
+ TopTools_ListOfListOfShape& theChains);
//! Collect in the output list recursively all non-compound subshapes of the first level
//! of the given shape theS. If a shape presents in the map theMFence it is skipped.
//! All shapes put in the output are also added into theMFence.
Standard_EXPORT static void TreatCompound(const TopoDS_Shape& theS,
- BOPCol_MapOfShape& theMFence,
- BOPCol_ListOfShape& theLS);
+ TopTools_MapOfShape& theMFence,
+ TopTools_ListOfShape& theLS);
//! Classifies the faces <theFaces> relatively solids <theSolids>.
//! The IN faces for solids are stored into output data map <theInParts>.
//! It is assumed that all faces and solids are already intersected and
//! do not have any geometrically coinciding parts without topological
//! sharing of these parts
- Standard_EXPORT static void ClassifyFaces(const BOPCol_ListOfShape& theFaces,
- const BOPCol_ListOfShape& theSolids,
+ Standard_EXPORT static void ClassifyFaces(const TopTools_ListOfShape& theFaces,
+ const TopTools_ListOfShape& theSolids,
const Standard_Boolean theRunParallel,
Handle(IntTools_Context)& theContext,
- BOPCol_IndexedDataMapOfShapeListOfShape& theInParts,
- const BOPCol_DataMapOfShapeBox& theShapeBoxMap = BOPCol_DataMapOfShapeBox(),
- const BOPCol_DataMapOfShapeListOfShape& theSolidsIF = BOPCol_DataMapOfShapeListOfShape());
+ TopTools_IndexedDataMapOfShapeListOfShape& theInParts,
+ const TopTools_DataMapOfShapeBox& theShapeBoxMap = TopTools_DataMapOfShapeBox(),
+ const TopTools_DataMapOfShapeListOfShape& theSolidsIF = TopTools_DataMapOfShapeListOfShape());
};
//function : SetTools
//purpose :
//=======================================================================
-void BOPAlgo_ToolsProvider::SetTools(const BOPCol_ListOfShape& theShapes)
+void BOPAlgo_ToolsProvider::SetTools(const TopTools_ListOfShape& theShapes)
{
myTools.Clear();
- BOPCol_ListIteratorOfListOfShape aIt(theShapes);
+ TopTools_ListIteratorOfListOfShape aIt(theShapes);
for (; aIt.More(); aIt.Next())
AddTool(aIt.Value());
}
//! Empty constructor
Standard_EXPORT BOPAlgo_ToolsProvider();
- Standard_EXPORT BOPAlgo_ToolsProvider(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_ToolsProvider(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Clears internal fields and arguments
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
Standard_EXPORT virtual void AddTool(const TopoDS_Shape& theShape);
//! Adds the Tool arguments of the operation
- Standard_EXPORT virtual void SetTools(const BOPCol_ListOfShape& theShapes);
+ Standard_EXPORT virtual void SetTools(const TopTools_ListOfShape& theShapes);
//! Returns the Tool arguments of the operation
- const BOPCol_ListOfShape& Tools() const
+ const TopTools_ListOfShape& Tools() const
{
return myTools;
}
protected:
- BOPCol_ListOfShape myTools;
- BOPCol_MapOfShape myMapTools;
+ TopTools_ListOfShape myTools;
+ TopTools_MapOfShape myMapTools;
};
#endif // _BOPAlgo_ToolsProvider_HeaderFile
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopoDS_Face.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <TopTools_ListOfShape.hxx>
class TopoDS_Face;
class TopoDS_Shape;
BOPAlgo_WireEdgeSet();
virtual ~BOPAlgo_WireEdgeSet();
- BOPAlgo_WireEdgeSet(const BOPCol_BaseAllocator& theAllocator);
+ BOPAlgo_WireEdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator);
void Clear();
void AddStartElement (const TopoDS_Shape& sS);
- const BOPCol_ListOfShape& StartElements() const;
+ const TopTools_ListOfShape& StartElements() const;
void AddShape (const TopoDS_Shape& sS);
- const BOPCol_ListOfShape& Shapes() const;
+ const TopTools_ListOfShape& Shapes() const;
TopoDS_Face myFace;
- BOPCol_ListOfShape myStartShapes;
- BOPCol_ListOfShape myShapes;
+ TopTools_ListOfShape myStartShapes;
+ TopTools_ListOfShape myShapes;
private:
//function : StartElements
//purpose :
//=======================================================================
- inline const BOPCol_ListOfShape& BOPAlgo_WireEdgeSet::StartElements()const
+ inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::StartElements()const
{
return myStartShapes;
}
//function : Shapes
//purpose :
//=======================================================================
- inline const BOPCol_ListOfShape& BOPAlgo_WireEdgeSet::Shapes()const
+ inline const TopTools_ListOfShape& BOPAlgo_WireEdgeSet::Shapes()const
{
return myShapes;
}
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
#include <BOPAlgo_Alerts.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
+#include <NCollection_Vector.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function :
Handle(IntTools_Context) myContext;
};
-typedef BOPCol_NCVector<BOPAlgo_WS_ConnexityBlock> \
+typedef NCollection_Vector<BOPAlgo_WS_ConnexityBlock> \
BOPAlgo_VectorOfConnexityBlock;
//
-typedef BOPCol_ContextFunctor
+typedef BOPTools_ContextFunctor
<BOPAlgo_WS_ConnexityBlock,
BOPAlgo_VectorOfConnexityBlock,
Handle(IntTools_Context),
IntTools_Context> BOPAlgo_SplitBlockFunctor;
//
-typedef BOPCol_ContextCnt
+typedef BOPTools_ContextCnt
<BOPAlgo_SplitBlockFunctor,
BOPAlgo_VectorOfConnexityBlock,
Handle(IntTools_Context)> BOPAlgo_SplitBlockCnt;
Standard_Integer aNbVCB, k;
TopoDS_Wire aW;
BOPTools_ListIteratorOfListOfConnexityBlock aItCB;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
BOPAlgo_VectorOfConnexityBlock aVCB;
//
const TopoDS_Face& aF=myWES->Face();
BOPTools_ConnexityBlock& aCB=aItCB.ChangeValue();
bIsRegular=aCB.IsRegular();
if (bIsRegular) {
- BOPCol_ListOfShape& aLE=aCB.ChangeShapes();
+ TopTools_ListOfShape& aLE=aCB.ChangeShapes();
BOPAlgo_WireSplitter::MakeWire(aLE, aW);
myWES->AddShape(aW);
}
else {
- BOPAlgo_WS_ConnexityBlock& aWSCB = aVCB.Append1();
+ BOPAlgo_WS_ConnexityBlock& aWSCB = aVCB.Appended();
aWSCB.SetFace(aF);
aWSCB.SetConnexityBlock(aCB);
}
//===================================================
BOPAlgo_SplitBlockCnt::Perform(myRunParallel, aVCB, myContext);
//===================================================
- aNbVCB=aVCB.Extent();
+ aNbVCB=aVCB.Length();
for (k=0; k<aNbVCB; ++k) {
const BOPAlgo_WS_ConnexityBlock& aCB=aVCB(k);
- const BOPCol_ListOfShape& aLW=aCB.ConnexityBlock().Loops();
+ const TopTools_ListOfShape& aLW=aCB.ConnexityBlock().Loops();
aIt.Initialize(aLW);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aWx=aIt.Value();
#include <BOPAlgo_PWireEdgeSet.hxx>
#include <BOPTools_ListOfConnexityBlock.hxx>
#include <BOPAlgo_Algo.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPTools_ConnexityBlock.hxx>
#include <IntTools_Context.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <TopTools_ListOfShape.hxx>
class BOPAlgo_WireEdgeSet;
class TopoDS_Wire;
class TopoDS_Face;
Standard_EXPORT BOPAlgo_WireSplitter();
Standard_EXPORT virtual ~BOPAlgo_WireSplitter();
- Standard_EXPORT BOPAlgo_WireSplitter(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPAlgo_WireSplitter(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT void SetWES (const BOPAlgo_WireEdgeSet& theWES);
Standard_EXPORT virtual void Perform() Standard_OVERRIDE;
- static void MakeWire(BOPCol_ListOfShape& theLE, TopoDS_Wire& theW);
+ static void MakeWire(TopTools_ListOfShape& theLE, TopoDS_Wire& theW);
Standard_EXPORT static void SplitBlock (const TopoDS_Face& theF,
BOPTools_ConnexityBlock& theCB,
//function : MakeWire
//purpose :
//=======================================================================
- inline void BOPAlgo_WireSplitter::MakeWire(BOPCol_ListOfShape& aLE,
+ inline void BOPAlgo_WireSplitter::MakeWire(TopTools_ListOfShape& aLE,
TopoDS_Wire& aWire)
{
BRep_Builder aBB;
aBB.MakeWire(aWire);
//
- BOPCol_ListIteratorOfListOfShape aIt(aLE);
+ TopTools_ListIteratorOfListOfShape aIt(aLE);
for (; aIt.More(); aIt.Next()){
aBB.Add(aWire, aIt.Value());
}
#include <BOPAlgo_WireEdgeSet.hxx>
#include <BOPAlgo_WireSplitter.hxx>
-#include <BOPCol_IndexedDataMapOfShapeInteger.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_SequenceOfPnt2d.hxx>
-#include <BOPCol_SequenceOfReal.hxx>
-#include <BOPCol_SequenceOfShape.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ShapeMapHasher.hxx>
#include <Geom2dLProp_CLProps2d.hxx>
+#include <TColgp_SequenceOfPnt2d.hxx>
+#include <TColStd_SequenceOfReal.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_SequenceOfShape.hxx>
+
typedef NCollection_DataMap \
<TopoDS_Shape, Standard_Boolean, TopTools_ShapeMapHasher> \
- BOPCol_DataMapOfShapeBoolean;
+ MyDataMapOfShapeBoolean;
//
static
const TopoDS_Vertex& aVa,
const TopoDS_Edge& aEOuta,
BOPAlgo_EdgeInfo& anEdgeInfo,
- BOPCol_SequenceOfShape& aLS,
- BOPCol_SequenceOfShape& aVertVa,
- BOPCol_SequenceOfPnt2d& aCoordVa,
+ TopTools_SequenceOfShape& aLS,
+ TopTools_SequenceOfShape& aVertVa,
+ TColgp_SequenceOfPnt2d& aCoordVa,
BOPTools_ConnexityBlock& aCB,
BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo& mySmartMap,
- BOPCol_DataMapOfShapeBoolean aVertMap);
+ MyDataMapOfShapeBoolean aVertMap);
static
Standard_Real Angle (const gp_Dir2d& aDir2D);
static
void RefineAngles(const TopoDS_Face& myFace,
- const BOPCol_ListOfShape&,
+ const TopTools_ListOfShape&,
BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo&,
const Handle(IntTools_Context)&);
static
void RefineAngles(const TopoDS_Vertex& ,
const TopoDS_Face& ,
- const BOPCol_MapOfShape& ,
+ const TopTools_MapOfShape& ,
BOPAlgo_ListOfEdgeInfo&,
const Handle(IntTools_Context)&);
TopoDS_Iterator aItS;
TopoDS_Vertex aVV;
TopoDS_Shape aV1;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
BOPAlgo_ListIteratorOfListOfEdgeInfo aItLEI;
//
BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo mySmartMap(100);
- BOPCol_DataMapOfShapeBoolean aVertMap;
+ MyDataMapOfShapeBoolean aVertMap;
//
- const BOPCol_ListOfShape& myEdges=aCB.Shapes();
+ const TopTools_ListOfShape& myEdges=aCB.Shapes();
//
// 1.Filling mySmartMap
aIt.Initialize(myEdges);
Standard_Integer aNbE, aNbMapEE;
Standard_Boolean bFlag;
//
- BOPCol_IndexedDataMapOfShapeListOfShape aMapEE(100);
+ TopTools_IndexedDataMapOfShapeListOfShape aMapEE(100);
aNbE=myEdges.Extent();
//
aIt.Initialize(myEdges);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE = aIt.Value();
if (!aMapEE.Contains(aE)) {
- BOPCol_ListOfShape aLEx;
+ TopTools_ListOfShape aLEx;
aLEx.Append(aE);
aMapEE.Add(aE, aLEx);
}
else {
- BOPCol_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE);
+ TopTools_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE);
aLEx.Append(aE);
}
}
bFlag=Standard_True;
aNbMapEE=aMapEE.Extent();
for (i=1; i<=aNbMapEE; ++i) {
- const BOPCol_ListOfShape& aLEx=aMapEE(i);
+ const TopTools_ListOfShape& aLEx=aMapEE(i);
aNbE=aLEx.Extent();
if (aNbE==1) {// usual case
continue;
if (bNothingToDo) {
TopoDS_Wire aW;
//
- BOPCol_ListOfShape& aLECB=aCB.ChangeShapes();
+ TopTools_ListOfShape& aLECB=aCB.ChangeShapes();
BOPAlgo_WireSplitter::MakeWire(aLECB, aW);
- BOPCol_ListOfShape& aLoops=aCB.ChangeLoops();
+ TopTools_ListOfShape& aLoops=aCB.ChangeLoops();
aLoops.Append(aW);
//
return;
// 4. Do
//
Standard_Boolean bIsOut, bIsNotPassed;
- BOPCol_SequenceOfShape aLS, aVertVa;
- BOPCol_SequenceOfPnt2d aCoordVa;
+ TopTools_SequenceOfShape aLS, aVertVa;
+ TColgp_SequenceOfPnt2d aCoordVa;
//
for (i=1; i<=aNb; ++i) {
const TopoDS_Vertex& aVa=(*(TopoDS_Vertex *)(&mySmartMap.FindKey(i)));
const TopoDS_Vertex& aVFirst,
const TopoDS_Edge& aEFirst,
BOPAlgo_EdgeInfo& aEIFirst,
- BOPCol_SequenceOfShape& aLS,
- BOPCol_SequenceOfShape& aVertVa,
- BOPCol_SequenceOfPnt2d& aCoordVa,
+ TopTools_SequenceOfShape& aLS,
+ TopTools_SequenceOfShape& aVertVa,
+ TColgp_SequenceOfPnt2d& aCoordVa,
BOPTools_ConnexityBlock& aCB,
BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo& mySmartMap,
- BOPCol_DataMapOfShapeBoolean aVertMap)
-
+ MyDataMapOfShapeBoolean aVertMap)
{
Standard_Integer i, j, aNb, aNbj;
Standard_Real anAngleIn, anAngleOut, anAngle, aMinAngle;
//
bIsClosed = aVertMap.Find(aVb);
{
- BOPCol_ListOfShape aBuf;
+ TopTools_ListOfShape aBuf;
Standard_Boolean bHasEdge = Standard_False;
//
aNb = aLS.Length();
return;
}
//
- BOPCol_SequenceOfShape aLSt, aVertVat;
- BOPCol_SequenceOfPnt2d aCoordVat;
+ TopTools_SequenceOfShape aLSt, aVertVat;
+ TColgp_SequenceOfPnt2d aCoordVat;
//
aVb=(*(TopoDS_Vertex *)(&aVertVa(i)));
//
//purpose :
//=======================================================================
void RefineAngles(const TopoDS_Face& myFace,
- const BOPCol_ListOfShape& myEdges,
+ const TopTools_ListOfShape& myEdges,
BOPAlgo_IndexedDataMapOfShapeListOfEdgeInfo& mySmartMap,
const Handle(IntTools_Context)& theContext)
{
Standard_Integer aNb, i;
- BOPCol_IndexedDataMapOfShapeInteger aMSI;
- BOPCol_MapOfShape aMBE;
- BOPCol_ListIteratorOfListOfShape aIt;
+ NCollection_IndexedDataMap<TopoDS_Shape,
+ Standard_Integer,
+ TopTools_ShapeMapHasher> aMSI;
+ TopTools_MapOfShape aMBE;
+ TopTools_ListIteratorOfListOfShape aIt;
//
// 1. Boundary Edges
aIt.Initialize(myEdges);
//=======================================================================
typedef NCollection_DataMap \
<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> \
- BOPCol_DataMapOfShapeReal;
-typedef BOPCol_DataMapOfShapeReal::Iterator \
- BOPCol_DataMapIteratorOfDataMapOfShapeReal;
+ TopTools_DataMapOfShapeReal;
+typedef TopTools_DataMapOfShapeReal::Iterator \
+ TopTools_DataMapIteratorOfDataMapOfShapeReal;
//
//=======================================================================
//function : RefineAngles
//=======================================================================
void RefineAngles(const TopoDS_Vertex& aV,
const TopoDS_Face& myFace,
- const BOPCol_MapOfShape& aMBE,
+ const TopTools_MapOfShape& aMBE,
BOPAlgo_ListOfEdgeInfo& aLEI,
const Handle(IntTools_Context)& theContext)
{
Standard_Boolean bIsIn, bIsBoundary, bRefined;
Standard_Integer iCntBnd, iCntInt;
Standard_Real aA, aA1, aA2;
- BOPCol_DataMapOfShapeReal aDMSR;
+ TopTools_DataMapOfShapeReal aDMSR;
BOPAlgo_ListIteratorOfListOfEdgeInfo aItLEI;
//
aA1=0.; // angle of outgoing edge
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_BaseAllocator_HeaderFile
-#define BOPCol_BaseAllocator_HeaderFile
-
-#include <NCollection_BaseAllocator.hxx>
-
-typedef Handle(NCollection_BaseAllocator) BOPCol_BaseAllocator;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2012 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <BOPCol_Box2DBndTree.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-BOPCol_Box2DBndTreeSelector::BOPCol_Box2DBndTreeSelector()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-BOPCol_Box2DBndTreeSelector::~BOPCol_Box2DBndTreeSelector()
-{
-}
-//=======================================================================
-//function : Reject
-//purpose :
-//=======================================================================
-Standard_Boolean BOPCol_Box2DBndTreeSelector::Reject
- (const Bnd_Box2d& aBox2D) const
-{
- return myBox2D.IsOut(aBox2D);
-}
-//=======================================================================
-//function : Accept
-//purpose :
-//=======================================================================
-Standard_Boolean BOPCol_Box2DBndTreeSelector::Accept
- (const Standard_Integer& aIndex)
-{
- Standard_Boolean bRet=Standard_False;
- //
- myIndices.Append(aIndex);
- bRet=!bRet;
- //}
- return bRet;
-}
-//=======================================================================
-//function : SetBox
-//purpose :
-//=======================================================================
-void BOPCol_Box2DBndTreeSelector::SetBox(const Bnd_Box2d& aBox2D)
-{
- myBox2D=aBox2D;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void BOPCol_Box2DBndTreeSelector::Clear()
-{
- myIndices.Clear();
-}
-//=======================================================================
-//function : Indices
-//purpose :
-//=======================================================================
-const BOPCol_ListOfInteger& BOPCol_Box2DBndTreeSelector::Indices() const
-{
- return myIndices;
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2012 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_Box2DBndTree_HeaderFile
-#define BOPCol_Box2DBndTree_HeaderFile
-
-#include <NCollection_UBTree.hxx>
-#include <Bnd_Box2d.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-/**
- * The instantiation of the algorithm of unbalanced binary tree
- * of overlapped bounding boxes 2D.
- *
-*/
-typedef NCollection_UBTree <Standard_Integer , Bnd_Box2d> BOPCol_Box2DBndTree;
-
- class BOPCol_Box2DBndTreeSelector : public BOPCol_Box2DBndTree::Selector {
- public:
- Standard_EXPORT BOPCol_Box2DBndTreeSelector();
- Standard_EXPORT virtual Standard_Boolean Reject(const Bnd_Box2d&) const;
- Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &);
- Standard_EXPORT virtual ~BOPCol_Box2DBndTreeSelector();
-
- Standard_EXPORT void Clear();
- Standard_EXPORT void SetBox(const Bnd_Box2d&);
- Standard_EXPORT const BOPCol_ListOfInteger& Indices() const;
-
- protected:
- Bnd_Box2d myBox2D;
- BOPCol_ListOfInteger myIndices;
- };
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <BOPCol_BoxBndTree.hxx>
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-BOPCol_BoxBndTreeSelector::BOPCol_BoxBndTreeSelector()
-{
-}
-//=======================================================================
-//function : ~
-//purpose :
-//=======================================================================
-BOPCol_BoxBndTreeSelector::~BOPCol_BoxBndTreeSelector()
-{
-}
-//=======================================================================
-//function : Reject
-//purpose :
-//=======================================================================
- Standard_Boolean BOPCol_BoxBndTreeSelector::Reject (const Bnd_Box& aBox) const
-{
- return myBox.IsOut(aBox);
-}
-//=======================================================================
-//function : Accept
-//purpose :
-//=======================================================================
-Standard_Boolean BOPCol_BoxBndTreeSelector::Accept (const Standard_Integer& aIndex)
-{
- Standard_Boolean bRet=Standard_False;
- //
- myIndices.Append(aIndex);
- bRet=!bRet;
- return bRet;
-}
-//=======================================================================
-//function : SetBox
-//purpose :
-//=======================================================================
-void BOPCol_BoxBndTreeSelector::SetBox(const Bnd_Box& aBox)
-{
- myBox=aBox;
-}
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void BOPCol_BoxBndTreeSelector::Clear()
-{
- myIndices.Clear();
-}
-//=======================================================================
-//function : Indices
-//purpose :
-//=======================================================================
-const BOPCol_ListOfInteger& BOPCol_BoxBndTreeSelector::Indices() const
-{
- return myIndices;
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef NMTDS_BoxBndTree_HeaderFile
-#define NMTDS_BoxBndTree_HeaderFile
-
-#include <NCollection_UBTree.hxx>
-#include <Bnd_Box.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-/**
- * The instantiation of the algorithm of unbalanced binary tree
- * of overlapped bounding boxes.
- *
-*/
-typedef NCollection_UBTree <Standard_Integer , Bnd_Box> BOPCol_BoxBndTree;
-
- class BOPCol_BoxBndTreeSelector : public BOPCol_BoxBndTree::Selector {
- public:
- Standard_EXPORT BOPCol_BoxBndTreeSelector();
- Standard_EXPORT virtual Standard_Boolean Reject(const Bnd_Box&) const;
- Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &);
- Standard_EXPORT virtual ~BOPCol_BoxBndTreeSelector();
-
- Standard_EXPORT void Clear();
- Standard_EXPORT void SetBox(const Bnd_Box&);
- Standard_EXPORT const BOPCol_ListOfInteger& Indices() const;
-
- protected:
- Bnd_Box myBox;
- BOPCol_ListOfInteger myIndices;
-
- };
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerInteger_HeaderFile
-#define BOPCol_DataMapOfIntegerInteger_HeaderFile
-
-#include <NCollection_DataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, Standard_Integer, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerInteger;
-typedef BOPCol_DataMapOfIntegerInteger::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerListOfInteger_HeaderFile
-#define BOPCol_DataMapOfIntegerListOfInteger_HeaderFile
-
-
-#include <NCollection_DataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, BOPCol_ListOfInteger, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerListOfInteger;
-typedef BOPCol_DataMapOfIntegerListOfInteger::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerListOfShape_HeaderFile
-#define BOPCol_DataMapOfIntegerListOfShape_HeaderFile
-
-#include <NCollection_DataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, BOPCol_ListOfShape, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerListOfShape;
-typedef BOPCol_DataMapOfIntegerListOfShape::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerListOfShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerMapOfInteger_HeaderFile
-#define BOPCol_DataMapOfIntegerMapOfInteger_HeaderFile
-
-
-#include <NCollection_DataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, BOPCol_MapOfInteger, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerMapOfInteger;
-typedef BOPCol_DataMapOfIntegerMapOfInteger::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerMapOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerReal_HeaderFile
-#define BOPCol_DataMapOfIntegerReal_HeaderFile
-
-#include <NCollection_DataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, Standard_Real, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerReal;
-typedef BOPCol_DataMapOfIntegerReal::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerReal;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfIntegerShape_HeaderFile
-#define BOPCol_DataMapOfIntegerShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<Standard_Integer, TopoDS_Shape, TColStd_MapIntegerHasher> BOPCol_DataMapOfIntegerShape;
-typedef BOPCol_DataMapOfIntegerShape::Iterator BOPCol_DataMapIteratorOfDataMapOfIntegerShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeAddress_HeaderFile
-#define BOPCol_DataMapOfShapeAddress_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, Standard_Address, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeAddress;
-typedef BOPCol_DataMapOfShapeAddress::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeAddress;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeBox_HeaderFile
-#define BOPCol_DataMapOfShapeBox_HeaderFile
-
-#include <Bnd_Box.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeBox;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeInteger_HeaderFile
-#define BOPCol_DataMapOfShapeInteger_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, Standard_Integer, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeInteger;
-typedef BOPCol_DataMapOfShapeInteger::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeListOfShape_HeaderFile
-#define BOPCol_DataMapOfShapeListOfShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, BOPCol_ListOfShape, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeListOfShape;
-typedef BOPCol_DataMapOfShapeListOfShape::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeListOfShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeReal_HeaderFile
-#define BOPCol_DataMapOfShapeReal_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeReal;
-typedef BOPCol_DataMapOfShapeReal::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeReal;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfShapeShape_HeaderFile
-#define BOPCol_DataMapOfShapeShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> BOPCol_DataMapOfShapeShape;
-typedef BOPCol_DataMapOfShapeShape::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_DataMapOfTransientAddress_HeaderFile
-#define BOPCol_DataMapOfTransientAddress_HeaderFile
-
-#include <NCollection_DataMap.hxx>
-#include <TColStd_MapTransientHasher.hxx>
-
-typedef NCollection_DataMap<Handle(Standard_Transient), Standard_Address, TColStd_MapTransientHasher> BOPCol_DataMapOfTransientAddress;
-typedef BOPCol_DataMapOfTransientAddress::Iterator BOPCol_DataMapIteratorOfDataMapOfTransientAddress;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfIntegerListOfInteger_HeaderFile
-#define BOPCol_IndexedDataMapOfIntegerListOfInteger_HeaderFile
-
-
-#include <NCollection_IndexedDataMap.hxx>
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-
-typedef NCollection_IndexedDataMap<Standard_Integer, BOPCol_ListOfInteger, TColStd_MapIntegerHasher> BOPCol_IndexedDataMapOfIntegerListOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfShapeBox_HeaderFile
-#define BOPCol_IndexedDataMapOfShapeBox_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <Bnd_Box.hxx>
-
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> BOPCol_IndexedDataMapOfShapeBox;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfShapeInteger_HeaderFile
-#define BOPCol_IndexedDataMapOfShapeInteger_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, Standard_Integer, TopTools_ShapeMapHasher> BOPCol_IndexedDataMapOfShapeInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfShapeListOfShape_HeaderFile
-#define BOPCol_IndexedDataMapOfShapeListOfShape_HeaderFile
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, BOPCol_ListOfShape, TopTools_ShapeMapHasher> BOPCol_IndexedDataMapOfShapeListOfShape;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfShapeReal_HeaderFile
-#define BOPCol_IndexedDataMapOfShapeReal_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> BOPCol_IndexedDataMapOfShapeReal;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 2015 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedDataMapOfShapeShape_HeaderFile
-#define BOPCol_IndexedDataMapOfShapeShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> BOPCol_IndexedDataMapOfShapeShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedMapOfInteger_HeaderFile
-#define BOPCol_IndexedMapOfInteger_HeaderFile
-
-#include <NCollection_IndexedMap.hxx>
-#include <TColStd_MapIntegerHasher.hxx>
-
-typedef NCollection_IndexedMap<Standard_Integer, TColStd_MapIntegerHasher> BOPCol_IndexedMapOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 2015 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedMapOfOrientedShape_HeaderFile
-#define BOPCol_IndexedMapOfOrientedShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_OrientedShapeMapHasher.hxx>
-
-#include <NCollection_IndexedMap.hxx>
-
-typedef NCollection_IndexedMap<TopoDS_Shape, TopTools_OrientedShapeMapHasher> BOPCol_IndexedMapOfOrientedShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_IndexedMapOfShape_HeaderFile
-#define BOPCol_IndexedMapOfShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <NCollection_IndexedMap.hxx>
-
-typedef NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher> BOPCol_IndexedMapOfShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_ListOfInteger_HeaderFile
-#define BOPCol_ListOfInteger_HeaderFile
-
-#include <NCollection_List.hxx>
-
-typedef NCollection_List<Standard_Integer> BOPCol_ListOfInteger;
-typedef BOPCol_ListOfInteger::Iterator BOPCol_ListIteratorOfListOfInteger;
-typedef BOPCol_ListOfInteger* BOPCol_PListOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_ListOfListOfShape_HeaderFile
-#define BOPCol_ListOfListOfShape_HeaderFile
-
-
-#include <NCollection_List.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
-typedef NCollection_List<BOPCol_ListOfShape> BOPCol_ListOfListOfShape;
-typedef BOPCol_ListOfListOfShape::Iterator BOPCol_ListIteratorOfListOfListOfShape;
-
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_ListOfShape_HeaderFile
-#define BOPCol_ListOfShape_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <TopoDS_Shape.hxx>
-
-typedef NCollection_List<TopoDS_Shape> BOPCol_ListOfShape;
-typedef BOPCol_ListOfShape::Iterator BOPCol_ListIteratorOfListOfShape;
-
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_MapOfInteger_HeaderFile
-#define BOPCol_MapOfInteger_HeaderFile
-
-#include <TColStd_MapIntegerHasher.hxx>
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<Standard_Integer, TColStd_MapIntegerHasher> BOPCol_MapOfInteger;
-typedef BOPCol_MapOfInteger::Iterator BOPCol_MapIteratorOfMapOfInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_MapOfOrientedShape_HeaderFile
-#define BOPCol_MapOfOrientedShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_OrientedShapeMapHasher.hxx>
-
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<TopoDS_Shape, TopTools_OrientedShapeMapHasher> BOPCol_MapOfOrientedShape;
-typedef BOPCol_MapOfOrientedShape::Iterator BOPCol_MapIteratorOfMapOfOrientedShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_MapOfShape_HeaderFile
-#define BOPCol_MapOfShape_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-
-#include <NCollection_Map.hxx>
-
-typedef NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> BOPCol_MapOfShape;
-typedef BOPCol_MapOfShape::Iterator BOPCol_MapIteratorOfMapOfShape;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2013 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_NCVector_HeaderFile
-#define BOPCol_NCVector_HeaderFile
-
-#include <Standard.hxx>
-#include <NCollection_Vector.hxx>
-#include <NCollection_BaseAllocator.hxx>
-
-//=======================================================================
-//class : BOPCol_NCVector
-//purpose :
-//=======================================================================
-template <class Type> class BOPCol_NCVector
- :
- public NCollection_Vector<Type>
-{
- public:
- BOPCol_NCVector(const Standard_Integer theIncrement=256,
- const Handle(NCollection_BaseAllocator)& theAlloc = NULL)
- : NCollection_Vector<Type>(theIncrement, theAlloc)
- {}
- //
- Type& Append1 ()
- {
- Type& anAppended = *(Type*)this->expandV (this->myLength);
- return anAppended;
- }
- //
- Standard_Integer Extent() const
- {
- return this->myLength;
- }
-};
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_PInteger_HeaderFile
-#define BOPCol_PInteger_HeaderFile
-
-#include <Standard_TypeDef.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-
-typedef Standard_Integer* BOPCol_PInteger;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_PListOfInteger_HeaderFile
-#define BOPCol_PListOfInteger_HeaderFile
-
-#include <BOPCol_ListOfInteger.hxx>
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2013 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BOPDS_Col_HeaderFile
-#define _BOPDS_Col_HeaderFile
-
-#include <Standard_Macro.hxx>
-#include <Standard_NotImplemented.hxx>
-#include <OSD_Parallel.hxx>
-#include <NCollection_DataMap.hxx>
-#include <Standard_Mutex.hxx>
-#include <OSD_Thread.hxx>
-
-//
-// 1. Implementation of Functors/Starters
-//
-// 1.1. Pure version
-//
-
-//=======================================================================
-//class : BOPCol_Functor
-//purpose :
-//=======================================================================
-template <class TypeSolver, class TypeSolverVector>
-class BOPCol_Functor
-{
-public:
- //! Constructor.
- explicit BOPCol_Functor(TypeSolverVector& theSolverVec)
- : mySolvers(theSolverVec) {}
-
- //! Defines functor interface.
- void operator() (const Standard_Integer theIndex) const
- {
- TypeSolver& aSolver = mySolvers(theIndex);
- aSolver.Perform();
- }
-
-private:
- BOPCol_Functor(const BOPCol_Functor&);
- BOPCol_Functor& operator= (const BOPCol_Functor&);
-
-private:
- TypeSolverVector& mySolvers;
-};
-
-//=======================================================================
-//class : BOPCol_Cnt
-//purpose :
-//=======================================================================
-template <class TypeFunctor, class TypeSolverVector>
-class BOPCol_Cnt
-{
-public:
- static void Perform( const Standard_Boolean isRunParallel,
- TypeSolverVector& theSolverVector )
- {
- TypeFunctor aFunctor(theSolverVector);
- OSD_Parallel::For(0, theSolverVector.Extent(), aFunctor, !isRunParallel);
- }
-};
-
-//
-// 1.2. Context dependent version
-//
-
-//=======================================================================
-//class : BOPCol_ContextFunctor
-//purpose :
-//=======================================================================
-template <class TypeSolver, class TypeSolverVector,
- class TypeContext, typename TN>
-class BOPCol_ContextFunctor
-{
- //! Auxiliary thread ID hasher.
- struct Hasher
- {
- static Standard_Integer HashCode(const Standard_ThreadId theKey,
- const Standard_Integer Upper)
- {
- return ::HashCode((Standard_Size)theKey, Upper);
- }
-
- static Standard_Boolean IsEqual(const Standard_ThreadId theKey1,
- const Standard_ThreadId theKey2)
- {
- return theKey1 == theKey2;
- }
- };
-
- typedef NCollection_DataMap<Standard_ThreadId, TypeContext, Hasher> ContextMap;
-
-public:
-
- //! Constructor
- explicit BOPCol_ContextFunctor( TypeSolverVector& theVector )
- : mySolverVector(theVector) {}
-
- //! Binds main thread context
- void SetContext( TypeContext& theContext )
- {
- myContexts.Bind(OSD_Thread::Current(), theContext);
- }
-
- //! Returns current thread context
- TypeContext& GetThreadContext() const
- {
- const Standard_ThreadId aThreadID = OSD_Thread::Current();
- if ( myContexts.IsBound(aThreadID) )
- {
- TypeContext& aContext = myContexts(aThreadID);
- if ( aContext.IsNull() == Standard_False )
- return aContext;
- }
-
- // Create new context
- TypeContext aContext = new TN
- ( NCollection_BaseAllocator::CommonBaseAllocator() );
-
- Standard_Mutex::Sentry aLocker(myMutex);
- myContexts.Bind(aThreadID, aContext);
-
- return myContexts(aThreadID);
- }
-
- //! Defines functor interface
- void operator()( const Standard_Integer theIndex ) const
- {
- TypeContext& aContext = GetThreadContext();
- TypeSolver& aSolver = mySolverVector(theIndex);
-
- aSolver.SetContext(aContext);
- aSolver.Perform();
- }
-
-private:
- BOPCol_ContextFunctor(const BOPCol_ContextFunctor&);
- BOPCol_ContextFunctor& operator= (const BOPCol_ContextFunctor&);
-
-private:
- TypeSolverVector& mySolverVector;
- mutable ContextMap myContexts;
- mutable Standard_Mutex myMutex;
-};
-
-//=======================================================================
-//class : BOPCol_ContextCnt
-//purpose :
-//=======================================================================
-template <class TypeFunctor, class TypeSolverVector, class TypeContext>
-class BOPCol_ContextCnt
-{
-public:
- static void Perform( const Standard_Boolean isRunParallel,
- TypeSolverVector& theSolverVector,
- TypeContext& theContext )
- {
- TypeFunctor aFunctor(theSolverVector);
- aFunctor.SetContext(theContext);
-
- OSD_Parallel::For(0, theSolverVector.Extent(), aFunctor, !isRunParallel);
- }
-};
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_SequenceOfPnt2d_HeaderFile
-#define BOPCol_SequenceOfPnt2d_HeaderFile
-
-
-#include <NCollection_Sequence.hxx>
-#include <gp_Pnt2d.hxx>
-
-typedef NCollection_Sequence<gp_Pnt2d> BOPCol_SequenceOfPnt2d;
-
-
-#endif
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_SequenceOfReal_HeaderFile
-#define BOPCol_SequenceOfReal_HeaderFile
-
-#include <NCollection_Sequence.hxx>
-#include <Standard_Real.hxx>
-
-typedef NCollection_Sequence<Standard_Real> BOPCol_SequenceOfReal;
-
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPCol_SequenceOfShape_HeaderFile
-#define BOPCol_SequenceOfShape_HeaderFile
-
-#include <NCollection_Sequence.hxx>
-#include <TopoDS_Shape.hxx>
-
-typedef NCollection_Sequence<TopoDS_Shape> BOPCol_SequenceOfShape;
-
-
-#endif
+++ /dev/null
-BOPCol_BaseAllocator.hxx
-BOPCol_Box2DBndTree.cxx
-BOPCol_Box2DBndTree.hxx
-BOPCol_BoxBndTree.cxx
-BOPCol_BoxBndTree.hxx
-BOPCol_DataMapOfIntegerInteger.hxx
-BOPCol_DataMapOfIntegerListOfInteger.hxx
-BOPCol_DataMapOfIntegerListOfShape.hxx
-BOPCol_DataMapOfIntegerMapOfInteger.hxx
-BOPCol_DataMapOfIntegerReal.hxx
-BOPCol_DataMapOfIntegerShape.hxx
-BOPCol_DataMapOfShapeAddress.hxx
-BOPCol_DataMapOfShapeBox.hxx
-BOPCol_DataMapOfShapeInteger.hxx
-BOPCol_DataMapOfShapeListOfShape.hxx
-BOPCol_DataMapOfShapeReal.hxx
-BOPCol_DataMapOfShapeShape.hxx
-BOPCol_DataMapOfTransientAddress.hxx
-BOPCol_IndexedDataMapOfIntegerListOfInteger.hxx
-BOPCol_IndexedDataMapOfShapeBox.hxx
-BOPCol_IndexedDataMapOfShapeInteger.hxx
-BOPCol_IndexedDataMapOfShapeListOfShape.hxx
-BOPCol_IndexedMapOfInteger.hxx
-BOPCol_IndexedMapOfShape.hxx
-BOPCol_IndexedDataMapOfShapeShape.hxx
-BOPCol_IndexedDataMapOfShapeReal.hxx
-BOPCol_IndexedMapOfOrientedShape.hxx
-BOPCol_ListOfInteger.hxx
-BOPCol_ListOfListOfShape.hxx
-BOPCol_ListOfShape.hxx
-BOPCol_MapOfInteger.hxx
-BOPCol_MapOfOrientedShape.hxx
-BOPCol_MapOfShape.hxx
-BOPCol_NCVector.hxx
-BOPCol_Parallel.hxx
-BOPCol_PInteger.hxx
-BOPCol_PListOfInteger.hxx
-BOPCol_SequenceOfPnt2d.hxx
-BOPCol_SequenceOfReal.hxx
-BOPCol_SequenceOfShape.hxx
// function: AddFaces
// purpose:
//=======================================================================
- void BOPDS_CommonBlock::SetFaces(const BOPCol_ListOfInteger& aLF)
+ void BOPDS_CommonBlock::SetFaces(const TColStd_ListOfInteger& aLF)
{
myFaces=aLF;
}
// function: AppendFaces
// purpose:
//=======================================================================
-void BOPDS_CommonBlock::AppendFaces(BOPCol_ListOfInteger& aLF)
+void BOPDS_CommonBlock::AppendFaces(TColStd_ListOfInteger& aLF)
{
myFaces.Append(aLF);
}
// function: Faces
// purpose:
//=======================================================================
- const BOPCol_ListOfInteger& BOPDS_CommonBlock::Faces()const
+ const TColStd_ListOfInteger& BOPDS_CommonBlock::Faces()const
{
return myFaces;
}
{
Standard_Boolean bFound;
Standard_Integer nF;
- BOPCol_ListIteratorOfListOfInteger anIt;
+ TColStd_ListIteratorOfListOfInteger anIt;
//
bFound=Standard_False;
anIt.Initialize(myFaces);
Standard_Boolean BOPDS_CommonBlock::Contains(const Standard_Integer theF)const
{
Standard_Boolean bFound;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
//
bFound=Standard_False;
aIt.Initialize(myFaces);
void BOPDS_CommonBlock::Dump()const
{
Standard_Integer nF;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
//
printf(" -- CB:\n");
#include <Standard_Type.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <Standard_Transient.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <Standard_Integer.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
+#include <Standard_Transient.hxx>
+#include <TColStd_ListOfInteger.hxx>
class BOPDS_PaveBlock;
//! Contructor
//! <theAllocator> - the allocator to manage the memory
- Standard_EXPORT BOPDS_CommonBlock(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_CommonBlock(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Modifier
//! Modifier
//! Sets the list of indices of faces <aLF>
//! of the common block
- Standard_EXPORT void SetFaces (const BOPCol_ListOfInteger& aLF);
+ Standard_EXPORT void SetFaces (const TColStd_ListOfInteger& aLF);
//! Modifier
//! Appends the list of indices of faces <aLF>
//! to the list of indices of faces
//! of the common block (the input list is emptied)
- Standard_EXPORT void AppendFaces(BOPCol_ListOfInteger& aLF);
+ Standard_EXPORT void AppendFaces(TColStd_ListOfInteger& aLF);
//! Selector
//! Selector
//! Returns the list of indices of faces
//! of the common block
- Standard_EXPORT const BOPCol_ListOfInteger& Faces() const;
+ Standard_EXPORT const TColStd_ListOfInteger& Faces() const;
//! Selector
BOPDS_ListOfPaveBlock myPaveBlocks;
- BOPCol_ListOfInteger myFaces;
+ TColStd_ListOfInteger myFaces;
private:
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <IntTools_Curve.hxx>
-#include <BOPDS_ListOfPaveBlock.hxx>
-#include <BOPCol_ListOfInteger.hxx>
#include <Bnd_Box.hxx>
+#include <BOPDS_ListOfPaveBlock.hxx>
+#include <IntTools_Curve.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
+#include <TColStd_ListOfInteger.hxx>
class IntTools_Curve;
class Bnd_Box;
class BOPDS_PaveBlock;
//! Contructor
//! <theAllocator> - the allocator to manage the memory
- BOPDS_Curve(const BOPCol_BaseAllocator& theAllocator);
+ BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Modifier
//! Selector
//! Returns list of indices of technologic vertices
//! of the curve
- const BOPCol_ListOfInteger& TechnoVertices() const;
+ const TColStd_ListOfInteger& TechnoVertices() const;
//! Selector/Modifier
//! Returns list of indices of technologic vertices
//! of the curve
- BOPCol_ListOfInteger& ChangeTechnoVertices();
+ TColStd_ListOfInteger& ChangeTechnoVertices();
//! Query
protected:
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
IntTools_Curve myCurve;
BOPDS_ListOfPaveBlock myPaveBlocks;
- BOPCol_ListOfInteger myTechnoVertices;
+ TColStd_ListOfInteger myTechnoVertices;
Bnd_Box myBox;
Standard_Real myTolerance;
//function : TechnoVertices
//purpose :
//=======================================================================
- inline const BOPCol_ListOfInteger& BOPDS_Curve::TechnoVertices()const
+ inline const TColStd_ListOfInteger& BOPDS_Curve::TechnoVertices()const
{
return myTechnoVertices;
}
//function : ChangeTechnoVertices
//purpose :
//=======================================================================
- inline BOPCol_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices()
+ inline TColStd_ListOfInteger& BOPDS_Curve::ChangeTechnoVertices()
{
return myTechnoVertices;
}
#include <Bnd_Box.hxx>
-#include <BOPCol_DataMapOfIntegerMapOfInteger.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPCol_MapOfInteger.hxx>
#include <BOPDS_CommonBlock.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
-
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <algorithm>
//
static
void TotalShapes(const TopoDS_Shape& aS,
Standard_Integer& aNbS,
- BOPCol_MapOfShape& aMS);
+ TopTools_MapOfShape& aMS);
static
Standard_Real ComputeParameter(const TopoDS_Vertex& aV,
//function : SetArguments
//purpose :
//=======================================================================
-void BOPDS_DS::SetArguments(const BOPCol_ListOfShape& theLS)
+void BOPDS_DS::SetArguments(const TopTools_ListOfShape& theLS)
{
myArguments=theLS;
}
//function : Arguments
//purpose :
//=======================================================================
-const BOPCol_ListOfShape& BOPDS_DS::Arguments()const
+const TopTools_ListOfShape& BOPDS_DS::Arguments()const
{
return myArguments;
}
{
Standard_Integer iX;
//
- myLines.Append1()=theSI;
- iX=myLines.Extent()-1;
+ myLines.Appended()=theSI;
+ iX=myLines.Length()-1;
myMapShapeIndex.Bind(theSI.Shape(), iX);
//
return iX;
{
Standard_Integer iX;
//
- myLines.Append1().SetShape(theS);
- iX=myLines.Extent()-1;
+ myLines.Appended().SetShape(theS);
+ iX=myLines.Length()-1;
myMapShapeIndex.Bind(theS, iX);
return iX;
}
Standard_Real aTol, aTolAdd;
TopAbs_ShapeEnum aTS;
TopoDS_Iterator aItS;
- BOPCol_ListIteratorOfListOfInteger aIt1, aIt2, aIt3;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TColStd_ListIteratorOfListOfInteger aIt1, aIt2, aIt3;
+ TopTools_ListIteratorOfListOfShape aIt;
BOPDS_IndexRange aR;
Handle(NCollection_BaseAllocator) aAllocator;
- BOPCol_MapOfShape aMS;
+ TopTools_MapOfShape aMS;
//
// 1 Append Source Shapes
aNb=myArguments.Extent();
BRep_Builder aBB;
BOPDS_ShapeInfo aSIx;
//
- BOPCol_ListOfInteger& aLI=aSI.ChangeSubShapes();
+ TColStd_ListOfInteger& aLI=aSI.ChangeSubShapes();
//
aEx=aE;
aEx.Orientation(TopAbs_FORWARD);
Bnd_Box& aBox=aSI.ChangeBox();
BRepBndLib::Add(aE, aBox);
//
- const BOPCol_ListOfInteger& aLV=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLV=aSI.SubShapes();
aIt1.Initialize(aLV);
for (; aIt1.More(); aIt1.Next()) {
nV=aIt1.Value();
}
}
// 2.3 Face
- BOPCol_MapOfInteger aMI(100, aAllocator);
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TColStd_MapOfInteger aMI(100, aAllocator);
+ TColStd_MapIteratorOfMapOfInteger aItMI;
//
aNbF=0;
for (j=0; j<myNbSourceShapes; ++j) {
Bnd_Box& aBox=aSI.ChangeBox();
BRepBndLib::Add(aS, aBox);
//
- BOPCol_ListOfInteger& aLW=aSI.ChangeSubShapes();
+ TColStd_ListOfInteger& aLW=aSI.ChangeSubShapes();
aIt1.Initialize(aLW);
for (; aIt1.More(); aIt1.Next()) {
nW=aIt1.Value();
BOPDS_ShapeInfo& aSIW=ChangeShapeInfo(nW);
//
- const BOPCol_ListOfInteger& aLE=aSIW.SubShapes();
+ const TColStd_ListOfInteger& aLE=aSIW.SubShapes();
aIt2.Initialize(aLE);
for (; aIt2.More(); aIt2.Next()) {
nE=aIt2.Value();
aSIE.SetFlag(j);
}
//
- const BOPCol_ListOfInteger& aLV=aSIE.SubShapes();
+ const TColStd_ListOfInteger& aLV=aSIE.SubShapes();
aIt3.Initialize(aLV);
for (; aIt3.More(); aIt3.Next()) {
nV=aIt3.Value();
//
// update sub-shapes by BRep comprising ones
aMI.Clear();
- BOPCol_ListOfInteger& aLI1=aSI.ChangeSubShapes();
+ TColStd_ListOfInteger& aLI1=aSI.ChangeSubShapes();
//
aIt1.Initialize(aLI1);
for (; aIt1.More(); aIt1.Next()) {
continue;
}
//
- const BOPCol_ListOfInteger& aLI2=aSI1.SubShapes();
+ const TColStd_ListOfInteger& aLI2=aSI1.SubShapes();
aIt2.Initialize(aLI2);
for (; aIt2.More(); aIt2.Next()) {
n2=aIt2.Value();
//
aMI.Add(n2);
//
- const BOPCol_ListOfInteger& aLI3=aSI2.SubShapes();
+ const TColStd_ListOfInteger& aLI3=aSI2.SubShapes();
aIt3.Initialize(aLI3);
for (; aIt3.More(); aIt3.Next()) {
n3=aIt3.Value();
if (aSI.ShapeType() != TopAbs_EDGE)
continue;
- const BOPCol_ListOfInteger& aLV = aSI.SubShapes();
+ const TColStd_ListOfInteger& aLV = aSI.SubShapes();
aIt1.Initialize(aLV);
for (; aIt1.More(); aIt1.Next())
{
nV = aIt1.Value();
- BOPCol_ListOfInteger* pLE = myMapVE.ChangeSeek(nV);
+ TColStd_ListOfInteger* pLE = myMapVE.ChangeSeek(nV);
if (!pLE) {
- pLE = myMapVE.Bound(nV, BOPCol_ListOfInteger(myAllocator));
+ pLE = myMapVE.Bound(nV, TColStd_ListOfInteger(myAllocator));
pLE->Append(nE);
}
else
{
Standard_Integer aIx;
TopoDS_Iterator aIt;
- BOPCol_ListIteratorOfListOfInteger aIt1;
+ TColStd_ListIteratorOfListOfInteger aIt1;
//
BOPDS_ShapeInfo& aSI=ChangeShapeInfo(aI);
aSI.SetShapeType(aS.ShapeType());
- BOPCol_ListOfInteger& aLI=aSI.ChangeSubShapes();
+ TColStd_ListOfInteger& aLI=aSI.ChangeSubShapes();
//
- BOPCol_MapOfInteger aM;
+ TColStd_MapOfInteger aM;
//
aIt1.Initialize(aLI);
for (; aIt1.More(); aIt1.Next()) {
{
Standard_Boolean bRet;
Standard_Integer n2;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
bRet = Standard_False;
//
const BOPDS_ShapeInfo& aSI=ShapeInfo(theI2);
- const BOPCol_ListOfInteger& aLI=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLI=aSI.SubShapes();
aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) {
n2=aIt.Value();
{
Standard_Boolean bRet;
Standard_Integer n1;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
bRet = Standard_False;
//
const BOPDS_ShapeInfo& aSI=ShapeInfo(theI1);
- const BOPCol_ListOfInteger& aLI=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLI=aSI.SubShapes();
aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) {
n1=aIt.Value();
Standard_Real aT;
TopAbs_Orientation aOrE;
TopoDS_Vertex aV;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
BOPDS_Pave aPave;
Handle(BOPDS_PaveBlock) aPB;
//
const TopoDS_Edge& aE=*(TopoDS_Edge*)(&aSI.Shape());
aOrE=aE.Orientation();
//
- const BOPCol_ListOfInteger& aLV=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLV=aSI.SubShapes();
aNbV=aLV.Extent();
if (!aNbV) {
return;
}
}
//
- BOPDS_ListOfPaveBlock &aLPB=myPaveBlocksPool.Append1();
- iRef=myPaveBlocksPool.Extent()-1;
+ BOPDS_ListOfPaveBlock &aLPB=myPaveBlocksPool.Appended();
+ iRef=myPaveBlocksPool.Length()-1;
//
aPB->Update(aLPB, Standard_False);
aSI.SetReference(iRef);
return;
}
//
- const BOPCol_ListOfInteger& aLF=theCB->Faces();
+ const TColStd_ListOfInteger& aLF=theCB->Faces();
//
BOPDS_VectorOfListOfPaveBlock& aPBP=myPaveBlocksPool;
//
Standard_Integer iRef;
//
BOPDS_ShapeInfo& aSI=ChangeShapeInfo(theI);
- BOPDS_FaceInfo &aFI=myFaceInfoPool.Append1();
- iRef=myFaceInfoPool.Extent()-1;
+ BOPDS_FaceInfo &aFI=myFaceInfoPool.Appended();
+ iRef=myFaceInfoPool.Length()-1;
aSI.SetReference(iRef);
//
aFI.SetIndex(theI);
BOPDS_FaceInfo &aFI=myFaceInfoPool(iRef);
//
BOPDS_IndexedMapOfPaveBlock& aMPBIn=aFI.ChangePaveBlocksIn();
- BOPCol_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
+ TColStd_MapOfInteger& aMVIn=aFI.ChangeVerticesIn();
aMPBIn.Clear();
aMVIn.Clear();
FaceInfoIn(theI, aMPBIn, aMVIn);
BOPDS_FaceInfo &aFI=myFaceInfoPool(iRef);
//
BOPDS_IndexedMapOfPaveBlock& aMPBOn=aFI.ChangePaveBlocksOn();
- BOPCol_MapOfInteger& aMVOn=aFI.ChangeVerticesOn();
+ TColStd_MapOfInteger& aMVOn=aFI.ChangeVerticesOn();
aMPBOn.Clear();
aMVOn.Clear();
FaceInfoOn(theI, aMPBOn, aMVOn);
//=======================================================================
void BOPDS_DS::FaceInfoOn(const Standard_Integer theF,
BOPDS_IndexedMapOfPaveBlock& theMPB,
- BOPCol_MapOfInteger& theMI)
+ TColStd_MapOfInteger& theMI)
{
Standard_Integer nS, nSD, nV1, nV2;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
//
const BOPDS_ShapeInfo& aSI=ShapeInfo(theF);
- const BOPCol_ListOfInteger& aLI=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLI=aSI.SubShapes();
aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) {
nS=aIt.Value();
//=======================================================================
void BOPDS_DS::FaceInfoIn(const Standard_Integer theF,
BOPDS_IndexedMapOfPaveBlock& theMPB,
- BOPCol_MapOfInteger& theMI)
+ TColStd_MapOfInteger& theMI)
{
Standard_Integer i, aNbVF, aNbEF, nV, nE, nVSD;
TopoDS_Iterator aItS;
//
// 2. aVFs
BOPDS_VectorOfInterfVF& aVFs=InterfVF();
- aNbVF=aVFs.Extent();
+ aNbVF=aVFs.Length();
for (i=0; i<aNbVF; ++i) {
BOPDS_InterfVF& aVF=aVFs(i);
if(aVF.Contains(theF)) {
//
// 3. aEFs
BOPDS_VectorOfInterfEF& aEFs=InterfEF();
- aNbEF=aEFs.Extent();
+ aNbEF=aEFs.Length();
for (i=0; i<aNbEF; ++i) {
BOPDS_InterfEF& aEF=aEFs(i);
if(aEF.Contains(theF)) {
Standard_Integer i, aNb, nF, aNbPB, j;
BOPDS_IndexedMapOfPaveBlock aMPB;
//
- aNb=myFaceInfoPool.Extent();
+ aNb=myFaceInfoPool.Length();
for (i=0; i<aNb; ++i) {
BOPDS_FaceInfo &aFI=myFaceInfoPool(i);
nF=aFI.Index();
//purpose :
//=======================================================================
void BOPDS_DS::AloneVertices(const Standard_Integer theI,
- BOPCol_ListOfInteger& theLI)const
+ TColStd_ListOfInteger& theLI)const
{
if (HasFaceInfo(theI)) {
//
Standard_Integer i, j, nV1, nV2, nV, aNbPB;
- BOPCol_MapIteratorOfMapOfInteger aItMI;
+ TColStd_MapIteratorOfMapOfInteger aItMI;
//
- BOPCol_MapOfInteger aMI(100, myAllocator);
+ TColStd_MapOfInteger aMI(100, myAllocator);
//
const BOPDS_FaceInfo& aFI=FaceInfo(theI);
//
}
//
for (i=0; i<2; ++i) {
- const BOPCol_MapOfInteger& aMIV=
+ const TColStd_MapOfInteger& aMIV=
(!i) ? aFI.VerticesIn() : aFI.VerticesSc();
aItMI.Initialize(aMIV);
for (; aItMI.More(); aItMI.Next()) {
void BOPDS_DS::SubShapesOnIn
(const Standard_Integer nF1,
const Standard_Integer nF2,
- BOPCol_MapOfInteger& theMVOnIn,
+ TColStd_MapOfInteger& theMVOnIn,
BOPDS_IndexedMapOfPaveBlock& thePBOnIn,
BOPDS_MapOfPaveBlock& theCommonPB)const
{
Standard_Integer i, j, nV, nV1, nV2, aNbPB;
- BOPCol_MapIteratorOfMapOfInteger aIt;
+ TColStd_MapIteratorOfMapOfInteger aIt;
BOPDS_IndexedMapOfPaveBlock pMPB[4];
//
const BOPDS_FaceInfo& aFI1=FaceInfo(nF1);
}
}
//
- const BOPCol_MapOfInteger& aMVOn1=aFI1.VerticesOn();
- const BOPCol_MapOfInteger& aMVIn1=aFI1.VerticesIn();
- const BOPCol_MapOfInteger& aMVOn2=aFI2.VerticesOn();
- const BOPCol_MapOfInteger& aMVIn2=aFI2.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn();
+ const TColStd_MapOfInteger& aMVOn2=aFI2.VerticesOn();
+ const TColStd_MapOfInteger& aMVIn2=aFI2.VerticesIn();
//
for (i=0; i<2; ++i) {
- const BOPCol_MapOfInteger& aMV1=(!i) ? aMVOn1 : aMVIn1;
+ const TColStd_MapOfInteger& aMV1=(!i) ? aMVOn1 : aMVIn1;
aIt.Initialize(aMV1);
for (; aIt.More(); aIt.Next()) {
nV=aIt.Value();
//=======================================================================
void BOPDS_DS::SharedEdges(const Standard_Integer nF1,
const Standard_Integer nF2,
- BOPCol_ListOfInteger& theLI,
+ TColStd_ListOfInteger& theLI,
const Handle(NCollection_BaseAllocator)& aAllocator)
{
Standard_Integer nE, nSp;
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
- BOPCol_MapOfInteger aMI(100, aAllocator);
+ TColStd_MapOfInteger aMI(100, aAllocator);
//
const BOPDS_ShapeInfo& aSI1=ShapeInfo(nF1);
- const BOPCol_ListOfInteger& aLI1=aSI1.SubShapes();
+ const TColStd_ListOfInteger& aLI1=aSI1.SubShapes();
aItLI.Initialize(aLI1);
for (; aItLI.More(); aItLI.Next()) {
nE=aItLI.Value();
}
//
const BOPDS_ShapeInfo& aSI2=ShapeInfo(nF2);
- const BOPCol_ListOfInteger& aLI2=aSI2.SubShapes();
+ const TColStd_ListOfInteger& aLI2=aSI2.SubShapes();
aItLI.Initialize(aLI2);
for (; aItLI.More(); aItLI.Next()) {
nE=aItLI.Value();
//function : ShapesSD
//purpose :
//=======================================================================
-BOPCol_DataMapOfIntegerInteger& BOPDS_DS::ShapesSD()
+TColStd_DataMapOfIntegerInteger& BOPDS_DS::ShapesSD()
{
return myShapesSD;
}
Standard_Integer nS;
bRet = Standard_False;
//
- BOPCol_ListIteratorOfListOfInteger aItLI;
+ TColStd_ListIteratorOfListOfInteger aItLI;
//
const BOPDS_ShapeInfo& aSI = ShapeInfo(theI2);
- const BOPCol_ListOfInteger& aLI = aSI.SubShapes();
+ const TColStd_ListOfInteger& aLI = aSI.SubShapes();
aItLI.Initialize(aLI);
for(;aItLI.More(); aItLI.Next()) {
nS = aItLI.Value();
Standard_Integer nV;
Standard_Real aTolV;
BRep_Builder aBB;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
//
Standard_Real aTolAdd = Max(theFuzz, Precision::Confusion()) * 0.5;
BRepBndLib::Add(aE, aBoxE);
aBoxE.SetGap(aBoxE.GetGap() + aTolAdd);
//
- const BOPCol_ListOfInteger& aLI = aSIE.SubShapes();
+ const TColStd_ListOfInteger& aLI = aSIE.SubShapes();
aIt.Initialize(aLI);
for (; aIt.More(); aIt.Next()) {
nV = aIt.Value();
//=======================================================================
void TotalShapes(const TopoDS_Shape& aS,
Standard_Integer& aNbS,
- BOPCol_MapOfShape& aMS)
+ TopTools_MapOfShape& aMS)
{
if (aMS.Add(aS)) {
TopoDS_Iterator aIt;
Standard_Boolean bIsOpenBox, bIsInverted;
Standard_Integer nSh, nFc;
Standard_Real aTolS, aTolFc;
- BOPCol_ListIteratorOfListOfInteger aItLI, aItLI1;
+ TColStd_ListIteratorOfListOfInteger aItLI, aItLI1;
//
const BOPDS_ShapeInfo& aSI=ShapeInfo(theIndex);
const TopoDS_Shape& aS=aSI.Shape();
bIsOpenBox=Standard_False;
//
aTolS=0.;
- const BOPCol_ListOfInteger& aLISh=aSI.SubShapes();
+ const TColStd_ListOfInteger& aLISh=aSI.SubShapes();
aItLI.Initialize(aLISh);
for (; aItLI.More(); aItLI.Next()) {
nSh=aItLI.Value();
continue;
}
//
- const BOPCol_ListOfInteger& aLIFc=aSISh.SubShapes();
+ const TColStd_ListOfInteger& aLIFc=aSISh.SubShapes();
aItLI1.Initialize(aLIFc);
for (; aItLI1.More(); aItLI1.Next()) {
nFc=aItLI1.Value();
//=======================================================================
void BOPDS_DS::InitPaveBlocksForVertex(const Standard_Integer theNV)
{
- const BOPCol_ListOfInteger* pLE = myMapVE.Seek(theNV);
+ const TColStd_ListOfInteger* pLE = myMapVE.Seek(theNV);
if (!pLE)
return;
- BOPCol_ListIteratorOfListOfInteger aItLE(*pLE);
+ TColStd_ListIteratorOfListOfInteger aItLE(*pLE);
for (; aItLE.More(); aItLE.Next())
ChangePaveBlocks(aItLE.Value());
}
// of pave blocks will stay to mark the edge as Deleted.
BOPDS_VectorOfListOfPaveBlock& aPBP = ChangePaveBlocksPool();
- Standard_Integer aNbPBP = aPBP.Extent();
+ Standard_Integer aNbPBP = aPBP.Length();
if (!aNbPBP) {
return;
}
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <Standard_Integer.hxx>
-#include <BOPDS_VectorOfIndexRange.hxx>
-#include <BOPDS_VectorOfShapeInfo.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPDS_VectorOfListOfPaveBlock.hxx>
#include <BOPDS_DataMapOfPaveBlockCommonBlock.hxx>
-#include <BOPDS_VectorOfFaceInfo.hxx>
-#include <BOPCol_DataMapOfIntegerInteger.hxx>
-#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
+#include <BOPDS_IndexedMapOfPaveBlock.hxx>
+#include <BOPDS_ListOfPave.hxx>
+#include <BOPDS_ListOfPaveBlock.hxx>
#include <BOPDS_MapOfPair.hxx>
-#include <BOPDS_VectorOfInterfVV.hxx>
-#include <BOPDS_VectorOfInterfVE.hxx>
-#include <BOPDS_VectorOfInterfVF.hxx>
+#include <BOPDS_MapOfPaveBlock.hxx>
+#include <BOPDS_VectorOfFaceInfo.hxx>
+#include <BOPDS_VectorOfIndexRange.hxx>
#include <BOPDS_VectorOfInterfEE.hxx>
#include <BOPDS_VectorOfInterfEF.hxx>
-#include <BOPDS_VectorOfInterfFF.hxx>
-#include <BOPDS_VectorOfInterfVZ.hxx>
#include <BOPDS_VectorOfInterfEZ.hxx>
+#include <BOPDS_VectorOfInterfFF.hxx>
#include <BOPDS_VectorOfInterfFZ.hxx>
+#include <BOPDS_VectorOfInterfVE.hxx>
+#include <BOPDS_VectorOfInterfVF.hxx>
+#include <BOPDS_VectorOfInterfVV.hxx>
+#include <BOPDS_VectorOfInterfVZ.hxx>
#include <BOPDS_VectorOfInterfZZ.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPDS_ListOfPaveBlock.hxx>
-#include <BOPDS_IndexedMapOfPaveBlock.hxx>
-#include <BOPDS_MapOfPaveBlock.hxx>
-#include <BOPCol_MapOfInteger.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <BOPDS_ListOfPave.hxx>
+#include <BOPDS_VectorOfListOfPaveBlock.hxx>
+#include <BOPDS_VectorOfShapeInfo.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Precision.hxx>
+#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
+#include <Standard_Real.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
+#include <TopTools_ListOfShape.hxx>
+
class BOPDS_IndexRange;
class BOPDS_ShapeInfo;
class TopoDS_Shape;
//! Contructor
//! theAllocator - the allocator to manage the memory
- Standard_EXPORT BOPDS_DS(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Clears the contents
//! Selector
- Standard_EXPORT const BOPCol_BaseAllocator& Allocator() const;
+ Standard_EXPORT const Handle(NCollection_BaseAllocator)& Allocator() const;
//! Modifier
//! Sets the arguments [theLS] of an operation
- Standard_EXPORT void SetArguments (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
//! Selector
//! Returns the arguments of an operation
- Standard_EXPORT const BOPCol_ListOfShape& Arguments() const;
+ Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
//! Initializes the data structure for
//! Selector
//! Returns the state On
//! [theMPB,theMVP] of face with index theIndex
- Standard_EXPORT void FaceInfoOn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, BOPCol_MapOfInteger& theMVP);
+ Standard_EXPORT void FaceInfoOn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP);
//! Selector
//! Returns the state In
//! [theMPB,theMVP] of face with index theIndex
- Standard_EXPORT void FaceInfoIn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, BOPCol_MapOfInteger& theMVP);
+ Standard_EXPORT void FaceInfoIn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP);
//! Selector
//! Returns the indices of alone vertices
//! for the face with index theIndex
- Standard_EXPORT void AloneVertices (const Standard_Integer theF, BOPCol_ListOfInteger& theLI) const;
+ Standard_EXPORT void AloneVertices (const Standard_Integer theF, TColStd_ListOfInteger& theLI) const;
//! Refine the state On for the all faces having
//! @param theCommonPB the common pave blocks (that are shared by both faces).
Standard_EXPORT void SubShapesOnIn (const Standard_Integer theF1,
const Standard_Integer theF2,
- BOPCol_MapOfInteger& theMVOnIn,
+ TColStd_MapOfInteger& theMVOnIn,
BOPDS_IndexedMapOfPaveBlock& thePBOnIn,
BOPDS_MapOfPaveBlock& theCommonPB) const;
//! for the faces with indices theF1, theF2
//!
//! same domain shapes
- Standard_EXPORT void SharedEdges (const Standard_Integer theF1, const Standard_Integer theF2, BOPCol_ListOfInteger& theLI, const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT void SharedEdges (const Standard_Integer theF1, const Standard_Integer theF2, TColStd_ListOfInteger& theLI, const Handle(NCollection_BaseAllocator)& theAllocator);
//! Selector
//! Returns the collection same domain shapes
- Standard_EXPORT BOPCol_DataMapOfIntegerInteger& ShapesSD();
+ Standard_EXPORT TColStd_DataMapOfIntegerInteger& ShapesSD();
//! Modifier
const Standard_Real theFuzz);
- BOPCol_BaseAllocator myAllocator;
- BOPCol_ListOfShape myArguments;
+ Handle(NCollection_BaseAllocator) myAllocator;
+ TopTools_ListOfShape myArguments;
Standard_Integer myNbShapes;
Standard_Integer myNbSourceShapes;
BOPDS_VectorOfIndexRange myRanges;
BOPDS_VectorOfShapeInfo myLines;
- BOPCol_DataMapOfShapeInteger myMapShapeIndex;
+ TopTools_DataMapOfShapeInteger myMapShapeIndex;
BOPDS_VectorOfListOfPaveBlock myPaveBlocksPool;
BOPDS_DataMapOfPaveBlockCommonBlock myMapPBCB;
BOPDS_VectorOfFaceInfo myFaceInfoPool;
- BOPCol_DataMapOfIntegerInteger myShapesSD;
- BOPCol_DataMapOfIntegerListOfInteger myMapVE;
+ TColStd_DataMapOfIntegerInteger myShapesSD;
+ TColStd_DataMapOfIntegerListOfInteger myMapVE;
BOPDS_MapOfPair myInterfTB;
BOPDS_VectorOfInterfVV myInterfVV;
BOPDS_VectorOfInterfVE myInterfVE;
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_DataMapOfPassKeyListOfPaveBlock_HeaderFile
-#define BOPDS_DataMapOfPassKeyListOfPaveBlock_HeaderFile
-
-#include <NCollection_DataMap.hxx>
-
-#include <BOPDS_PassKey.hxx>
-#include <BOPDS_PassKeyMapHasher.hxx>
-#include <BOPDS_ListOfPaveBlock.hxx>
-
-typedef NCollection_DataMap<BOPDS_PassKey, BOPDS_ListOfPaveBlock, BOPDS_PassKeyMapHasher> BOPDS_DataMapOfPassKeyListOfPaveBlock;
-typedef BOPDS_DataMapOfPassKeyListOfPaveBlock::Iterator BOPDS_DataMapIteratorOfDataMapOfPassKeyListOfPaveBlock;
-
-#endif
#include <NCollection_DataMap.hxx>
#include <TColStd_MapTransientHasher.hxx>
-#include <BOPCol_ListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
-typedef NCollection_DataMap<Handle(BOPDS_PaveBlock), BOPCol_ListOfInteger, TColStd_MapTransientHasher> BOPDS_DataMapOfPaveBlockListOfInteger;
+typedef NCollection_DataMap<Handle(BOPDS_PaveBlock), TColStd_ListOfInteger, TColStd_MapTransientHasher> BOPDS_DataMapOfPaveBlockListOfInteger;
typedef BOPDS_DataMapOfPaveBlockListOfInteger::Iterator BOPDS_DataMapIteratorOfDataMapOfPaveBlockListOfInteger;
#endif
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <Standard_Integer.hxx>
#include <BOPDS_IndexedMapOfPaveBlock.hxx>
-#include <BOPCol_MapOfInteger.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <Standard_Integer.hxx>
+#include <TColStd_MapOfInteger.hxx>
//! Contructor
//! theAllocator - the allocator to manage the memory
- BOPDS_FaceInfo(const BOPCol_BaseAllocator& theAllocator);
+ BOPDS_FaceInfo(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Clears the contents
//! Returns the list of indices for vertices
//! of the face
//! that have state In
- const BOPCol_MapOfInteger& VerticesIn() const;
+ const TColStd_MapOfInteger& VerticesIn() const;
//! Selector/Modifier
//! that have state In
//!
//! On
- BOPCol_MapOfInteger& ChangeVerticesIn();
+ TColStd_MapOfInteger& ChangeVerticesIn();
//! Selector
//! Returns the list of indices for vertices
//! of the face
//! that have state On
- const BOPCol_MapOfInteger& VerticesOn() const;
+ const TColStd_MapOfInteger& VerticesOn() const;
//! Selector/Modifier
//! that have state On
//!
//! Sections
- BOPCol_MapOfInteger& ChangeVerticesOn();
+ TColStd_MapOfInteger& ChangeVerticesOn();
//! Selector
//! Selector
//! Returns the list of indices for section vertices
//! of the face
- const BOPCol_MapOfInteger& VerticesSc() const;
+ const TColStd_MapOfInteger& VerticesSc() const;
//! Selector/Modifier
//! of the face
//!
//! Others
- BOPCol_MapOfInteger& ChangeVerticesSc();
+ TColStd_MapOfInteger& ChangeVerticesSc();
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
Standard_Integer myIndex;
BOPDS_IndexedMapOfPaveBlock myPaveBlocksIn;
- BOPCol_MapOfInteger myVerticesIn;
+ TColStd_MapOfInteger myVerticesIn;
BOPDS_IndexedMapOfPaveBlock myPaveBlocksOn;
- BOPCol_MapOfInteger myVerticesOn;
+ TColStd_MapOfInteger myVerticesOn;
BOPDS_IndexedMapOfPaveBlock myPaveBlocksSc;
- BOPCol_MapOfInteger myVerticesSc;
+ TColStd_MapOfInteger myVerticesSc;
private:
//function : VerticesIn
//purpose :
//=======================================================================
- inline const BOPCol_MapOfInteger& BOPDS_FaceInfo::VerticesIn()const
+ inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesIn()const
{
return myVerticesIn;
}
//function : ChangeVerticesIn
//purpose :
//=======================================================================
- inline BOPCol_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesIn()
+ inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesIn()
{
return myVerticesIn;
}
//function : VerticesOn
//purpose :
//=======================================================================
- inline const BOPCol_MapOfInteger& BOPDS_FaceInfo::VerticesOn()const
+ inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesOn()const
{
return myVerticesOn;
}
//function : ChangeVerticesOn
//purpose :
//=======================================================================
- inline BOPCol_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesOn()
+ inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesOn()
{
return myVerticesOn;
}
//function : VerticesSc
//purpose :
//=======================================================================
- inline const BOPCol_MapOfInteger& BOPDS_FaceInfo::VerticesSc()const
+ inline const TColStd_MapOfInteger& BOPDS_FaceInfo::VerticesSc()const
{
return myVerticesSc;
}
//function : ChangeVerticesSc
//purpose :
//=======================================================================
- inline BOPCol_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesSc()
+ inline TColStd_MapOfInteger& BOPDS_FaceInfo::ChangeVerticesSc()
{
return myVerticesSc;
}
#include <NCollection_IndexedDataMap.hxx>
#include <TColStd_MapTransientHasher.hxx>
-#include <BOPCol_ListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <BOPDS_PaveBlock.hxx>
-typedef NCollection_IndexedDataMap<Handle(BOPDS_PaveBlock), BOPCol_ListOfInteger, TColStd_MapTransientHasher> BOPDS_IndexedDataMapOfPaveBlockListOfInteger;
+typedef NCollection_IndexedDataMap<Handle(BOPDS_PaveBlock), TColStd_ListOfInteger, TColStd_MapTransientHasher> BOPDS_IndexedDataMapOfPaveBlockListOfInteger;
#endif
#include <Bnd_Box.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IndexRange.hxx>
#include <BOPDS_Iterator.hxx>
#include <BOPDS_Pair.hxx>
#include <BOPDS_MapOfPair.hxx>
#include <BOPDS_Tools.hxx>
+#include <BOPTools_BoxBndTree.hxx>
+#include <BOPTools_Parallel.hxx>
#include <NCollection_UBTreeFiller.hxx>
+#include <NCollection_Vector.hxx>
#include <TopoDS_Shape.hxx>
#include <algorithm>
//class : BOPDS_TreeSelector
//purpose :
//=======================================================================
-class BOPDS_TSR : public BOPCol_BoxBndTreeSelector{
+class BOPDS_TSR : public BOPTools_BoxBndTreeSelector{
public:
BOPDS_TSR() :
- BOPCol_BoxBndTreeSelector(),
+ BOPTools_BoxBndTreeSelector(),
myHasBRep(Standard_False),
myTree(NULL) {
}
myHasBRep=bFlag;
}
//
- void SetTree(BOPCol_BoxBndTree& aTree) {
+ void SetTree(BOPTools_BoxBndTree& aTree) {
myTree=&aTree;
}
//
//
protected:
Standard_Boolean myHasBRep;
- BOPCol_BoxBndTree *myTree;
+ BOPTools_BoxBndTree *myTree;
};
//
//=======================================================================
-typedef BOPCol_NCVector <BOPDS_TSR> BOPDS_VectorOfTSR;
-typedef BOPCol_Functor <BOPDS_TSR,BOPDS_VectorOfTSR> BOPDS_TSRFunctor;
-typedef BOPCol_Cnt <BOPDS_TSRFunctor, BOPDS_VectorOfTSR> BOPDS_TSRCnt;
+typedef NCollection_Vector <BOPDS_TSR> BOPDS_VectorOfTSR;
+typedef BOPTools_Functor <BOPDS_TSR,BOPDS_VectorOfTSR> BOPDS_TSRFunctor;
+typedef BOPTools_Cnt <BOPDS_TSRFunctor, BOPDS_VectorOfTSR> BOPDS_TSRCnt;
/////////////////////////////////////////////////////////////////////////
aNb=BOPDS_DS::NbInterfTypes();
myLists.SetIncrement(aNb);
for (i=0; i<aNb; ++i) {
- myLists.Append1();
+ myLists.Appended();
}
}
//=======================================================================
aNb=BOPDS_DS::NbInterfTypes();
myLists.SetIncrement(aNb);
for (i=0; i<aNb; ++i) {
- myLists.Append1();
+ myLists.Appended();
}
}
//=======================================================================
std::stable_sort(myLists(iX).begin(), myLists(iX).end());
// initialize iterator to access the pairs
myIterator.Init(myLists(iX));
- myLength = myLists(iX).Extent();
+ myLength = myLists(iX).Length();
}
}
//=======================================================================
Standard_Integer iTi, iTj;
TopAbs_ShapeEnum aTi, aTj;
//
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
aNb = myDS->NbSourceShapes();
const BOPDS_ShapeInfo& aSI=myDS->ShapeInfo(i);
Standard_Boolean bHasBrep = aSI.IsInterfering() && !(aSI.ShapeType() == TopAbs_SOLID);
//
- BOPDS_TSR& aTSR=aVTSR.Append1();
+ BOPDS_TSR& aTSR=aVTSR.Appended();
//
aTSR.SetHasBRep(bHasBrep);
if (!bHasBrep) {
}
//
BOPDS_TSR& aTSRi = aVTSR(i);
- const BOPCol_ListOfInteger& aLI = aTSRi.Indices();
+ const TColStd_ListOfInteger& aLI = aTSRi.Indices();
Standard_Integer aNbSD = aLI.Extent();
if (!aNbSD) {
continue;
aTi = aSI.ShapeType();
iTi = BOPDS_Tools::TypeToInteger(aTi);
//
- BOPCol_ListIteratorOfListOfInteger aIt(aLI);
+ TColStd_ListIteratorOfListOfInteger aIt(aLI);
for (; aIt.More(); aIt.Next()) {
j = aIt.Value(); // DS index
if (j >= i1 && j <= i2) {
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
#include <BOPDS_PDS.hxx>
#include <BOPDS_VectorOfPair.hxx>
#include <BOPDS_VectorOfVectorOfPair.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_ShapeEnum.hxx>
class BOPDS_DS;
//! Contructor
//! theAllocator - the allocator to manage the memory
- Standard_EXPORT BOPDS_Iterator(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_Iterator(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Modifier
//! Sets the data structure <pDS> to process
Standard_EXPORT virtual void Intersect();
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
Standard_Integer myLength;
BOPDS_PDS myDS;
BOPDS_VectorOfVectorOfPair myLists;
// commercial license or contractual agreement.
#include <Bnd_Box.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_DataMapOfIntegerInteger.hxx>
-#include <BOPCol_DataMapOfIntegerListOfInteger.hxx>
-#include <BOPCol_DataMapOfShapeInteger.hxx>
-#include <BOPCol_IndexedDataMapOfShapeBox.hxx>
-#include <BOPCol_ListOfInteger.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_IndexRange.hxx>
#include <BOPDS_IteratorSI.hxx>
#include <BOPDS_Pair.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <BOPDS_Tools.hxx>
+#include <BOPTools_BoxBndTree.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <NCollection_UBTreeFiller.hxx>
#include <TopAbs_ShapeEnum.hxx>
+#include <TColStd_DataMapOfIntegerInteger.hxx>
+#include <TColStd_DataMapOfIntegerListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_DataMapOfShapeInteger.hxx>
//
//=======================================================================
Standard_Integer iTi, iTj;
TopAbs_ShapeEnum aTi, aTj;
//
- BOPCol_BoxBndTreeSelector aSelector;
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTreeSelector aSelector;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
aNbS = myDS->NbSourceShapes();
aTi = aSI.ShapeType();
iTi = BOPDS_Tools::TypeToInteger(aTi);
//
- const BOPCol_ListOfInteger& aLI = aSelector.Indices();
- BOPCol_ListIteratorOfListOfInteger aIt(aLI);
+ const TColStd_ListOfInteger& aLI = aSelector.Indices();
+ TColStd_ListIteratorOfListOfInteger aIt(aLI);
for (; aIt.More(); aIt.Next()) {
j = aIt.Value();
const BOPDS_ShapeInfo& aSJ = myDS->ShapeInfo(j);
#include <Standard_Handle.hxx>
#include <BOPDS_Iterator.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
//! Contructor
//! theAllocator - the allocator to manage the memory
- Standard_EXPORT BOPDS_IteratorSI(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_IteratorSI(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Updates the lists of possible intersections
//! according to the value of <theLevel>.
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-#define BOPDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile
-
-#include <BOPDS_ListOfPassKeyBoolean.hxx>
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_ListOfPassKeyBoolean_HeaderFile
-#define BOPDS_ListOfPassKeyBoolean_HeaderFile
-
-#include <NCollection_List.hxx>
-#include <BOPDS_PassKeyBoolean.hxx>
-
-typedef NCollection_List<BOPDS_PassKeyBoolean> BOPDS_ListOfPassKeyBoolean;
-typedef BOPDS_ListOfPassKeyBoolean::Iterator BOPDS_ListIteratorOfListOfPassKeyBoolean;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_MapOfPassKey_HeaderFile
-#define BOPDS_MapOfPassKey_HeaderFile
-
-#include <NCollection_Map.hxx>
-#include <BOPDS_PassKeyMapHasher.hxx>
-#include <BOPDS_PassKey.hxx>
-
-
-typedef NCollection_Map<BOPDS_PassKey, BOPDS_PassKeyMapHasher> BOPDS_MapOfPassKey;
-typedef BOPDS_MapOfPassKey::Iterator BOPDS_MapIteratorMapOfPassKey;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_MapOfPassKeyBoolean_HeaderFile
-#define BOPDS_MapOfPassKeyBoolean_HeaderFile
-
-#include <NCollection_Map.hxx>
-#include <BOPDS_PassKeyMapHasher.hxx>
-#include <BOPDS_PassKeyBoolean.hxx>
-
-typedef NCollection_Map<BOPDS_PassKeyBoolean, BOPDS_PassKeyMapHasher> BOPDS_MapOfPassKeyBoolean;
-typedef BOPDS_MapOfPassKeyBoolean::Iterator BOPDS_MapIteratorMapOfPassKeyBoolean;
-
-#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_PassKey.hxx>
-
-#include <stdio.h>
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
- void BOPDS_PassKey::Dump(const Standard_Integer )const
-{
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BOPDS_PassKey_HeaderFile
-#define _BOPDS_PassKey_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <BOPCol_BaseAllocator.hxx>
-#include <Standard_Integer.hxx>
-#include <BOPCol_PInteger.hxx>
-#include <BOPCol_ListOfInteger.hxx>
-#include <Standard_Boolean.hxx>
-
-
-
-//! The class BOPDS_PassKey is to provide
-//! possibility to map objects that
-//! have a set of integer IDs as a base
-class BOPDS_PassKey
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
-
- //! Empty contructor
- BOPDS_PassKey();
-virtual ~BOPDS_PassKey();
-
-
- //! Contructor
- //! theAllocator - the allocator to manage the memory
- BOPDS_PassKey(const BOPCol_BaseAllocator& theAllocator);
-
-
- //! Copy Contructor
- BOPDS_PassKey(const BOPDS_PassKey& Other);
-BOPDS_PassKey& operator =(const BOPDS_PassKey& Other);
-
-
- //! Clear the contents
- void Clear();
-
-
- //! Modifier
- //! Sets one Id <theI1>
- void SetIds (const Standard_Integer theI1);
-
-
- //! Modifier
- //! Sets two Id <theI1>,<theI2>
- void SetIds (const Standard_Integer theI1, const Standard_Integer theI2);
-
-
- //! Modifier
- //! Sets three Id <theI1>,<theI2>,<theI3>
- void SetIds (const Standard_Integer theI1, const Standard_Integer theI2, const Standard_Integer theI3);
-
-
- //! Modifier
- //! Sets four Id <theI1>,<theI2>,<theI3>,<theI4>
- void SetIds (const Standard_Integer theI1, const Standard_Integer theI2, const Standard_Integer theI3, const Standard_Integer theI4);
-
-
- //! Modifier
- //! Sets the list of Id <theLI>
- Standard_EXPORT void SetIds (const BOPCol_ListOfInteger& theLI);
-
-
- //! Selector
- //! Returns the number of Ids>
- Standard_Integer NbIds() const;
-
-
- //! Query
- //! Returns true if the PassKey is equal to <the theOther>
- Standard_Boolean IsEqual (const BOPDS_PassKey& theOther) const;
-
-
- //! Query
- //! Returns hash code
- Standard_Integer HashCode (const Standard_Integer theUpper) const;
-
-
- //! Selector
- //! Returns Id of index <theIndex>
- Standard_Integer Id (const Standard_Integer theIndex) const;
-
-
- //! Selector
- //! Returns the first two Ids <theI1>,<theI2>
- void Ids (Standard_Integer& theI1, Standard_Integer& theI2) const;
-
- Standard_EXPORT void Dump (const Standard_Integer aHex = 0) const;
-
-
-
-
-protected:
-
-
- BOPCol_PInteger Allocate (const Standard_Integer theSize);
-
-
- BOPCol_BaseAllocator myAllocator;
- Standard_Integer myNbIds;
- Standard_Integer mySum;
- BOPCol_PInteger myPtr;
-
-
-private:
-
-
-
-
-
-};
-
-
-#include <BOPDS_PassKey.lxx>
-
-
-
-
-
-#endif // _BOPDS_PassKey_HeaderFile
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-static
- inline Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv);
-static
- inline void SortShell(const Standard_Integer n,
- Standard_Integer* a);
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKey::BOPDS_PassKey()
-{
- myAllocator=NCollection_BaseAllocator::CommonBaseAllocator();
- myPtr=NULL;
- Clear();
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKey::BOPDS_PassKey(const Handle(NCollection_BaseAllocator)& theAllocator)
-{
- myAllocator=theAllocator;
- myPtr=NULL;
- Clear();
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKey::BOPDS_PassKey(const BOPDS_PassKey& theOther)
-:
- myPtr(0)
-{
- (*this) = theOther;
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- inline BOPDS_PassKey& BOPDS_PassKey::operator =(const BOPDS_PassKey& aOther)
-{
- Clear();
- //
- myAllocator=aOther.myAllocator;
- myNbIds=aOther.myNbIds;
- mySum=aOther.mySum;
- //
- if (myNbIds) {
- myPtr=Allocate(myNbIds);
- for (int i=0; i<myNbIds; ++i) {
- myPtr[i]=aOther.myPtr[i];
- }
- }
- //
- return *this;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- inline BOPDS_PassKey::~BOPDS_PassKey()
-{
- Clear();
-}
-//=======================================================================
-//function :Allocate
-//purpose :
-//=======================================================================
- inline BOPCol_PInteger BOPDS_PassKey::Allocate(const Standard_Integer theSize)
-{
- BOPCol_PInteger pPtr;
- //
- pPtr=(BOPCol_PInteger)myAllocator->Allocate(theSize*sizeof(Standard_Integer));
- return pPtr;
-}
-
-//=======================================================================
-//function :Clear
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::Clear()
-{
- myNbIds=0;
- mySum=0;
- if (myPtr) {
- myAllocator->Free(myPtr);
- myPtr=NULL;
- }
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::SetIds(const Standard_Integer aId1)
-{
- Clear();
- myNbIds=1;
- myPtr=Allocate(myNbIds);
- myPtr[0]=aId1;
- mySum=NormalizedId(aId1, myNbIds);
-}
-
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2)
-{
- Clear();
- //
- myNbIds=2;
- myPtr=Allocate(myNbIds);
- //
- if (aId1<aId2) {
- myPtr[0]=aId1;
- myPtr[1]=aId2;
- }
- else {
- myPtr[0]=aId2;
- myPtr[1]=aId1;
- }
- //
- mySum=NormalizedId(aId1, myNbIds);
- mySum=mySum+NormalizedId(aId2, myNbIds);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3)
-{
- Clear();
- //
- myNbIds=3;
- myPtr=Allocate(myNbIds);
- //
- myPtr[0]=aId1;
- myPtr[1]=aId2;
- myPtr[2]=aId3;
- //
- SortShell(myNbIds, myPtr);
- //
- mySum=NormalizedId(aId1, myNbIds);
- mySum=mySum+NormalizedId(aId2, myNbIds);
- mySum=mySum+NormalizedId(aId3, myNbIds);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::SetIds(const Standard_Integer aId1,
- const Standard_Integer aId2,
- const Standard_Integer aId3,
- const Standard_Integer aId4)
-{
- Clear();
- //
- myNbIds=4;
- myPtr=Allocate(myNbIds);
- //
- myPtr[0]=aId1;
- myPtr[1]=aId2;
- myPtr[2]=aId3;
- myPtr[3]=aId4;
- //
- SortShell(myNbIds, myPtr);
- //
- mySum=NormalizedId(aId1, myNbIds);
- mySum=mySum+NormalizedId(aId2, myNbIds);
- mySum=mySum+NormalizedId(aId3, myNbIds);
- mySum=mySum+NormalizedId(aId4, myNbIds);
-}
-//=======================================================================
-//function :SetIds
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::SetIds(const BOPCol_ListOfInteger& aLI)
-{
- Standard_Integer i, aId, aSum;
- BOPCol_ListIteratorOfListOfInteger aIt;
- //
- Clear();
- //
- myNbIds=aLI.Extent();
- myPtr=Allocate(myNbIds);
- //
- aSum=0;
- aIt.Initialize(aLI);
- for (i=0; aIt.More(); aIt.Next(), ++i) {
- aId=aIt.Value();
- myPtr[i]=aId;
- aSum+=NormalizedId(aId, myNbIds);
- }
- mySum=aSum;
- //
- SortShell(myNbIds, myPtr);
-}
-//=======================================================================
-//function :NbIds
-//purpose :
-//=======================================================================
- inline Standard_Integer BOPDS_PassKey::NbIds()const
-{
- return myNbIds;
-}
-//=======================================================================
-//function :Id
-//purpose :
-//=======================================================================
- inline Standard_Integer BOPDS_PassKey::Id(const Standard_Integer aIndex) const
-{
- if (aIndex<0 || aIndex>myNbIds-1) {
- return -1;
- }
- return myPtr[aIndex];
-}
-//=======================================================================
-//function :Ids
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKey::Ids(Standard_Integer& aId1,
- Standard_Integer& aId2) const
-{
- aId1=0;
- aId2=0;
- if (myNbIds>1) {
- aId1=myPtr[0];
- aId2=myPtr[1];
- }
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
- inline Standard_Boolean BOPDS_PassKey::IsEqual(const BOPDS_PassKey& aOther) const
-{
- Standard_Boolean bRet;
- Standard_Integer i;
- //
- bRet=Standard_False;
- //
- if (myNbIds!=aOther.myNbIds) {
- return bRet;
- }
- for (i=0; i<myNbIds; ++i) {
- if (myPtr[i]!=aOther.myPtr[i]) {
- return bRet;
- }
- }
- return !bRet;
-}
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
- inline Standard_Integer BOPDS_PassKey::HashCode(const Standard_Integer aUpper) const
-{
- return ::HashCode(mySum, aUpper);
-}
-//=======================================================================
-// function: NormalizedId
-// purpose :
-//=======================================================================
-inline Standard_Integer NormalizedId(const Standard_Integer aId,
- const Standard_Integer aDiv)
-{
- Standard_Integer aMax, aTresh, aIdRet;
- //
- aIdRet=aId;
- aMax=::IntegerLast();
- aTresh=aMax/aDiv;
- if (aId>aTresh) {
- aIdRet=aId%aTresh;
- }
- return aIdRet;
-}
-//=======================================================================
-// function: SortShell
-// purpose :
-//=======================================================================
-inline void SortShell(const Standard_Integer n,
- Standard_Integer* a)
-{
- Standard_Integer nd, i, j, l, d=1;
- Standard_Integer x;
- //
- while(d<=n) {
- d*=2;
- }
- //
- while (d) {
- d=(d-1)/2;
- //
- nd=n-d;
- for (i=0; i<nd; ++i) {
- j=i;
- m30:;
- l=j+d;
- if (a[l] < a[j]) {
- x=a[j];
- a[j]=a[l];
- a[l]=x;
- j-=d;
- if (j > -1) {
- goto m30;
- }
- }//if (a[l] < a[j]){
- }//for (i=0; i<nd; ++i)
- }//while (1)
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BOPDS_PassKeyBoolean_HeaderFile
-#define _BOPDS_PassKeyBoolean_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Boolean.hxx>
-#include <BOPDS_PassKey.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-
-
-
-class BOPDS_PassKeyBoolean : public BOPDS_PassKey
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- BOPDS_PassKeyBoolean();
-virtual ~BOPDS_PassKeyBoolean();
-
- BOPDS_PassKeyBoolean(const BOPCol_BaseAllocator& theAllocator);
-
- BOPDS_PassKeyBoolean(const BOPDS_PassKeyBoolean& Other);
-
- void SetFlag (const Standard_Boolean theFlag);
-BOPDS_PassKeyBoolean& operator =(const BOPDS_PassKeyBoolean& );
-
- Standard_Boolean Flag() const;
-
-
-
-
-protected:
-
-
-
- Standard_Boolean myFlag;
-
-
-private:
-
-
-
-
-
-};
-
-
-#include <BOPDS_PassKeyBoolean.lxx>
-
-
-
-
-
-#endif // _BOPDS_PassKeyBoolean_HeaderFile
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKeyBoolean::BOPDS_PassKeyBoolean()
-:
- BOPDS_PassKey(),
- myFlag(Standard_False)
-{
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKeyBoolean::BOPDS_PassKeyBoolean
- (const Handle(NCollection_BaseAllocator)& theAllocator)
-:
- BOPDS_PassKey(theAllocator),
- myFlag(Standard_False)
-{
-}
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- inline BOPDS_PassKeyBoolean::BOPDS_PassKeyBoolean(const BOPDS_PassKeyBoolean& theOther)
-:
- BOPDS_PassKey(theOther)
-{
- myFlag = theOther.myFlag;
-}
-//=======================================================================
-//function :~
-//purpose :
-//=======================================================================
- inline BOPDS_PassKeyBoolean::~BOPDS_PassKeyBoolean()
-{
-}
-//=======================================================================
-//function :operator =
-//purpose :
-//=======================================================================
- inline BOPDS_PassKeyBoolean& BOPDS_PassKeyBoolean::operator =(const BOPDS_PassKeyBoolean& aOther)
-{
- BOPDS_PassKey::operator =(aOther);
- myFlag=aOther.myFlag;
- return *this;
-}
-//=======================================================================
-//function :SetFlag
-//purpose :
-//=======================================================================
- inline void BOPDS_PassKeyBoolean::SetFlag(const Standard_Boolean aFlag)
-{
- myFlag=aFlag;
-}
-//=======================================================================
-//function :Flag
-//purpose :
-//=======================================================================
- inline Standard_Boolean BOPDS_PassKeyBoolean::Flag()const
-{
- return myFlag;
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BOPDS_PassKeyMapHasher_HeaderFile
-#define _BOPDS_PassKeyMapHasher_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-class BOPDS_PassKey;
-
-
-
-class BOPDS_PassKeyMapHasher
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- static Standard_Integer HashCode (const BOPDS_PassKey& aPKey, const Standard_Integer Upper);
-
- static Standard_Boolean IsEqual (const BOPDS_PassKey& aPKey1, const BOPDS_PassKey& aPKey2);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-
-};
-
-
-#include <BOPDS_PassKeyMapHasher.lxx>
-
-
-
-
-
-#endif // _BOPDS_PassKeyMapHasher_HeaderFile
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <BOPDS_PassKey.hxx>
-
-//=======================================================================
-//function : HashCode
-//purpose :
-//=======================================================================
-inline
- Standard_Integer BOPDS_PassKeyMapHasher::HashCode(const BOPDS_PassKey& aPK,
- const Standard_Integer Upper)
-{
- return aPK.HashCode(Upper);
-}
-//=======================================================================
-//function :IsEqual
-//purpose :
-//=======================================================================
-inline
- Standard_Boolean BOPDS_PassKeyMapHasher::IsEqual(const BOPDS_PassKey& aPK1,
- const BOPDS_PassKey& aPK2)
-{
- return aPK1.IsEqual(aPK2);
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <Standard_Integer.hxx>
-#include <BOPDS_Pave.hxx>
+#include <Bnd_Box.hxx>
#include <BOPDS_ListOfPave.hxx>
+#include <BOPDS_ListOfPaveBlock.hxx>
+#include <BOPDS_Pave.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
-#include <Bnd_Box.hxx>
-#include <BOPCol_MapOfInteger.hxx>
#include <Standard_Transient.hxx>
-#include <Standard_Boolean.hxx>
-#include <BOPDS_ListOfPaveBlock.hxx>
+#include <TColStd_MapOfInteger.hxx>
class BOPDS_Pave;
class Bnd_Box;
//! Contructor
//! <theAllocator> - the allocator to manage the memory
- Standard_EXPORT BOPDS_PaveBlock(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_PaveBlock(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Modifier
protected:
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
Standard_Integer myEdge;
Standard_Integer myOriginalEdge;
BOPDS_Pave myPave1;
Standard_Real myTS1;
Standard_Real myTS2;
Bnd_Box myShrunkBox;
- BOPCol_MapOfInteger myMFence;
+ TColStd_MapOfInteger myMFence;
Standard_Boolean myIsSplittable;
private:
#include <Bnd_Box.hxx>
-#include <BOPCol_ListOfInteger.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <BOPDS_ShapeInfo.hxx>
#include <TopoDS_Shape.hxx>
const TopAbs_ShapeEnum aTS = ShapeType();
printf(" %s", TopAbs::ShapeTypeToString (aTS));
printf(" {");
- for (BOPCol_ListIteratorOfListOfInteger aIt(mySubShapes); aIt.More(); aIt.Next()) {
+ for (TColStd_ListOfInteger::Iterator aIt(mySubShapes); aIt.More(); aIt.Next()) {
Standard_Integer n = aIt.Value();
printf(" %d", n);
}
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
#include <Bnd_Box.hxx>
-#include <BOPCol_ListOfInteger.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
-#include <BOPCol_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
-class TopoDS_Shape;
-class Bnd_Box;
-
+#include <TopAbs_ShapeEnum.hxx>
+#include <TColStd_ListOfInteger.hxx>
+#include <TopoDS_Shape.hxx>
//! The class BOPDS_ShapeInfo is to store
//! Contructor
//! theAllocator - the allocator to manage the memory
- BOPDS_ShapeInfo(const BOPCol_BaseAllocator& theAllocator);
+ BOPDS_ShapeInfo(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Modifier
//! Selector
//! Returns the list of indices of sub-shapes
- const BOPCol_ListOfInteger& SubShapes() const;
+ const TColStd_ListOfInteger& SubShapes() const;
//! Selector/ Modifier
//! Returns the list of indices of sub-shapes
- BOPCol_ListOfInteger& ChangeSubShapes();
+ TColStd_ListOfInteger& ChangeSubShapes();
//! Query
TopoDS_Shape myShape;
TopAbs_ShapeEnum myType;
Bnd_Box myBox;
- BOPCol_ListOfInteger mySubShapes;
+ TColStd_ListOfInteger mySubShapes;
Standard_Integer myReference;
Standard_Integer myFlag;
//function : SubShapes
//purpose :
//=======================================================================
-inline const BOPCol_ListOfInteger& BOPDS_ShapeInfo::SubShapes()const
+inline const TColStd_ListOfInteger& BOPDS_ShapeInfo::SubShapes()const
{
return mySubShapes;
}
//function : ChangeSubShapes
//purpose :
//=======================================================================
-inline BOPCol_ListOfInteger& BOPDS_ShapeInfo::ChangeSubShapes()
+inline TColStd_ListOfInteger& BOPDS_ShapeInfo::ChangeSubShapes()
{
return mySubShapes;
}
(const Standard_Integer theI)const
{
Standard_Boolean bRet;
- BOPCol_ListIteratorOfListOfInteger aIt;
+ TColStd_ListIteratorOfListOfInteger aIt;
//
bRet=Standard_False;
aIt.Initialize(mySubShapes);
#include <Bnd_Box.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-
#include <BOPDS_DS.hxx>
#include <BOPDS_Pair.hxx>
#include <BOPDS_MapOfPair.hxx>
+#include <BOPTools_BoxBndTree.hxx>
+
#include <NCollection_UBTreeFiller.hxx>
#include <TopoDS_Shape.hxx>
void BOPDS_SubIterator::Intersect()
{
Standard_Integer i, j, iTi, iTj;
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
- BOPCol_ListIteratorOfListOfInteger aIt(*mySubSet1);
+ TColStd_ListIteratorOfListOfInteger aIt(*mySubSet1);
for (; aIt.More(); aIt.Next()) {
i = aIt.Value();
//
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
const Bnd_Box& aBoxEx = aSI.Box();
//
- BOPCol_BoxBndTreeSelector aSelector;
+ BOPTools_BoxBndTreeSelector aSelector;
aSelector.SetBox(aBoxEx);
Standard_Integer aNbSD = aBBTree.Select(aSelector);
if (!aNbSD) {
//
iTi = BOPDS_Tools::TypeToInteger(aSI.ShapeType());
//
- const BOPCol_ListOfInteger& aLI = aSelector.Indices();
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ const TColStd_ListOfInteger& aLI = aSelector.Indices();
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next()) {
j = aItLI.Value();
//
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
#include <BOPDS_PDS.hxx>
#include <BOPDS_Pair.hxx>
#include <BOPDS_VectorOfPair.hxx>
-#include <BOPCol_PListOfInteger.hxx>
-#include <BOPCol_ListOfInteger.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <TColStd_ListOfInteger.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
class BOPDS_DS;
//! Constructor
//! theAllocator - the allocator to manage the memory
- Standard_EXPORT BOPDS_SubIterator(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPDS_SubIterator(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Sets the data structure <pDS> to process.
//! It is used to access the shapes and their bounding boxes.
}
//! Sets the first set of indices <theLI> to process
- void SetSubSet1 (const BOPCol_ListOfInteger& theLI)
+ void SetSubSet1 (const TColStd_ListOfInteger& theLI)
{
- mySubSet1 = (BOPCol_PListOfInteger)&theLI;
+ mySubSet1 = (TColStd_ListOfInteger*)&theLI;
}
//! Returns the first set of indices to process
- const BOPCol_ListOfInteger& SubSet1() const
+ const TColStd_ListOfInteger& SubSet1() const
{
return *mySubSet1;
}
//! Sets the second set of indices <theLI> to process
- void SetSubSet2 (const BOPCol_ListOfInteger& theLI)
+ void SetSubSet2 (const TColStd_ListOfInteger& theLI)
{
- mySubSet2 = (BOPCol_PListOfInteger)&theLI;
+ mySubSet2 = (TColStd_ListOfInteger*)&theLI;
}
//! Returns the second set of indices to process
- const BOPCol_ListOfInteger& SubSet2() const
+ const TColStd_ListOfInteger& SubSet2() const
{
return *mySubSet2;
}
//! Returns the number of interfering pairs
Standard_Integer ExpectedLength() const
{
- return myList.Extent();
+ return myList.Length();
}
protected:
//! Performs intersection of bounding boxes
Standard_EXPORT virtual void Intersect();
- BOPCol_BaseAllocator myAllocator;
+ Handle(NCollection_BaseAllocator) myAllocator;
BOPDS_PDS myDS;
BOPDS_VectorOfPair myList;
BOPDS_VectorOfPair::Iterator myIterator;
- BOPCol_PListOfInteger mySubSet1;
- BOPCol_PListOfInteger mySubSet2;
+ TColStd_ListOfInteger* mySubSet1;
+ TColStd_ListOfInteger* mySubSet2;
private:
#ifndef BOPDS_VectorOfCurve_HeaderFile
#define BOPDS_VectorOfCurve_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Curve.hxx>
-typedef BOPCol_NCVector<BOPDS_Curve> BOPDS_VectorOfCurve;
+typedef NCollection_Vector<BOPDS_Curve> BOPDS_VectorOfCurve;
#endif
#ifndef BOPDS_VectorOfFaceInfo_HeaderFile
#define BOPDS_VectorOfFaceInfo_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_FaceInfo.hxx>
-typedef BOPCol_NCVector<BOPDS_FaceInfo> BOPDS_VectorOfFaceInfo;
+typedef NCollection_Vector<BOPDS_FaceInfo> BOPDS_VectorOfFaceInfo;
#endif
#ifndef BOPDS_VectorOfIndexRange_HeaderFile
#define BOPDS_VectorOfIndexRange_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_IndexRange.hxx>
-typedef BOPCol_NCVector<BOPDS_IndexRange> BOPDS_VectorOfIndexRange;
+typedef NCollection_Vector<BOPDS_IndexRange> BOPDS_VectorOfIndexRange;
#endif
#ifndef BOPDS_VectorOfInterfEE_HeaderFile
#define BOPDS_VectorOfInterfEE_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfEE> BOPDS_VectorOfInterfEE;
+typedef NCollection_Vector<BOPDS_InterfEE> BOPDS_VectorOfInterfEE;
#endif
#ifndef BOPDS_VectorOfInterfEF_HeaderFile
#define BOPDS_VectorOfInterfEF_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfEF> BOPDS_VectorOfInterfEF;
+typedef NCollection_Vector<BOPDS_InterfEF> BOPDS_VectorOfInterfEF;
#endif
#ifndef BOPDS_VectorOfInterfEZ_HeaderFile
#define BOPDS_VectorOfInterfEZ_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfEZ> BOPDS_VectorOfInterfEZ;
+typedef NCollection_Vector<BOPDS_InterfEZ> BOPDS_VectorOfInterfEZ;
#endif
#ifndef BOPDS_VectorOfInterfFF_HeaderFile
#define BOPDS_VectorOfInterfFF_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfFF> BOPDS_VectorOfInterfFF;
+typedef NCollection_Vector<BOPDS_InterfFF> BOPDS_VectorOfInterfFF;
#endif
#ifndef BOPDS_VectorOfInterfFZ_HeaderFile
#define BOPDS_VectorOfInterfFZ_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfFZ> BOPDS_VectorOfInterfFZ;
+typedef NCollection_Vector<BOPDS_InterfFZ> BOPDS_VectorOfInterfFZ;
#endif
#ifndef BOPDS_VectorOfInterfVE_HeaderFile
#define BOPDS_VectorOfInterfVE_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfVE> BOPDS_VectorOfInterfVE;
+typedef NCollection_Vector<BOPDS_InterfVE> BOPDS_VectorOfInterfVE;
#endif
#ifndef BOPDS_VectorOfInterfVF_HeaderFile
#define BOPDS_VectorOfInterfVF_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfVF> BOPDS_VectorOfInterfVF;
+typedef NCollection_Vector<BOPDS_InterfVF> BOPDS_VectorOfInterfVF;
#endif
#ifndef BOPDS_VectorOfInterfVV_HeaderFile
#define BOPDS_VectorOfInterfVV_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfVV> BOPDS_VectorOfInterfVV;
+typedef NCollection_Vector<BOPDS_InterfVV> BOPDS_VectorOfInterfVV;
#endif
#ifndef BOPDS_VectorOfInterfVZ_HeaderFile
#define BOPDS_VectorOfInterfVZ_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfVZ> BOPDS_VectorOfInterfVZ;
+typedef NCollection_Vector<BOPDS_InterfVZ> BOPDS_VectorOfInterfVZ;
#endif
#ifndef BOPDS_VectorOfInterfZZ_HeaderFile
#define BOPDS_VectorOfInterfZZ_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Interf.hxx>
-typedef BOPCol_NCVector<BOPDS_InterfZZ> BOPDS_VectorOfInterfZZ;
+typedef NCollection_Vector<BOPDS_InterfZZ> BOPDS_VectorOfInterfZZ;
#endif
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BOPDS_VectorOfListOfPassKeyBoolean_HeaderFile
-#define BOPDS_VectorOfListOfPassKeyBoolean_HeaderFile
-
-#include <BOPCol_NCVector.hxx>
-#include <BOPDS_ListOfPassKeyBoolean.hxx>
-
-typedef BOPCol_NCVector<BOPDS_ListOfPassKeyBoolean> BOPDS_VectorOfListOfPassKeyBoolean;
-
-#endif
#ifndef BOPDS_VectorOfListOfPaveBlock_HeaderFile
#define BOPDS_VectorOfListOfPaveBlock_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_ListOfPaveBlock.hxx>
-typedef BOPCol_NCVector<BOPDS_ListOfPaveBlock> BOPDS_VectorOfListOfPaveBlock;
+typedef NCollection_Vector<BOPDS_ListOfPaveBlock> BOPDS_VectorOfListOfPaveBlock;
#endif
#ifndef BOPDS_VectorOfPair_HeaderFile
#define BOPDS_VectorOfPair_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Pair.hxx>
-typedef BOPCol_NCVector<BOPDS_Pair> BOPDS_VectorOfPair;
+typedef NCollection_Vector<BOPDS_Pair> BOPDS_VectorOfPair;
#endif
#ifndef BOPDS_VectorOfPnt_HeaderFile
#define BOPDS_VectorOfPnt_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_Point.hxx>
-typedef BOPCol_NCVector<BOPDS_Point> BOPDS_VectorOfPoint;
+typedef NCollection_Vector<BOPDS_Point> BOPDS_VectorOfPoint;
#endif
#ifndef BOPDS_VectorOfShapeInfo_HeaderFile
#define BOPDS_VectorOfShapeInfo_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_ShapeInfo.hxx>
-typedef BOPCol_NCVector<BOPDS_ShapeInfo> BOPDS_VectorOfShapeInfo;
+typedef NCollection_Vector<BOPDS_ShapeInfo> BOPDS_VectorOfShapeInfo;
#endif
#ifndef BOPDS_VectorOfVectorOfPair_HeaderFile
#define BOPDS_VectorOfVectorOfPair_HeaderFile
-#include <BOPCol_NCVector.hxx>
+#include <NCollection_Vector.hxx>
#include <BOPDS_VectorOfPair.hxx>
-typedef BOPCol_NCVector<BOPDS_VectorOfPair> BOPDS_VectorOfVectorOfPair;
+typedef NCollection_Vector<BOPDS_VectorOfPair> BOPDS_VectorOfVectorOfPair;
#endif
BOPDS_Curve.hxx
BOPDS_Curve.lxx
BOPDS_DataMapOfIntegerListOfPaveBlock.hxx
-BOPDS_DataMapOfPassKeyListOfPaveBlock.hxx
BOPDS_DataMapOfPaveBlockCommonBlock.hxx
BOPDS_DataMapOfPaveBlockListOfInteger.hxx
BOPDS_DataMapOfPaveBlockListOfPaveBlock.hxx
BOPDS_Iterator.hxx
BOPDS_IteratorSI.cxx
BOPDS_IteratorSI.hxx
-BOPDS_ListIteratorOfListOfPassKeyBoolean.hxx
-BOPDS_ListOfPassKeyBoolean.hxx
BOPDS_ListOfPave.hxx
BOPDS_ListOfPaveBlock.hxx
BOPDS_MapOfCommonBlock.hxx
-BOPDS_MapOfPassKey.hxx
-BOPDS_MapOfPassKeyBoolean.hxx
BOPDS_MapOfPave.hxx
BOPDS_MapOfPaveBlock.hxx
-BOPDS_PassKey.cxx
-BOPDS_PassKey.hxx
-BOPDS_PassKey.lxx
-BOPDS_PassKeyBoolean.hxx
-BOPDS_PassKeyBoolean.lxx
-BOPDS_PassKeyMapHasher.hxx
-BOPDS_PassKeyMapHasher.lxx
BOPDS_Pave.cxx
BOPDS_Pave.hxx
BOPDS_Pave.lxx
BOPDS_VectorOfInterfVV.hxx
BOPDS_VectorOfInterfVZ.hxx
BOPDS_VectorOfInterfZZ.hxx
-BOPDS_VectorOfListOfPassKeyBoolean.hxx
BOPDS_VectorOfListOfPaveBlock.hxx
BOPDS_VectorOfPave.hxx
BOPDS_VectorOfPoint.hxx
#include <BOPAlgo_PaveFiller.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPTest.hxx>
#include <BOPTest_Objects.hxx>
#include <BRepAlgoAPI_BooleanOperation.hxx>
#include <stdio.h>
#include <string.h>
-static
- void ConvertList(const BOPCol_ListOfShape& aLSB,
- TopTools_ListOfShape& aLS);
static Standard_Integer bapibuild(Draw_Interpretor&, Standard_Integer, const char**);
static Standard_Integer bapibop (Draw_Interpretor&, Standard_Integer, const char**);
break;
}
//
- BOPCol_ListOfShape& aLSB=BOPTest_Objects::Shapes();
- BOPCol_ListOfShape& aLTB=BOPTest_Objects::Tools();
- //
- TopTools_ListOfShape aLS, aLT;
- ConvertList(aLSB, aLS);
- ConvertList(aLTB, aLT);
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLT=BOPTest_Objects::Tools();
//
bRunParallel=BOPTest_Objects::RunParallel();
aFuzzyValue=BOPTest_Objects::FuzzyValue();
Standard_Real aFuzzyValue;
BRepAlgoAPI_BuilderAlgo aBuilder;
//
- BOPCol_ListOfShape& aLSB=BOPTest_Objects::Shapes();
- BOPCol_ListOfShape& aLTB=BOPTest_Objects::Tools();
- //
- TopTools_ListOfShape aLS;
- ConvertList(aLSB, aLS);
- ConvertList(aLTB, aLS);
+ TopTools_ListOfShape aLS = BOPTest_Objects::Shapes();
+ TopTools_ListOfShape aLT = BOPTest_Objects::Tools();
//
+ aLS.Append(aLT);
bRunParallel=BOPTest_Objects::RunParallel();
aFuzzyValue=BOPTest_Objects::FuzzyValue();
bNonDestructive = BOPTest_Objects::NonDestructive();
DBRep::Set(a[1], aR);
return 0;
}
-//=======================================================================
-//function : ConvertLists
-//purpose :
-//=======================================================================
-void ConvertList(const BOPCol_ListOfShape& aLSB,
- TopTools_ListOfShape& aLS)
-{
- BOPCol_ListIteratorOfListOfShape aItB;
- //
- aItB.Initialize(aLSB);
- for (; aItB.More(); aItB.Next()) {
- const TopoDS_Shape& aS=aItB.Value();
- aLS.Append(aS);
- }
-}
//=======================================================================
//function : bapisplit
#include <BOPAlgo_Operation.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPAlgo_Section.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTest.hxx>
#include <BOPTest_Objects.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <stdio.h>
//
Standard_Boolean bRunParallel, bNonDestructive;
Standard_Real aTol;
TopoDS_Shape aS1, aS2;
- BOPCol_ListOfShape aLC;
+ TopTools_ListOfShape aLC;
//
if (n != 3) {
di << " use bop s1 s2 \n";
Standard_Integer aNb;
BOPAlgo_BOP aBOP;
//
- const BOPCol_ListOfShape& aLC=pPF->Arguments();
+ const TopTools_ListOfShape& aLC=pPF->Arguments();
aNb=aLC.Extent();
if (aNb!=2) {
Sprintf (buf, " wrong number of arguments %s\n", aNb);
Standard_Integer aNb;
BOPAlgo_Section aBOP;
//
- const BOPCol_ListOfShape& aLC=pPF->Arguments();
+ const TopTools_ListOfShape& aLC=pPF->Arguments();
aNb=aLC.Extent();
if (aNb!=2) {
Sprintf (buf, " wrong number of arguments %s\n", aNb);
{
Standard_Boolean bRunParallel, bNonDestructive;
TopoDS_Shape aS1, aS2;
- BOPCol_ListOfShape aLC;
+ TopTools_ListOfShape aLC;
Standard_Real aTol;
//
if (n != 4) {
Standard_Integer i;
Standard_Real aTol;
TopoDS_Shape aS;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
//
aTol = BOPTest_Objects::FuzzyValue();
bRunParallel = BOPTest_Objects::RunParallel();
//
// treat list of arguments for the case of compounds
if (bToIntersect && bCompounds) {
- BOPCol_ListOfShape aLSx;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_ListOfShape aLSx;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
aItLS.Initialize(aLS);
for (; aItLS.More(); aItLS.Next()) {
return 1;
}
//
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
BOPAlgo_PaveFiller& aPF = BOPTest_Objects::PaveFiller();
//
BOPAlgo_CellsBuilder& aCBuilder = BOPTest_Objects::CellsBuilder();
aCBuilder.Clear();
//
- BOPCol_ListOfShape& aLSObj = BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLSObj = BOPTest_Objects::Shapes();
aIt.Initialize(aLSObj);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
aCBuilder.AddArgument(aS);
}
//
- BOPCol_ListOfShape& aLSTool = BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLSTool = BOPTest_Objects::Tools();
aIt.Initialize(aLSTool);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value();
return 1;
}
//
- BOPCol_ListOfShape aLSToTake, aLSToAvoid;
+ TopTools_ListOfShape aLSToTake, aLSToAvoid;
Standard_Integer i, iMaterial, iTake, n1;
Standard_Boolean bUpdate;
//
return 1;
}
//
- BOPCol_ListOfShape aLSToTake, aLSToAvoid;
+ TopTools_ListOfShape aLSToTake, aLSToAvoid;
Standard_Integer i, iTake;
//
for (i = 2; i < n; i += 2) {
#include <BOPAlgo_ArgumentAnalyzer.hxx>
#include <BOPAlgo_CheckerSI.hxx>
#include <BOPAlgo_CheckResult.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_MapOfPair.hxx>
#include <BOPTest.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
static
void MakeShapeForFullOutput (const TCollection_AsciiString&,
const Standard_Integer,
- const BOPCol_ListOfShape&,
+ const TopTools_ListOfShape&,
Standard_Integer& ,
Draw_Interpretor&,
Standard_Boolean bCurveOnSurf = Standard_False,
Standard_Integer iErr, iCnt, n1, n2, iT;
TopAbs_ShapeEnum aType1, aType2;
BOPAlgo_CheckerSI aChecker;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
BOPDS_MapIteratorOfMapOfPair aItMPK;
//
if (aLevel < (aNbInterfTypes-1)) {
const BOPAlgo_CheckResult& aResult = anIt.Value();
const TopoDS_Shape & aSS1 = aResult.GetShape1();
const TopoDS_Shape & aSS2 = aResult.GetShape2();
- const BOPCol_ListOfShape & aLS1 = aResult.GetFaultyShapes1();
- const BOPCol_ListOfShape & aLS2 = aResult.GetFaultyShapes2();
+ const TopTools_ListOfShape & aLS1 = aResult.GetFaultyShapes1();
+ const TopTools_ListOfShape & aLS2 = aResult.GetFaultyShapes2();
Standard_Boolean isL1 = !aLS1.IsEmpty();
Standard_Boolean isL2 = !aLS2.IsEmpty();
TopExp_Explorer aExpF, aExpE;
char buf[200], aFName[10], anEName[10];
NCollection_DataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> aDMETol;
- BOPCol_DataMapOfShapeInteger aMSI;
+ TopTools_DataMapOfShapeInteger aMSI;
//
anECounter = 0;
aFCounter = 0;
//=======================================================================
void MakeShapeForFullOutput (const TCollection_AsciiString & aBaseName,
const Standard_Integer aIndex,
- const BOPCol_ListOfShape & aList,
+ const TopTools_ListOfShape & aList,
Standard_Integer& aCount,
Draw_Interpretor& di,
Standard_Boolean bCurveOnSurf,
BRep_Builder BB;
BB.MakeCompound(cmp);
- BOPCol_ListIteratorOfListOfShape anIt(aList);
+ TopTools_ListIteratorOfListOfShape anIt(aList);
for(; anIt.More(); anIt.Next()) {
const TopoDS_Shape & aS = anIt.Value();
BB.Add(cmp, aS);
#include <BOPAlgo_BuilderFace.hxx>
#include <BOPAlgo_BuilderSolid.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
static
char* theName);
template <class InterfType> static
- void DumpInterfs(const BOPCol_NCVector<InterfType>& theVInterf,
+ void DumpInterfs(const NCollection_Vector<InterfType>& theVInterf,
Draw_Interpretor& di);
template <class InterfType> static
void SearchNewIndex(const char* theCType,
const Standard_Integer theInd,
- const BOPCol_NCVector<InterfType>& theVInterf,
+ const NCollection_Vector<InterfType>& theVInterf,
Draw_Interpretor& di);
static
Standard_Integer bopfinfo(Draw_Interpretor& di,
//
bFound = Standard_False;
BOPDS_VectorOfInterfFF& aFFs = pDS->InterfFF();
- aNb = aFFs.Extent();
+ aNb = aFFs.Length();
for (i = 0; i < aNb; ++i) {
const BOPDS_InterfFF& anInt = aFFs(i);
anInt.Indices(n1, n2);
//
const BOPDS_VectorOfCurve& aVNC = anInt.Curves();
- aNbC = aVNC.Extent();
+ aNbC = aVNC.Length();
for (k = 0; k < aNbC; ++k) {
const BOPDS_Curve& aNC = aVNC(k);
const BOPDS_ListOfPaveBlock& aLPB = aNC.PaveBlocks();
//
bFound = Standard_False;
const BOPDS_VectorOfPoint& aVNP = anInt.Points();
- aNbP = aVNP.Extent();
+ aNbP = aVNP.Length();
for (k = 0; k < aNbP; ++k) {
const BOPDS_Point& aNP = aVNP(k);
nV1 = aNP.Index();
//
iCnt = 0;
iPriz = 0;
- aNb = aFFs.Extent();
+ aNb = aFFs.Length();
for (j = 0; j < aNb; ++j) {
const BOPDS_InterfFF& aFF = aFFs(j);
if (n == 3) {
//
iX = 0;
const BOPDS_VectorOfCurve& aVNC = aFF.Curves();
- aNbC = aVNC.Extent();
+ aNbC = aVNC.Length();
for (k = 0; k < aNbC; ++k) {
const BOPDS_Curve& aNC = aVNC(k);
const BOPDS_ListOfPaveBlock& aLPB = aNC.PaveBlocks();
//
iX = 0;
const BOPDS_VectorOfPoint& aVNP = aFF.Points();
- aNbP = aVNP.Extent();
+ aNbP = aVNP.Length();
for (k = 0; k < aNbP; ++k) {
const BOPDS_Point& aNP = aVNP(k);
nSp = aNP.Index();
BOPDS_FaceInfo& aFI = pDS->ChangeFaceInfo(nF);
//
BOPDS_IndexedMapOfPaveBlock aMPB;
- BOPCol_MapOfInteger aMI;
+ TColStd_MapOfInteger aMI;
if (iPriz == 0) {
strcpy(aText, "On");
aMPB = aFI.ChangePaveBlocksOn();
//
if (aMI.Extent()) {
printf(" vertices %s:\n", aText);
- BOPCol_MapIteratorOfMapOfInteger aItMI(aMI);
+ TColStd_MapIteratorOfMapOfInteger aItMI(aMI);
for (; aItMI.More(); aItMI.Next()) {
nV = aItMI.Value();
printf(" %d", nV);
return 0;
}
//
- BOPCol_ListOfInteger aLI;
+ TColStd_ListOfInteger aLI;
pDS->AloneVertices(nF, aLI);
if (!aLI.Extent()) {
di << " no alone vertices found\n";
}
//
di << " alone vertices: \n";
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next()) {
nV = aItLI.Value();
di << nV << " ";
}
//
BOPAlgo_Builder& aBuilder = BOPTest_Objects::Builder();
- const BOPCol_DataMapOfShapeListOfShape& anImages = aBuilder.Images();
+ const TopTools_DataMapOfShapeListOfShape& anImages = aBuilder.Images();
if (!anImages.IsBound(aS)) {
di << " no images found\n";
return 0;
//
aBB.MakeCompound(aC);
//
- const BOPCol_ListOfShape& aLSIm = anImages.Find(aS);
- BOPCol_ListIteratorOfListOfShape aIt(aLSIm);
+ const TopTools_ListOfShape& aLSIm = anImages.Find(aS);
+ TopTools_ListIteratorOfListOfShape aIt(aLSIm);
for (i = 0; aIt.More(); aIt.Next(), ++i) {
const TopoDS_Shape& aSIm = aIt.Value();
aBB.Add(aC, aSIm);
}
//
BOPAlgo_Builder& aBuilder = BOPTest_Objects::Builder();
- const BOPCol_DataMapOfShapeListOfShape& aDMI = aBuilder.Origins();
+ const TopTools_DataMapOfShapeListOfShape& aDMI = aBuilder.Origins();
if (!aDMI.IsBound(aS)) {
di << " no origins found\n";
return 0;
char buf[32];
sprintf(buf, "%s_or", a[1]);
//
- const BOPCol_ListOfShape& aLSx = aDMI.Find(aS);
+ const TopTools_ListOfShape& aLSx = aDMI.Find(aS);
if (aLSx.Extent() == 1) {
DBRep::Set(buf, aLSx.First());
di << "1 origin found\n" << buf << "\n";
TopoDS_Compound aCOr;
BRep_Builder().MakeCompound(aCOr);
//
- BOPCol_ListIteratorOfListOfShape aItLSx(aLSx);
+ TopTools_ListIteratorOfListOfShape aItLSx(aLSx);
for (; aItLSx.More(); aItLSx.Next()) {
BRep_Builder().Add(aCOr, aItLSx.Value());
}
}
//
BOPAlgo_Builder& aBuilder = BOPTest_Objects::Builder();
- const BOPCol_DataMapOfShapeShape& aDMSD = aBuilder.ShapesSD();
+ const TopTools_DataMapOfShapeShape& aDMSD = aBuilder.ShapesSD();
if (!aDMSD.IsBound(aS)) {
di << " shape has no sd shape\n";
return 0;
//
aBB.MakeCompound(aC);
//
- BOPCol_DataMapIteratorOfDataMapOfShapeShape aItSD;
+ TopTools_DataMapIteratorOfDataMapOfShapeShape aItSD;
aItSD.Initialize(aDMSD);
for (i = 0; aItSD.More(); aItSD.Next()) {
const TopoDS_Shape& aSK = aItSD.Key();
}
//
TopoDS_Face aF;
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
Standard_Integer i;
//
TopoDS_Iterator aItS(aS);
}
//
char buf[128];
- const BOPCol_ListOfShape& aLFR = aBF.Areas();
- BOPCol_ListIteratorOfListOfShape aIt(aLFR);
+ const TopTools_ListOfShape& aLFR = aBF.Areas();
+ TopTools_ListIteratorOfListOfShape aIt(aLFR);
for (i = 1; aIt.More(); aIt.Next(), ++i) {
const TopoDS_Shape& aFR = aIt.Value();
sprintf(buf, "%s_%d", a[1], i);
return 1;
}
//
- BOPCol_ListOfShape aLF;
+ TopTools_ListOfShape aLF;
TopExp_Explorer aExp(aS, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aF = aExp.Current();
aBB.MakeCompound(aSolids);
//
char buf[128];
- const BOPCol_ListOfShape& aLSR = aBS.Areas();
- BOPCol_ListIteratorOfListOfShape aIt(aLSR);
+ const TopTools_ListOfShape& aLSR = aBS.Areas();
+ TopTools_ListIteratorOfListOfShape aIt(aLSR);
for (i = 1; aIt.More(); aIt.Next(), ++i) {
const TopoDS_Shape& aSR = aIt.Value();
sprintf(buf, "%s_%d", a[1], i);
//purpose :
//=======================================================================
template <class InterfType> void DumpInterfs
- (const BOPCol_NCVector<InterfType>& theVInterf,
+ (const NCollection_Vector<InterfType>& theVInterf,
Draw_Interpretor& di)
{
Standard_Integer i, aNb, n1, n2, nNew;
char buf[64];
//
- aNb = theVInterf.Extent();
+ aNb = theVInterf.Length();
if (aNb == 0) {
di << "Not found\n";
return;
template <class InterfType> void SearchNewIndex
(const char* theCType,
const Standard_Integer theInd,
- const BOPCol_NCVector<InterfType>& theVInterf,
+ const NCollection_Vector<InterfType>& theVInterf,
Draw_Interpretor& di)
{
char buf[64];
Standard_Integer i, aNb, n1, n2, nNew;
//
bFound = Standard_False;
- aNb = theVInterf.Extent();
+ aNb = theVInterf.Length();
for (i = 0 ; i < aNb; ++i) {
const InterfType& anInt = theVInterf(i);
nNew = anInt.IndexNew();
//
aS=DBRep::Get(a[1]);
//
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes();
aIt.Initialize(aS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
//
aS=DBRep::Get(a[1]);
//
- BOPCol_ListOfShape& aLT=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLT=BOPTest_Objects::Tools();
aIt.Initialize(aS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
Standard_Integer i;
TopoDS_Shape aS;
//
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes();
for (i = 1; i < n; ++i) {
aS=DBRep::Get(a[i]);
aLS.Append(aS);
printf(" use bclearobjects\n");
return 0;
}
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes();
aLS.Clear();
//
return 0;
Standard_Integer i;
TopoDS_Shape aS;
//
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Tools();
for (i = 1; i < n; ++i) {
aS=DBRep::Get(a[i]);
aLS.Append(aS);
printf(" use bcleartools\n");
return 0;
}
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Tools();
aLS.Clear();
//
return 0;
myBuilder=myBuilderDefault;
};
//
- BOPCol_ListOfShape& Shapes() {
+ TopTools_ListOfShape& Shapes() {
return myShapes;
}
//
- BOPCol_ListOfShape& Tools() {
+ TopTools_ListOfShape& Tools() {
return myTools;
}
//
BOPAlgo_Builder* myBuilder;
BOPAlgo_Builder* myBuilderDefault;
//
- BOPCol_ListOfShape myShapes;
- BOPCol_ListOfShape myTools;
+ TopTools_ListOfShape myShapes;
+ TopTools_ListOfShape myTools;
Standard_Boolean myRunParallel;
Standard_Boolean myNonDestructive;
Standard_Real myFuzzyValue;
//function : Shapes
//purpose :
//=======================================================================
-BOPCol_ListOfShape& BOPTest_Objects::Shapes()
+TopTools_ListOfShape& BOPTest_Objects::Shapes()
{
return GetSession().Shapes();
}
//function : Tools
//purpose :
//=======================================================================
-BOPCol_ListOfShape& BOPTest_Objects::Tools()
+TopTools_ListOfShape& BOPTest_Objects::Tools()
{
return GetSession().Tools();
}
#include <Standard_Handle.hxx>
#include <BOPDS_PDS.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <BOPAlgo_PBuilder.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
Standard_EXPORT static BOPAlgo_Splitter& Splitter();
- Standard_EXPORT static BOPCol_ListOfShape& Shapes();
+ Standard_EXPORT static TopTools_ListOfShape& Shapes();
- Standard_EXPORT static BOPCol_ListOfShape& Tools();
+ Standard_EXPORT static TopTools_ListOfShape& Tools();
Standard_EXPORT static void SetBuilder (const BOPAlgo_PBuilder& theBuilder);
Standard_Boolean bRunParallel, bNonDestructive, bShowTime;
Standard_Integer i, aNbS;
Standard_Real aTol;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_ListOfShape aLC;
- BOPCol_ListOfShape& aLS=BOPTest_Objects::Shapes();
+ TopTools_ListIteratorOfListOfShape aIt;
+ TopTools_ListOfShape aLC;
+ TopTools_ListOfShape& aLS=BOPTest_Objects::Shapes();
aNbS=aLS.Extent();
if (!aNbS) {
di << " no objects to process\n";
}
}
//
- BOPCol_ListOfShape& aLT=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLT=BOPTest_Objects::Tools();
//
aIt.Initialize(aLS);
for (; aIt.More(); aIt.Next()) {
Standard_Boolean bRunParallel, bShowTime;
Standard_Integer i;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
BOPAlgo_PaveFiller& aPF=BOPTest_Objects::PaveFiller();
//
BOPAlgo_Builder& aBuilder=BOPTest_Objects::Builder();
aBuilder.Clear();
//
- BOPCol_ListOfShape& aLSObj=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLSObj=BOPTest_Objects::Shapes();
aIt.Initialize(aLSObj);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
aBuilder.AddArgument(aS);
}
//
- BOPCol_ListOfShape& aLSTool=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLSTool=BOPTest_Objects::Tools();
aIt.Initialize(aLSTool);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
Standard_Boolean bRunParallel, bShowTime;
Standard_Integer iOp, i;
BOPAlgo_Operation aOp;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
iOp=Draw::Atoi(a[2]);
if (iOp<0 || iOp>4) {
//
pBuilder->Clear();
//
- BOPCol_ListOfShape& aLSObj=BOPTest_Objects::Shapes();
+ TopTools_ListOfShape& aLSObj=BOPTest_Objects::Shapes();
aIt.Initialize(aLSObj);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
if (aOp!=BOPAlgo_SECTION) {
BOPAlgo_BOP *pBOP=(BOPAlgo_BOP *)pBuilder;
//
- BOPCol_ListOfShape& aLSTools=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLSTools=BOPTest_Objects::Tools();
aIt.Initialize(aLSTools);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
pBOP->SetOperation(aOp);
}
else {
- BOPCol_ListOfShape& aLSTools=BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLSTools=BOPTest_Objects::Tools();
aIt.Initialize(aLSTools);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
pSplitter->Clear();
//
// set objects
- const BOPCol_ListOfShape& aLSObjects = BOPTest_Objects::Shapes();
+ const TopTools_ListOfShape& aLSObjects = BOPTest_Objects::Shapes();
pSplitter->SetArguments(aLSObjects);
//
// set tools
- BOPCol_ListOfShape& aLSTools = BOPTest_Objects::Tools();
+ TopTools_ListOfShape& aLSTools = BOPTest_Objects::Tools();
pSplitter->SetTools(aLSTools);
//
// set options
BRepAdaptor_Surface aS(aF, Standard_False);
if (aS.GetType() == GeomAbs_Plane)
{
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
TopExp_Explorer exp1(aF, TopAbs_EDGE);
for (; exp1.More(); exp1.Next())
aLE.Append(exp1.Current());
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPTools.hxx>
-#include <TopExp_Explorer.hxx>
-#include <TopoDS_Shape.hxx>
-
-//=======================================================================
-//function : MapShapes
-//purpose :
-//=======================================================================
-void BOPTools::MapShapes(const TopoDS_Shape& S,
- BOPCol_MapOfShape& M)
-{
- M.Add(S);
- TopoDS_Iterator It(S);
- while (It.More()) {
- MapShapes(It.Value(),M);
- It.Next();
- }
-}
-
-
-//=======================================================================
-//function : MapShapes
-//purpose :
-//=======================================================================
-void BOPTools::MapShapes(const TopoDS_Shape& S,
- BOPCol_IndexedMapOfShape& M)
-{
- M.Add(S);
- TopoDS_Iterator It(S);
- while (It.More()) {
- MapShapes(It.Value(),M);
- It.Next();
- }
-}
-
-//=======================================================================
-//function : MapShapes
-//purpose :
-//=======================================================================
-void BOPTools::MapShapes(const TopoDS_Shape& S,
- const TopAbs_ShapeEnum T,
- BOPCol_IndexedMapOfShape& M)
-{
- TopExp_Explorer Ex(S,T);
- while (Ex.More()) {
- M.Add(Ex.Current());
- Ex.Next();
- }
-}
-//=======================================================================
-//function : MapShapesAndAncestors
-//purpose :
-//=======================================================================
-void BOPTools::MapShapesAndAncestors
- (const TopoDS_Shape& S,
- const TopAbs_ShapeEnum TS,
- const TopAbs_ShapeEnum TA,
- BOPCol_IndexedDataMapOfShapeListOfShape& Map)
-{
- // visit ancestors
- TopExp_Explorer aExA(S, TA);
- for (; aExA.More(); aExA.Next())
- {
- // visit shapes
- const TopoDS_Shape& anAnc = aExA.Current();
- //
- TopExp_Explorer aExS(anAnc, TS);
- for (; aExS.More(); aExS.Next())
- {
- const TopoDS_Shape& aSS = aExS.Current();
- BOPCol_ListOfShape* pLA = Map.ChangeSeek(aSS);
- if (!pLA)
- pLA = &Map(Map.Add(aSS, BOPCol_ListOfShape()));
- pLA->Append(anAnc);
- }
- }
-
- // visit shapes not under ancestors
- TopExp_Explorer aExS(S, TS, TA);
- for (; aExS.More(); aExS.Next())
- Map.Add(aExS.Current(), BOPCol_ListOfShape());
-}
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2000-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BOPTools_HeaderFile
-#define _BOPTools_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-class TopoDS_Shape;
-class BOPTools_ShapeSet;
-class BOPTools_EdgeSet;
-class BOPTools_AlgoTools;
-class BOPTools_Set;
-class BOPTools_SetMapHasher;
-class BOPTools_AlgoTools2D;
-class BOPTools_AlgoTools3D;
-
-
-
-class BOPTools
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, BOPCol_MapOfShape& M);
-
- Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, BOPCol_IndexedMapOfShape& M);
-
- Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum T, BOPCol_IndexedMapOfShape& M);
-
- Standard_EXPORT static void MapShapesAndAncestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum TS, const TopAbs_ShapeEnum TA, BOPCol_IndexedDataMapOfShapeListOfShape& M);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class BOPTools_ShapeSet;
-friend class BOPTools_EdgeSet;
-friend class BOPTools_AlgoTools;
-friend class BOPTools_Set;
-friend class BOPTools_SetMapHasher;
-friend class BOPTools_AlgoTools2D;
-friend class BOPTools_AlgoTools3D;
-
-};
-
-
-
-
-
-
-
-#endif // _BOPTools_HeaderFile
// commercial license or contractual agreement.
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_MapOfOrientedShape.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
#include <NCollection_Array1.hxx>
#include <algorithm>
static
Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
- const BOPCol_ListOfShape& thLF,
+ const TopTools_ListOfShape& thLF,
BOPTools_ListOfCoupleOfShape& theLCFF,
Handle(IntTools_Context)& theContext);
static
(const TopoDS_Shape& theS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
- BOPCol_ListOfListOfShape& theLCB,
- BOPCol_IndexedDataMapOfShapeListOfShape& theConnectionMap)
+ TopTools_ListOfListOfShape& theLCB,
+ TopTools_IndexedDataMapOfShapeListOfShape& theConnectionMap)
{
// Map shapes to find connected elements
- BOPTools::MapShapesAndAncestors(theS, theConnectionType, theElementType, theConnectionMap);
+ TopExp::MapShapesAndAncestors(theS, theConnectionType, theElementType, theConnectionMap);
// Fence map
- BOPCol_MapOfShape aMFence;
+ TopTools_MapOfShape aMFence;
TopExp_Explorer aExp(theS, theElementType);
for (; aExp.More(); aExp.Next())
continue;
}
// The block
- BOPCol_ListOfShape aLBlock;
+ TopTools_ListOfShape aLBlock;
// Start the block
aLBlock.Append(aS);
// Look for connected parts
- BOPCol_ListIteratorOfListOfShape aItB(aLBlock);
+ TopTools_ListIteratorOfListOfShape aItB(aLBlock);
for (; aItB.More(); aItB.Next())
{
const TopoDS_Shape& aS1 = aItB.Value();
for (; aExpSS.More(); aExpSS.Next())
{
const TopoDS_Shape& aSubS = aExpSS.Current();
- const BOPCol_ListOfShape& aLS = theConnectionMap.FindFromKey(aSubS);
- BOPCol_ListIteratorOfListOfShape aItLS(aLS);
+ const TopTools_ListOfShape& aLS = theConnectionMap.FindFromKey(aSubS);
+ TopTools_ListIteratorOfListOfShape aItLS(aLS);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aS2 = aItLS.Value();
(const TopoDS_Shape& theS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
- BOPCol_ListOfShape& theLCB)
+ TopTools_ListOfShape& theLCB)
{
- BOPCol_ListOfListOfShape aLBlocks;
- BOPCol_IndexedDataMapOfShapeListOfShape aCMap;
+ TopTools_ListOfListOfShape aLBlocks;
+ TopTools_IndexedDataMapOfShapeListOfShape aCMap;
BOPTools_AlgoTools::MakeConnexityBlocks(theS, theConnectionType, theElementType, aLBlocks, aCMap);
// Make compound from each block
- BOPCol_ListIteratorOfListOfListOfShape aItB(aLBlocks);
+ TopTools_ListIteratorOfListOfListOfShape aItB(aLBlocks);
for (; aItB.More(); aItB.Next())
{
- const BOPCol_ListOfShape& aLB = aItB.Value();
+ const TopTools_ListOfShape& aLB = aItB.Value();
TopoDS_Compound aBlock;
BRep_Builder().MakeCompound(aBlock);
- for (BOPCol_ListIteratorOfListOfShape it(aLB); it.More(); it.Next())
+ for (TopTools_ListIteratorOfListOfShape it(aLB); it.More(); it.Next())
BRep_Builder().Add(aBlock, it.Value());
theLCB.Append(aBlock);
// purpose:
//=======================================================================
void BOPTools_AlgoTools::MakeConnexityBlocks
- (const BOPCol_ListOfShape& theLS,
+ (const TopTools_ListOfShape& theLS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
BOPTools_ListOfConnexityBlock& theLCB)
TopoDS_Compound aCStart;
aBB.MakeCompound(aCStart);
- BOPCol_MapOfShape aMFence, aMNRegular;
+ TopTools_MapOfShape aMFence, aMNRegular;
- BOPCol_ListIteratorOfListOfShape aItL(theLS);
+ TopTools_ListIteratorOfListOfShape aItL(theLS);
for (; aItL.More(); aItL.Next())
{
const TopoDS_Shape& aS = aItL.Value();
aMNRegular.Add(aS);
}
- BOPCol_ListOfListOfShape aLCB;
- BOPCol_IndexedDataMapOfShapeListOfShape aCMap;
+ TopTools_ListOfListOfShape aLCB;
+ TopTools_IndexedDataMapOfShapeListOfShape aCMap;
BOPTools_AlgoTools::MakeConnexityBlocks(aCStart, theConnectionType, theElementType, aLCB, aCMap);
// Save the blocks and check their regularity
- BOPCol_ListIteratorOfListOfListOfShape aItB(aLCB);
+ TopTools_ListIteratorOfListOfListOfShape aItB(aLCB);
for (; aItB.More(); aItB.Next())
{
- const BOPCol_ListOfShape& aBlock = aItB.Value();
+ const TopTools_ListOfShape& aBlock = aItB.Value();
BOPTools_ConnexityBlock aCB;
- BOPCol_ListOfShape& aLCS = aCB.ChangeShapes();
+ TopTools_ListOfShape& aLCS = aCB.ChangeShapes();
Standard_Boolean bRegular = Standard_True;
- for (BOPCol_ListIteratorOfListOfShape it(aBlock); it.More(); it.Next())
+ for (TopTools_ListIteratorOfListOfShape it(aBlock); it.More(); it.Next())
{
TopoDS_Shape aS = it.Value();
if (aMNRegular.Contains(aS))
void BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape& theWire)
{
// make vertex-edges connexity map
- BOPCol_IndexedDataMapOfShapeListOfShape aVEMap;
- BOPTools::MapShapesAndAncestors(theWire, TopAbs_VERTEX, TopAbs_EDGE, aVEMap);
+ TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
+ TopExp::MapShapesAndAncestors(theWire, TopAbs_VERTEX, TopAbs_EDGE, aVEMap);
//
if (aVEMap.IsEmpty()) {
return;
TopoDS_Wire aWire;
aBB.MakeWire(aWire);
// fence map
- BOPCol_MapOfOrientedShape aMFence;
+ TopTools_MapOfOrientedShape aMFence;
//
TopoDS_Iterator aIt(theWire);
for (; aIt.More(); aIt.Next()) {
TopoDS_Shape aVC = !i ? aV1 : aV2;
//
for (;;) {
- const BOPCol_ListOfShape& aLE = aVEMap.FindFromKey(aVC);
+ const TopTools_ListOfShape& aLE = aVEMap.FindFromKey(aVC);
if (aLE.Extent() != 2) {
// free vertex or multi-connexity, go to the next edge
break;
//
Standard_Boolean bStop = Standard_True;
//
- BOPCol_ListIteratorOfListOfShape aItLE(aLE);
+ TopTools_ListIteratorOfListOfShape aItLE(aLE);
for (; aItLE.More(); aItLE.Next()) {
const TopoDS_Edge& aEN = TopoDS::Edge(aItLE.Value());
if (aMFence.Contains(aEN)) {
TopAbs_Orientation anOrE1, anOrE2;
TopoDS_Face aF1x, aF2x;
TopoDS_Shape aShellNew;
- BOPCol_IndexedDataMapOfShapeListOfShape aEFMap;
- BOPCol_IndexedMapOfShape aProcessedFaces;
+ TopTools_IndexedDataMapOfShapeListOfShape aEFMap;
+ TopTools_IndexedMapOfShape aProcessedFaces;
BRep_Builder aBB;
//
BOPTools_AlgoTools::MakeContainer(TopAbs_SHELL, aShellNew);
//
- BOPTools::MapShapesAndAncestors(aShell,
+ TopExp::MapShapesAndAncestors(aShell,
TopAbs_EDGE, TopAbs_FACE,
aEFMap);
aNbE=aEFMap.Extent();
//
// One seam edge in aEFMap contains 2 equivalent faces.
for (i=1; i<=aNbE; ++i) {
- BOPCol_ListOfShape& aLF=aEFMap.ChangeFromIndex(i);
+ TopTools_ListOfShape& aLF=aEFMap.ChangeFromIndex(i);
aNbF=aLF.Extent();
if (aNbF>1) {
- BOPCol_ListOfShape aLFTmp;
- BOPCol_IndexedMapOfShape aFM;
+ TopTools_ListOfShape aLFTmp;
+ TopTools_IndexedMapOfShape aFM;
//
- BOPCol_ListIteratorOfListOfShape anIt(aLF);
+ TopTools_ListIteratorOfListOfShape anIt(aLF);
for (; anIt.More(); anIt.Next()) {
const TopoDS_Shape& aF=anIt.Value();
if (!aFM.Contains(aF)) {
continue;
}
//
- const BOPCol_ListOfShape& aLF=aEFMap.FindFromIndex(i);
+ const TopTools_ListOfShape& aLF=aEFMap.FindFromIndex(i);
aNbF=aLF.Extent();
if (aNbF!=2) {
continue;
continue;
}
//
- const BOPCol_ListOfShape& aLF=aEFMap.FindFromIndex(i);
+ const TopTools_ListOfShape& aLF=aEFMap.FindFromIndex(i);
aNbF=aLF.Extent();
if (aNbF!=2) {
- BOPCol_ListIteratorOfListOfShape anIt(aLF);
+ TopTools_ListIteratorOfListOfShape anIt(aLF);
for(; anIt.More(); anIt.Next()) {
const TopoDS_Face& aF=(*(TopoDS_Face*)(&anIt.Value()));
if (!aProcessedFaces.Contains(aF)) {
// purpose:
//=======================================================================
void BOPTools_AlgoTools::MakeConnexityBlock
- (BOPCol_ListOfShape& theLFIn,
- BOPCol_IndexedMapOfShape& theMEAvoid,
- BOPCol_ListOfShape& theLCB,
+ (TopTools_ListOfShape& theLFIn,
+ TopTools_IndexedMapOfShape& theMEAvoid,
+ TopTools_ListOfShape& theLCB,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
Standard_Integer aNbF, aNbAdd1, aNbAdd, i;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
- BOPCol_IndexedMapOfShape aMCB(100, theAllocator);
- BOPCol_IndexedMapOfShape aMAdd(100, theAllocator);
- BOPCol_IndexedMapOfShape aMAdd1(100, theAllocator);
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF(100, theAllocator);
+ TopTools_IndexedMapOfShape aMCB(100, theAllocator);
+ TopTools_IndexedMapOfShape aMAdd(100, theAllocator);
+ TopTools_IndexedMapOfShape aMAdd1(100, theAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF(100, theAllocator);
//
// 1. aMEF
aNbF=theLFIn.Extent();
aIt.Initialize(theLFIn);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value();
- BOPTools::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
//
// 2. aMCB
continue;
}
//
- const BOPCol_ListOfShape& aLF=aMEF.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE);
aIt.Initialize(aLF);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aFx=aIt.Value();
(const TopoDS_Face& theF,
const TopoDS_Solid& theRef,
const Standard_Real theTol,
- BOPCol_IndexedMapOfShape& theBounds,
+ TopTools_IndexedMapOfShape& theBounds,
Handle(IntTools_Context)& theContext)
{
TopAbs_State aState;
Standard_Boolean BOPTools_AlgoTools::IsInternalFace
(const TopoDS_Face& theFace,
const TopoDS_Solid& theSolid,
- BOPCol_IndexedDataMapOfShapeListOfShape& theMEF,
+ TopTools_IndexedDataMapOfShapeListOfShape& theMEF,
const Standard_Real theTol,
Handle(IntTools_Context)& theContext)
{
TopAbs_Orientation aOr;
TopoDS_Edge aE1;
TopExp_Explorer aExp;
- BOPCol_ListIteratorOfListOfShape aItF;
+ TopTools_ListIteratorOfListOfShape aItF;
//
// For all invoked functions: [::IsInternalFace(...)]
// the returned value iRet means:
continue;
}
// aE
- BOPCol_ListOfShape& aLF=theMEF.ChangeFromKey(aE);
+ TopTools_ListOfShape& aLF=theMEF.ChangeFromKey(aE);
aNbF=aLF.Extent();
if (!aNbF) {
return iRet != 0; // it can not be so
// 2. Classify face using classifier
//
TopAbs_State aState;
- BOPCol_IndexedMapOfShape aBounds;
+ TopTools_IndexedMapOfShape aBounds;
//
- BOPTools::MapShapes(theSolid, TopAbs_EDGE, aBounds);
+ TopExp::MapShapes(theSolid, TopAbs_EDGE, aBounds);
//
aState=BOPTools_AlgoTools::ComputeState(theFace, theSolid,
theTol, aBounds, theContext);
Standard_Integer BOPTools_AlgoTools::IsInternalFace
(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
- BOPCol_ListOfShape& theLF,
+ TopTools_ListOfShape& theLF,
Handle(IntTools_Context)& theContext)
{
Standard_Integer aNbF, iRet;
// function: MakeVertex
// purpose :
//=======================================================================
-void BOPTools_AlgoTools::MakeVertex(const BOPCol_ListOfShape& aLV,
+void BOPTools_AlgoTools::MakeVertex(const TopTools_ListOfShape& aLV,
TopoDS_Vertex& aVnew)
{
Standard_Integer aNb = aLV.Extent();
//purpose :
//=======================================================================
Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
- const BOPCol_ListOfShape& thLF,
+ const TopTools_ListOfShape& thLF,
BOPTools_ListOfCoupleOfShape& theLCFF,
Handle(IntTools_Context)& theContext)
{
Standard_Boolean bFound;
Standard_Integer i, aNbCEF;
TopAbs_Orientation aOr, aOrC = TopAbs_FORWARD;
- BOPCol_MapOfShape aMFP;
+ TopTools_MapOfShape aMFP;
TopoDS_Face aF1, aF2;
TopoDS_Edge aEL, aE1;
- BOPCol_ListIteratorOfListOfShape aItLF;
+ TopTools_ListIteratorOfListOfShape aItLF;
BOPTools_CoupleOfShape aCEF, aCFF;
BOPTools_ListOfCoupleOfShape aLCEF, aLCEFx;
BOPTools_ListIteratorOfListOfCoupleOfShape aIt;
Standard_Boolean bRet;
Standard_Integer i, aNbE, aNbF;
TopAbs_Orientation aOrF;
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF;
- BOPCol_ListIteratorOfListOfShape aItLS;
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF;
+ TopTools_ListIteratorOfListOfShape aItLS;
//
bRet=Standard_False;
//
- BOPTools::MapShapesAndAncestors(aSh, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapesAndAncestors(aSh, TopAbs_EDGE, TopAbs_FACE, aMEF);
//
aNbE=aMEF.Extent();
for (i=1; i<=aNbE; ++i) {
}
//
aNbF=0;
- const BOPCol_ListOfShape& aLF=aMEF(i);
+ const TopTools_ListOfShape& aLF=aMEF(i);
aItLS.Initialize(aLF);
for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aF=aItLS.Value();
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <Standard_Boolean.hxx>
-#include <TopAbs_ShapeEnum.hxx>
#include <BOPTools_ListOfCoupleOfShape.hxx>
#include <BOPTools_ListOfConnexityBlock.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfListOfShape.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopAbs_State.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_ListOfListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
#include <Precision.hxx>
class TopoDS_Vertex;
class gp_Pnt;
const TopoDS_Vertex& aV2,
const Standard_Real theFuzz = Precision::Confusion());
- Standard_EXPORT static void MakeVertex (const BOPCol_ListOfShape& aLV, TopoDS_Vertex& aV);
+ Standard_EXPORT static void MakeVertex (const TopTools_ListOfShape& aLV, TopoDS_Vertex& aV);
Standard_EXPORT static void MakeEdge (const IntTools_Curve& theCurve, const TopoDS_Vertex& theV1, const Standard_Real theT1, const TopoDS_Vertex& theV2, const Standard_Real theT2, const Standard_Real theTolR3D, TopoDS_Edge& theE);
//! * 0 state is not IN
//! * 1 state is IN
//! * 2 state can not be found by the method of angles
- Standard_EXPORT static Standard_Integer IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, BOPCol_ListOfShape& theLF, Handle(IntTools_Context)& theContext);
+ Standard_EXPORT static Standard_Integer IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, TopTools_ListOfShape& theLF, Handle(IntTools_Context)& theContext);
//! Returns True if the face theFace is inside the
//! solid theSolid.
//! theMEF - Map Edge/Faces for theSolid
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, BOPCol_IndexedDataMapOfShapeListOfShape& theMEF, const Standard_Real theTol, Handle(IntTools_Context)& theContext);
+ Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, TopTools_IndexedDataMapOfShapeListOfShape& theMEF, const Standard_Real theTol, Handle(IntTools_Context)& theContext);
//! For the face theFace gets the edge theEdgeOnF
//! that is the same as theEdge
//! theBounds - set of edges of theFace to avoid
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, const Standard_Real theTol, BOPCol_IndexedMapOfShape& theBounds, Handle(IntTools_Context)& theContext);
+ Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, const Standard_Real theTol, TopTools_IndexedMapOfShape& theBounds, Handle(IntTools_Context)& theContext);
//! Computes the 3-D state of the shape theShape
//! toward solid theSolid.
//! theLSCB in terms of connexity by edges
//! theMapAvoid - set of edges to avoid for
//! the treatment
- Standard_EXPORT static void MakeConnexityBlock (BOPCol_ListOfShape& theLS, BOPCol_IndexedMapOfShape& theMapAvoid, BOPCol_ListOfShape& theLSCB, const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT static void MakeConnexityBlock (TopTools_ListOfShape& theLS, TopTools_IndexedMapOfShape& theMapAvoid, TopTools_ListOfShape& theLSCB, const Handle(NCollection_BaseAllocator)& theAllocator);
//! For the compound <theS> builds the blocks (compounds) of
//! elements of type <theElementType> connected through the shapes
Standard_EXPORT static void MakeConnexityBlocks(const TopoDS_Shape& theS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
- BOPCol_ListOfShape& theLCB);
+ TopTools_ListOfShape& theLCB);
//! For the compound <theS> builds the blocks (compounds) of
//! elements of type <theElementType> connected through the shapes
Standard_EXPORT static void MakeConnexityBlocks(const TopoDS_Shape& theS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
- BOPCol_ListOfListOfShape& theLCB,
- BOPCol_IndexedDataMapOfShapeListOfShape& theConnectionMap);
+ TopTools_ListOfListOfShape& theLCB,
+ TopTools_IndexedDataMapOfShapeListOfShape& theConnectionMap);
//! Makes connexity blocks of elements of the given type with the given type of the
//! connecting elements. The blocks are checked on regularity (multi-connectivity)
//! and stored to the list of blocks <theLCB>.
- Standard_EXPORT static void MakeConnexityBlocks(const BOPCol_ListOfShape& theLS,
+ Standard_EXPORT static void MakeConnexityBlocks(const TopTools_ListOfShape& theLS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
BOPTools_ListOfConnexityBlock& theLCB);
//! perform.
Standard_EXPORT static void CorrectTolerances
(const TopoDS_Shape& theS,
- const BOPCol_IndexedMapOfShape& theMapToAvoid,
+ const TopTools_IndexedMapOfShape& theMapToAvoid,
const Standard_Real theTolMax = 0.0001,
const Standard_Boolean theRunParallel = Standard_False);
//! in terms of BRepCheck_InvalidCurveOnSurface.
Standard_EXPORT static void CorrectCurveOnSurface
(const TopoDS_Shape& theS,
- const BOPCol_IndexedMapOfShape& theMapToAvoid,
+ const TopTools_IndexedMapOfShape& theMapToAvoid,
const Standard_Real theTolMax = 0.0001,
const Standard_Boolean theRunParallel = Standard_False);
//! in terms of BRepCheck_InvalidPointOnCurve.
Standard_EXPORT static void CorrectPointOnCurve
(const TopoDS_Shape& theS,
- const BOPCol_IndexedMapOfShape& theMapToAvoid,
+ const TopTools_IndexedMapOfShape& theMapToAvoid,
const Standard_Real theTolMax = 0.0001,
const Standard_Boolean theRunParallel = Standard_False);
//! Corrects tolerance values of the sub-shapes of the shape <theS> if needed.
Standard_EXPORT static void CorrectShapeTolerances
(const TopoDS_Shape& theS,
- const BOPCol_IndexedMapOfShape& theMapToAvoid,
+ const TopTools_IndexedMapOfShape& theMapToAvoid,
const Standard_Boolean theRunParallel = Standard_False);
//! Retutns dimension of the shape <theS>.
// commercial license or contractual agreement.
-#include <BOPCol_IndexedMapOfShape.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <Standard_Integer.hxx>
class TopoDS_Edge;
class TopoDS_Face;
#include <Bnd_Box.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
static void Add(const TopoDS_Shape& aS,
- BOPCol_IndexedMapOfShape& myShapes,
+ TopTools_IndexedMapOfShape& myShapes,
Standard_Boolean& bHasGeometry);
static
Standard_Boolean HasGeometry(const TopoDS_Shape& aS);
{
Standard_Boolean bHasGeometry=Standard_False;
//
- BOPCol_IndexedMapOfShape myShapes;
+ TopTools_IndexedMapOfShape myShapes;
//
Add(aS, myShapes, bHasGeometry);
//purpose :
//=======================================================================
void Add(const TopoDS_Shape& aS,
- BOPCol_IndexedMapOfShape& myShapes,
+ TopTools_IndexedMapOfShape& myShapes,
Standard_Boolean& bHasGeometry)
{
Standard_Integer anIndex;
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BOPTools_Parallel.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <IntTools_Curve.hxx>
#include <IntTools_Range.hxx>
#include <IntTools_Tools.hxx>
+#include <NCollection_Vector.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
static
void CheckEdge (const TopoDS_Edge& E,
const Standard_Real aMaxTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
static
void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
const TopoDS_Face& S,
const Standard_Real aMaxTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
static
Standard_Boolean Validate(const Adaptor3d_Curve& CRef,
const Adaptor3d_Curve& Other,
static
void CorrectVertexTolerance(const TopoDS_Edge& aE,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
static
void CorrectWires(const TopoDS_Face& aF,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
static
void UpdateEdges(const TopoDS_Face& aF,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
static
void UpdateShape(const TopoDS_Shape& aS,
const Standard_Real aTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid);
+ const TopTools_IndexedMapOfShape& aMapToAvoid);
//=======================================================================
//class : BOPTools_CPC
return myMaxTol;
}
//
- void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
+ void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
protected:
Standard_Real myMaxTol;
TopoDS_Edge myEdge;
- const BOPCol_IndexedMapOfShape* mypMapToAvoid;
+ const TopTools_IndexedMapOfShape* mypMapToAvoid;
};
//
//=======================================================================
-typedef BOPCol_NCVector<BOPTools_CPC> BOPTools_VectorOfCPC;
+typedef NCollection_Vector<BOPTools_CPC> BOPTools_VectorOfCPC;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPTools_CPC,
BOPTools_VectorOfCPC> BOPTools_CPCFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPTools_CPCFunctor,
BOPTools_VectorOfCPC> BOPTools_CPCCnt;
//
myFace=aF;
}
//
- void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
+ void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
//
protected:
TopoDS_Face myFace;
- const BOPCol_IndexedMapOfShape* mypMapToAvoid;
+ const TopTools_IndexedMapOfShape* mypMapToAvoid;
};
//=======================================================================
-typedef BOPCol_NCVector<BOPTools_CWT> BOPTools_VectorOfCWT;
+typedef NCollection_Vector<BOPTools_CWT> BOPTools_VectorOfCWT;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPTools_CWT,
BOPTools_VectorOfCWT> BOPTools_CWTFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPTools_CWTFunctor,
BOPTools_VectorOfCWT> BOPTools_CWTCnt;
//
myMaxTol=aMaxTol;
}
//
- void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
+ void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
Standard_Real myMaxTol;
TopoDS_Edge myEdge;
TopoDS_Face myFace;
- const BOPCol_IndexedMapOfShape* mypMapToAvoid;
+ const TopTools_IndexedMapOfShape* mypMapToAvoid;
};
//=======================================================================
-typedef BOPCol_NCVector<BOPTools_CDT> BOPTools_VectorOfCDT;
+typedef NCollection_Vector<BOPTools_CDT> BOPTools_VectorOfCDT;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPTools_CDT,
BOPTools_VectorOfCDT> BOPTools_CDTFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPTools_CDTFunctor,
BOPTools_VectorOfCDT> BOPTools_CDTCnt;
//
myEdge=aE;
}
//
- void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
+ void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
//
protected:
TopoDS_Edge myEdge;
- const BOPCol_IndexedMapOfShape* mypMapToAvoid;
+ const TopTools_IndexedMapOfShape* mypMapToAvoid;
};
//
//=======================================================================
-typedef BOPCol_NCVector<BOPTools_CVT> BOPTools_VectorOfCVT;
+typedef NCollection_Vector<BOPTools_CVT> BOPTools_VectorOfCVT;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPTools_CVT,
BOPTools_VectorOfCVT> BOPTools_CVTFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPTools_CVTFunctor,
BOPTools_VectorOfCVT> BOPTools_CVTCnt;
//
myFace=aF;
}
//
- void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
+ void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
//
protected:
TopoDS_Face myFace;
- const BOPCol_IndexedMapOfShape* mypMapToAvoid;
+ const TopTools_IndexedMapOfShape* mypMapToAvoid;
};
//=======================================================================
-typedef BOPCol_NCVector<BOPTools_CET> BOPTools_VectorOfCET;
+typedef NCollection_Vector<BOPTools_CET> BOPTools_VectorOfCET;
//
-typedef BOPCol_Functor
+typedef BOPTools_Functor
<BOPTools_CET,
BOPTools_VectorOfCET> BOPTools_CETFunctor;
//
-typedef BOPCol_Cnt
+typedef BOPTools_Cnt
<BOPTools_CETFunctor,
BOPTools_VectorOfCET> BOPTools_CETCnt;
//
//=======================================================================
void BOPTools_AlgoTools::CorrectTolerances
(const TopoDS_Shape& aShape,
- const BOPCol_IndexedMapOfShape& aMapToAvoid,
+ const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
//=======================================================================
void BOPTools_AlgoTools::CorrectPointOnCurve
(const TopoDS_Shape& aS,
- const BOPCol_IndexedMapOfShape& aMapToAvoid,
+ const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
aExp.Init(aS, TopAbs_EDGE);
for(; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
- BOPTools_CPC& aCPC=aVCPC.Append1();
+ BOPTools_CPC& aCPC=aVCPC.Appended();
aCPC.SetEdge(aE);
aCPC.SetMaxTol(aMaxTol);
aCPC.SetMapToAvoid(aMapToAvoid);
//=======================================================================
void BOPTools_AlgoTools::CorrectCurveOnSurface
(const TopoDS_Shape& aS,
- const BOPCol_IndexedMapOfShape& aMapToAvoid,
+ const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
for (; aExpF.More(); aExpF.Next()) {
const TopoDS_Face& aF=*((TopoDS_Face*)&aExpF.Current());
//
- BOPTools_CWT& aCWT=aVCWT.Append1();
+ BOPTools_CWT& aCWT=aVCWT.Appended();
aCWT.SetFace(aF);
aCWT.SetMapToAvoid(aMapToAvoid);
//
for (; aExpE.More(); aExpE.Next()) {
const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExpE.Current());
//
- BOPTools_CDT& aCDT=aVCDT.Append1();
+ BOPTools_CDT& aCDT=aVCDT.Appended();
aCDT.SetEdge(aE);
aCDT.SetFace(aF);
aCDT.SetMaxTol(aMaxTol);
//=======================================================================
void BOPTools_AlgoTools::CorrectShapeTolerances
(const TopoDS_Shape& aShape,
- const BOPCol_IndexedMapOfShape& aMapToAvoid,
+ const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Boolean bRunParallel)
{
TopExp_Explorer aExp;
aExp.Init(aShape, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE = *(TopoDS_Edge*)&aExp.Current();
- BOPTools_CVT& aCVT=aVCVT.Append1();
+ BOPTools_CVT& aCVT=aVCVT.Appended();
aCVT.SetEdge(aE);
aCVT.SetMapToAvoid(aMapToAvoid);
}
aExp.Init(aShape, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Face& aF = *(TopoDS_Face*)&aExp.Current();
- BOPTools_CET& aCET=aVCET.Append1();
+ BOPTools_CET& aCET=aVCET.Appended();
aCET.SetFace(aF);
aCET.SetMapToAvoid(aMapToAvoid);
}
//=======================================================================
void CheckEdge (const TopoDS_Edge& Ed,
const Standard_Real aMaxTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
TopoDS_Edge aE = Ed;
aE.Orientation(TopAbs_FORWARD);
// purpose :
//=======================================================================
void CorrectWires(const TopoDS_Face& aFx,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
Standard_Integer i, aNbV;
Standard_Real aTol, aTol2, aD2, aD2max, aT1, aT2, aT;
void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
const TopoDS_Face& S,
const Standard_Real aMaxTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
//
// 1. Minimum of conditions to Perform
//purpose :
//=======================================================================
void CorrectVertexTolerance(const TopoDS_Edge& aE,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
Standard_Real aTolE, aTolV;
TopoDS_Iterator aIt;
// purpose :
//=======================================================================
void UpdateEdges(const TopoDS_Face& aF,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
Standard_Real aTolF, aTolE, aTolV;
TopoDS_Iterator aItF, aItW, aItE;
//=======================================================================
void UpdateShape(const TopoDS_Shape& aS,
const Standard_Real aTol,
- const BOPCol_IndexedMapOfShape& aMapToAvoid)
+ const TopTools_IndexedMapOfShape& aMapToAvoid)
{
if (aMapToAvoid.Contains(aS)) {
return;
static
void TreatCompound(const TopoDS_Shape& theC1,
- BOPCol_ListOfShape& theLSX);
+ TopTools_ListOfShape& theLSX);
//=======================================================================
// function: UpdateVertex
{
Standard_Integer i, iRet, iRx0 = 0, iRx = 0;
TopAbs_ShapeEnum aTS;
- BOPCol_ListOfShape aLS;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListOfShape aLS;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aTS=theS.ShapeType();
if (aTS!=TopAbs_COMPOUND) {
//purpose :
//=======================================================================
void TreatCompound(const TopoDS_Shape& theC1,
- BOPCol_ListOfShape& theLSX)
+ TopTools_ListOfShape& theLSX)
{
Standard_Integer aNbC1;
TopAbs_ShapeEnum aType;
- BOPCol_ListOfShape aLC, aLC1;
- BOPCol_ListIteratorOfListOfShape aIt, aIt1;
+ TopTools_ListOfShape aLC, aLC1;
+ TopTools_ListIteratorOfListOfShape aIt, aIt1;
TopoDS_Iterator aItC;
//
aLC.Append (theC1);
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef BOPTools_BoxBndTree_HeaderFile
+#define BOPTools_BoxBndTree_HeaderFile
+
+#include <Bnd_Box.hxx>
+#include <BOPTools_BoxSelector.hxx>
+#include <NCollection_UBTree.hxx>
+#include <Standard_Integer.hxx>
+
+typedef NCollection_UBTree<Standard_Integer, Bnd_Box> BOPTools_BoxBndTree;
+typedef BOPTools_BoxSelector<Bnd_Box> BOPTools_BoxBndTreeSelector;
+
+#endif
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef BOPTools_BoxSelector_HeaderFile
+#define BOPTools_BoxSelector_HeaderFile
+
+#include <TColStd_ListOfInteger.hxx>
+#include <NCollection_UBTree.hxx>
+#include <Standard_Integer.hxx>
+
+//! Template Selector for the unbalanced binary tree
+//! of overlapped bounding boxes.
+template <class BoxType> class BOPTools_BoxSelector :
+ public NCollection_UBTree<Standard_Integer, BoxType>::Selector
+{
+public:
+
+ //! Empty constructor
+ BOPTools_BoxSelector() {};
+
+ //! Checks if the box should be rejected
+ virtual Standard_Boolean Reject(const BoxType& theOther) const
+ {
+ return myBox.IsOut(theOther);
+ }
+
+ //! Accepts the index
+ virtual Standard_Boolean Accept(const Standard_Integer& theIndex)
+ {
+ myIndices.Append(theIndex);
+ return Standard_True;
+ }
+
+ //! Clears the indices
+ void Clear()
+ {
+ myIndices.Clear();
+ }
+
+ //! Sets the box
+ void SetBox(const BoxType& theBox)
+ {
+ myBox = theBox;
+ }
+
+ //! Returns the list of accepted indices
+ const TColStd_ListOfInteger& Indices() const
+ {
+ return myIndices;
+ }
+
+private:
+
+ BoxType myBox;
+ TColStd_ListOfInteger myIndices;
+
+};
+
+#endif
#define BOPTools_ConnexityBlock_HeaderFile
#include <NCollection_BaseAllocator.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
//=======================================================================
//class : ConnexityBlock
myLoops(myAllocator) {
};
//
- const BOPCol_ListOfShape& Shapes()const {
+ const TopTools_ListOfShape& Shapes()const {
return myShapes;
};
//
- BOPCol_ListOfShape& ChangeShapes() {
+ TopTools_ListOfShape& ChangeShapes() {
return myShapes;
};
//
return myRegular;
}
//
- const BOPCol_ListOfShape& Loops()const {
+ const TopTools_ListOfShape& Loops()const {
return myLoops;
};
//
- BOPCol_ListOfShape& ChangeLoops() {
+ TopTools_ListOfShape& ChangeLoops() {
return myLoops;
};
//
protected:
Handle(NCollection_BaseAllocator) myAllocator;
Standard_Boolean myRegular;
- BOPCol_ListOfShape myShapes;
- BOPCol_ListOfShape myLoops;
+ TopTools_ListOfShape myShapes;
+ TopTools_ListOfShape myLoops;
};
#ifndef BOPTools_CoupleOfShape_HeaderFile
#define BOPTools_CoupleOfShape_HeaderFile
+#include <TopoDS_Shape.hxx>
+
//=======================================================================
//class :
//purpose :
#ifndef BOPTools_DataMapOfShapeSet_HeaderFile
#define BOPTools_DataMapOfShapeSet_HeaderFile
-#include <TopoDS_Shape.hxx>
+#include <TopoDS_Shape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
-
+#include <BOPTools_Set.hxx>
#include <NCollection_DataMap.hxx>
-typedef NCollection_DataMap<TopoDS_Shape, BOPTools_Set, TopTools_ShapeMapHasher> BOPTools_DataMapOfShapeSet;
-typedef BOPTools_DataMapOfShapeSet::Iterator BOPCol_DataMapIteratorOfDataMapOfShapeSet;
+typedef NCollection_DataMap<TopoDS_Shape, BOPTools_Set, TopTools_ShapeMapHasher> BOPTools_DataMapOfShapeSet;
+typedef BOPTools_DataMapOfShapeSet::Iterator BOPTools_DataMapIteratorOfDataMapOfShapeSet;
#endif
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
class TopoDS_Shape;
class TopoDS_Edge;
BOPTools_EdgeSet();
virtual ~BOPTools_EdgeSet();
- BOPTools_EdgeSet(const BOPCol_BaseAllocator& theAllocator);
+ BOPTools_EdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator);
void SetShape (const TopoDS_Shape& theS);
void AddEdge (const TopoDS_Edge& theEdge);
- Standard_EXPORT void AddEdges (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT void AddEdges (const TopTools_ListOfShape& theLS);
void AddEdges (const TopoDS_Shape& theFace);
void Clear();
- void Get (BOPCol_ListOfShape& theLS) const;
+ void Get (TopTools_ListOfShape& theLS) const;
Standard_Boolean Contains (const BOPTools_EdgeSet& theSet) const;
TopoDS_Shape myShape;
- BOPCol_MapOfShape myMap;
- BOPCol_ListOfShape myEdges;
+ TopTools_MapOfShape myMap;
+ TopTools_ListOfShape myEdges;
private:
//function : AddEdges
//purpose :
//=======================================================================
- inline void BOPTools_EdgeSet::AddEdges(const BOPCol_ListOfShape& theLS)
+ inline void BOPTools_EdgeSet::AddEdges(const TopTools_ListOfShape& theLS)
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(theLS);
for (; aIt.More(); aIt.Next()) {
//function : Get
//purpose :
//=======================================================================
- inline void BOPTools_EdgeSet::Get(BOPCol_ListOfShape& theLS)const
+ inline void BOPTools_EdgeSet::Get(TopTools_ListOfShape& theLS)const
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(myEdges);
for (; aIt.More(); aIt.Next()) {
{
Standard_Integer aNbEOther, aNbE;
Standard_Boolean bRet;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aNbE=0;
aNbEOther=theOther.myEdges.Extent();
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef BOPTools_IndexedDataMapOfSetShape_HeaderFile
+#define BOPTools_IndexedDataMapOfSetShape_HeaderFile
+
+#include <BOPTools_Set.hxx>
+#include <BOPTools_SetMapHasher.hxx>
+#include <NCollection_IndexedDataMap.hxx>
+#include <TopoDS_Shape.hxx>
+
+typedef NCollection_IndexedDataMap<BOPTools_Set, TopoDS_Shape, BOPTools_SetMapHasher> BOPTools_IndexedDataMapOfSetShape;
+
+#endif
--- /dev/null
+// Created by: Peter KURNEV
+// Copyright (c) 1999-2013 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef _BOPTools_Parallel_HeaderFile
+#define _BOPTools_Parallel_HeaderFile
+
+#include <Standard_Macro.hxx>
+#include <Standard_NotImplemented.hxx>
+#include <OSD_Parallel.hxx>
+#include <NCollection_DataMap.hxx>
+#include <Standard_Mutex.hxx>
+#include <OSD_Thread.hxx>
+
+//
+// 1. Implementation of Functors/Starters
+//
+// 1.1. Pure version
+//
+
+//=======================================================================
+//class : BOPTools_Functor
+//purpose :
+//=======================================================================
+template <class TypeSolver, class TypeSolverVector>
+class BOPTools_Functor
+{
+public:
+ //! Constructor.
+ explicit BOPTools_Functor(TypeSolverVector& theSolverVec)
+ : mySolvers(theSolverVec) {}
+
+ //! Defines functor interface.
+ void operator() (const Standard_Integer theIndex) const
+ {
+ TypeSolver& aSolver = mySolvers(theIndex);
+ aSolver.Perform();
+ }
+
+private:
+ BOPTools_Functor(const BOPTools_Functor&);
+ BOPTools_Functor& operator= (const BOPTools_Functor&);
+
+private:
+ TypeSolverVector& mySolvers;
+};
+
+//=======================================================================
+//class : BOPTools_Cnt
+//purpose :
+//=======================================================================
+template <class TypeFunctor, class TypeSolverVector>
+class BOPTools_Cnt
+{
+public:
+ static void Perform( const Standard_Boolean isRunParallel,
+ TypeSolverVector& theSolverVector )
+ {
+ TypeFunctor aFunctor(theSolverVector);
+ OSD_Parallel::For(0, theSolverVector.Length(), aFunctor, !isRunParallel);
+ }
+};
+
+//
+// 1.2. Context dependent version
+//
+
+//=======================================================================
+//class : BOPTools_ContextFunctor
+//purpose :
+//=======================================================================
+template <class TypeSolver, class TypeSolverVector,
+ class TypeContext, typename TN>
+class BOPTools_ContextFunctor
+{
+ //! Auxiliary thread ID hasher.
+ struct Hasher
+ {
+ static Standard_Integer HashCode(const Standard_ThreadId theKey,
+ const Standard_Integer Upper)
+ {
+ return ::HashCode((Standard_Size)theKey, Upper);
+ }
+
+ static Standard_Boolean IsEqual(const Standard_ThreadId theKey1,
+ const Standard_ThreadId theKey2)
+ {
+ return theKey1 == theKey2;
+ }
+ };
+
+ typedef NCollection_DataMap<Standard_ThreadId, TypeContext, Hasher> ContextMap;
+
+public:
+
+ //! Constructor
+ explicit BOPTools_ContextFunctor( TypeSolverVector& theVector )
+ : mySolverVector(theVector) {}
+
+ //! Binds main thread context
+ void SetContext( TypeContext& theContext )
+ {
+ myContexts.Bind(OSD_Thread::Current(), theContext);
+ }
+
+ //! Returns current thread context
+ TypeContext& GetThreadContext() const
+ {
+ const Standard_ThreadId aThreadID = OSD_Thread::Current();
+ if ( myContexts.IsBound(aThreadID) )
+ {
+ TypeContext& aContext = myContexts(aThreadID);
+ if ( aContext.IsNull() == Standard_False )
+ return aContext;
+ }
+
+ // Create new context
+ TypeContext aContext = new TN
+ ( NCollection_BaseAllocator::CommonBaseAllocator() );
+
+ Standard_Mutex::Sentry aLocker(myMutex);
+ myContexts.Bind(aThreadID, aContext);
+
+ return myContexts(aThreadID);
+ }
+
+ //! Defines functor interface
+ void operator()( const Standard_Integer theIndex ) const
+ {
+ TypeContext& aContext = GetThreadContext();
+ TypeSolver& aSolver = mySolverVector(theIndex);
+
+ aSolver.SetContext(aContext);
+ aSolver.Perform();
+ }
+
+private:
+ BOPTools_ContextFunctor(const BOPTools_ContextFunctor&);
+ BOPTools_ContextFunctor& operator= (const BOPTools_ContextFunctor&);
+
+private:
+ TypeSolverVector& mySolverVector;
+ mutable ContextMap myContexts;
+ mutable Standard_Mutex myMutex;
+};
+
+//=======================================================================
+//class : BOPTools_ContextCnt
+//purpose :
+//=======================================================================
+template <class TypeFunctor, class TypeSolverVector, class TypeContext>
+class BOPTools_ContextCnt
+{
+public:
+ static void Perform( const Standard_Boolean isRunParallel,
+ TypeSolverVector& theSolverVector,
+ TypeContext& theContext )
+ {
+ TypeFunctor aFunctor(theSolverVector);
+ aFunctor.SetContext(theContext);
+
+ OSD_Parallel::For(0, theSolverVector.Length(), aFunctor, !isRunParallel);
+ }
+};
+
+#endif
// commercial license or contractual agreement.
-#include <BOPCol_MapOfShape.hxx>
#include <BOPTools_Set.hxx>
#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
+#include <TopTools_MapOfShape.hxx>
static
Standard_Integer NormalizedIds(const Standard_Integer aId,
//=======================================================================
BOPTools_Set& BOPTools_Set::Assign(const BOPTools_Set& theOther)
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
myShape=theOther.myShape;
myNbShapes=theOther.myNbShapes;
return bRet;
}
//
- BOPCol_MapOfShape aM1;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_MapOfShape aM1;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(myShapes);
for (; aIt.More(); aIt.Next()) {
return;
}
//
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(myShapes);
for (; aIt.More(); aIt.Next()) {
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Integer.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <Standard_Boolean.hxx>
+#include <TopTools_ListOfShape.hxx>
class TopoDS_Shape;
Standard_EXPORT BOPTools_Set();
Standard_EXPORT virtual ~BOPTools_Set();
- Standard_EXPORT BOPTools_Set(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BOPTools_Set(const Handle(NCollection_BaseAllocator)& theAllocator);
Standard_EXPORT BOPTools_Set& Assign (const BOPTools_Set& Other);
BOPTools_Set& operator = (const BOPTools_Set& Other)
Standard_EXPORT void Clear();
- BOPCol_BaseAllocator myAllocator;
- BOPCol_ListOfShape myShapes;
+ Handle(NCollection_BaseAllocator) myAllocator;
+ TopTools_ListOfShape myShapes;
TopoDS_Shape myShape;
Standard_Integer myNbShapes;
Standard_Integer mySum;
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <TopoDS_Shape.hxx>
-#include <BOPCol_MapOfOrientedShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <TopAbs_ShapeEnum.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
+#include <TopTools_ListOfShape.hxx>
class TopoDS_Shape;
class TopoDS_Edge;
BOPTools_ShapeSet();
virtual ~BOPTools_ShapeSet();
- BOPTools_ShapeSet(const BOPCol_BaseAllocator& theAllocator);
+ BOPTools_ShapeSet(const Handle(NCollection_BaseAllocator)& theAllocator);
void SetShape (const TopoDS_Shape& theS);
const TopoDS_Shape& Shape() const;
- Standard_EXPORT void Add (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT void Add (const TopTools_ListOfShape& theLS);
void Add (const TopoDS_Shape& theShape);
void AddEdge (const TopoDS_Edge& theEdge);
- Standard_EXPORT void AddEdges (const BOPCol_ListOfShape& theLS);
+ Standard_EXPORT void AddEdges (const TopTools_ListOfShape& theLS);
void AddEdges (const TopoDS_Shape& theFace);
void Clear();
- void Get (BOPCol_ListOfShape& theLS) const;
+ void Get (TopTools_ListOfShape& theLS) const;
Standard_Boolean Contains (const BOPTools_ShapeSet& theSet) const;
TopoDS_Shape myShape;
- BOPCol_MapOfOrientedShape myMap;
+ TopTools_MapOfOrientedShape myMap;
private:
//function : Add
//purpose :
//=======================================================================
- inline void BOPTools_ShapeSet::Add(const BOPCol_ListOfShape& theLS)
+ inline void BOPTools_ShapeSet::Add(const TopTools_ListOfShape& theLS)
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Init(theLS);
for (; aIt.More(); aIt.Next()) {
//function : AddEdges
//purpose :
//=======================================================================
- inline void BOPTools_ShapeSet::AddEdges(const BOPCol_ListOfShape& theLS)
+ inline void BOPTools_ShapeSet::AddEdges(const TopTools_ListOfShape& theLS)
{
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(theLS);
for (; aIt.More(); aIt.Next()) {
//function : Get
//purpose :
//=======================================================================
- inline void BOPTools_ShapeSet::Get(BOPCol_ListOfShape& theLS)const
+ inline void BOPTools_ShapeSet::Get(TopTools_ListOfShape& theLS)const
{
- BOPCol_MapIteratorOfMapOfOrientedShape aIt;
+ TopTools_MapIteratorOfMapOfOrientedShape aIt;
//
aIt.Initialize(myMap);
for (; aIt.More(); aIt.Next()) {
inline Standard_Boolean BOPTools_ShapeSet::Contains(const BOPTools_ShapeSet& theOther)const
{
Standard_Boolean bRet;
- BOPCol_MapIteratorOfMapOfOrientedShape aIt;
+ TopTools_MapIteratorOfMapOfOrientedShape aIt;
//
aIt.Initialize(theOther.myMap);
for (; aIt.More(); aIt.Next()) {
//=======================================================================
inline void BOPTools_ShapeSet::Subtract(const BOPTools_ShapeSet& theOther)
{
- BOPCol_MapIteratorOfMapOfOrientedShape aIt;
+ TopTools_MapIteratorOfMapOfOrientedShape aIt;
//
aIt.Initialize(theOther.myMap);
for (; aIt.More(); aIt.Next()) {
-BOPTools.cxx
-BOPTools.hxx
BOPTools_AlgoTools.cxx
BOPTools_AlgoTools.hxx
BOPTools_AlgoTools2D.cxx
BOPTools_AlgoTools3D.hxx
BOPTools_AlgoTools_1.cxx
BOPTools_AlgoTools_2.cxx
+BOPTools_BoxSelector.hxx
+BOPTools_BoxBndTree.hxx
BOPTools_ConnexityBlock.hxx
BOPTools_CoupleOfShape.hxx
BOPTools_DataMapOfShapeSet.hxx
BOPTools_EdgeSet.cxx
BOPTools_EdgeSet.hxx
BOPTools_EdgeSet.lxx
+BOPTools_IndexedDataMapOfSetShape.hxx
BOPTools_ListOfConnexityBlock.hxx
BOPTools_ListOfCoupleOfShape.hxx
BOPTools_ListOfEdgeSet.hxx
BOPTools_ListOfShapeSet.hxx
BOPTools_MapOfSet.hxx
+BOPTools_Parallel.hxx
BOPTools_Set.cxx
BOPTools_Set.hxx
BOPTools_SetMapHasher.hxx
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
//! Empty constructor
- Standard_EXPORT BRepAlgoAPI_Algo(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT BRepAlgoAPI_Algo(const Handle(NCollection_BaseAllocator)& theAllocator);
private:
BOPDS_VectorOfInterfFF& aFFs=pDS->InterfFF();
myGenerated.Clear();
//
- aNb=aFFs.Extent();
+ aNb=aFFs.Length();
for (i = 0; i < aNb; i++) {
BOPDS_InterfFF& aFFi=aFFs(i);
const BOPDS_VectorOfCurve& aSeqOfCurve=aFFi.Curves();
//
- aNbCurves=aSeqOfCurve.Extent();
+ aNbCurves=aSeqOfCurve.Length();
for (j=0; j<aNbCurves; j++) {
const BOPDS_Curve& aCurve=aSeqOfCurve(j);
const BOPDS_ListOfPaveBlock& aSectEdges = aCurve.PaveBlocks();
BOPDS_VectorOfInterfFF& aFFs=pDS->InterfFF();
//
//section edges
- aNbFF=aFFs.Extent();
+ aNbFF=aFFs.Length();
for (i = 0; i<aNbFF; ++i) {
BOPDS_InterfFF& aFFi=aFFs(i);
aFFi.Indices(nF1, nF2);
//
const BOPDS_VectorOfCurve& aVC=aFFi.Curves();
- aNbVC=aVC.Extent();
+ aNbVC=aVC.Length();
for (j=0; j<aNbVC; j++) {
const BOPDS_Curve& aBC=aVC(j);
//
#include <BOPAlgo_BuilderFace.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BOPDS_FaceInfo.hxx>
#include <BOPDS_ListOfPave.hxx>
#include <BOPDS_MapOfPaveBlock.hxx>
#include <BOPDS_Pave.hxx>
#include <BOPDS_ShapeInfo.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <Geom_Curve.hxx>
#include <IntTools_Tools.hxx>
#include <Precision.hxx>
+#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
//=======================================================================
//function :
TopoDS_Shape aF, aFOr;
TopExp_Explorer aExp;
//
- BOPTools::MapShapes(thePart, myShapes);
+ TopExp::MapShapes(thePart, myShapes);
}
//=======================================================================
return;
}
//
- BOPCol_ListIteratorOfListOfShape aItIm;
+ TopTools_ListIteratorOfListOfShape aItIm;
//
- BOPCol_ListOfShape& aLS = myImages.ChangeFind(aArgs1);
+ TopTools_ListOfShape& aLS = myImages.ChangeFind(aArgs1);
aItIm.Initialize(aLS);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aS = aItIm.Value();
TopoDS_Edge aSp;
TopoDS_Shape aSx;
TopExp_Explorer aExp, aExpE;
- BOPCol_MapOfShape aME, aMESplit;
- BOPCol_ListIteratorOfListOfShape aItIm;
+ TopTools_MapOfShape aME, aMESplit;
+ TopTools_ListIteratorOfListOfShape aItIm;
BOPDS_MapIteratorOfMapOfPaveBlock aItMPB;
- BOPCol_MapIteratorOfMapOfShape aItM;
+ TopTools_MapIteratorOfMapOfShape aItM;
BOPTools_MapOfSet aMST;
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
//
aItM.Initialize(myShapes);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aS = aSI.Shape();
//
if (myImages.IsBound(aS)) {
- BOPCol_ListOfShape& aLIm = myImages.ChangeFind(aS);
+ TopTools_ListOfShape& aLIm = myImages.ChangeFind(aS);
aItIm.Initialize(aLIm);
for (; aItIm.More(); ) {
const TopoDS_Shape& aSIm = aItIm.Value();
bIsDegenerated=BRep_Tool::Degenerated(aE);
bIsClosed=BRep_Tool::IsClosed(aE, aF);
if (myImages.IsBound(aE)) {
- BOPCol_ListOfShape& aLEIm = myImages.ChangeFind(aE);
+ TopTools_ListOfShape& aLEIm = myImages.ChangeFind(aE);
//
bRem = Standard_False;
bIm = Standard_False;
aME.Clear();
- BOPCol_ListOfShape aLEImNew;
+ TopTools_ListOfShape aLEImNew;
//
aItIm.Initialize(aLEIm);
for (; aItIm.More(); aItIm.Next()) {
aBF.Perform();
- BOPCol_ListOfShape& aLFIm = myImages.ChangeFind(aF);
+ TopTools_ListOfShape& aLFIm = myImages.ChangeFind(aF);
aLFIm.Clear();
- const BOPCol_ListOfShape& aLFR=aBF.Areas();
+ const TopTools_ListOfShape& aLFR=aBF.Areas();
aItIm.Initialize(aLFR);
for (; aItIm.More(); aItIm.Next()) {
TopoDS_Shape& aFR=aItIm.ChangeValue();
aSx.Orientation(anOriF);
aLFIm.Append(aSx);
//
- BOPCol_ListOfShape* pLOr = myOrigins.ChangeSeek(aSx);
+ TopTools_ListOfShape* pLOr = myOrigins.ChangeSeek(aSx);
if (!pLOr) {
- pLOr = myOrigins.Bound(aSx, BOPCol_ListOfShape());
+ pLOr = myOrigins.Bound(aSx, TopTools_ListOfShape());
}
pLOr->Append(aF);
//
//=======================================================================
void BRepFeat_Builder::RebuildEdge(const TopoDS_Shape& theE,
const TopoDS_Face& theF,
- const BOPCol_MapOfShape& aME,
- BOPCol_ListOfShape& aLIm)
+ const TopTools_MapOfShape& aME,
+ TopTools_ListOfShape& aLIm)
{
Standard_Integer nE, nSp, nV1, nV2, nE1, nV, nVx, nVSD;
Standard_Integer nV11, nV21;
BOPDS_ShapeInfo aSI;
TopoDS_Vertex aV1, aV2;
Handle(BOPDS_PaveBlock) aPBNew;
- BOPCol_MapOfInteger aMI, aMAdd, aMV, aMVOr;
+ TColStd_MapOfInteger aMI, aMAdd, aMV, aMVOr;
BOPDS_ListIteratorOfListOfPaveBlock aItPB;
- BOPCol_ListIteratorOfListOfShape aIt;
- BOPCol_ListIteratorOfListOfInteger aItLI;
- BOPCol_MapIteratorOfMapOfShape aItM;
+ TopTools_ListIteratorOfListOfShape aIt;
+ TColStd_ListIteratorOfListOfInteger aItLI;
+ TopTools_MapIteratorOfMapOfShape aItM;
BOPDS_MapOfPaveBlock aMPB;
BOPDS_MapIteratorOfMapOfPaveBlock aItMPB;
//
//1. collect origin vertices to aMV map.
nE = myDS->Index(theE);
const BOPDS_ShapeInfo& aSIE = myDS->ShapeInfo(nE);
- const BOPCol_ListOfInteger& aLS = aSIE.SubShapes();
+ const TColStd_ListOfInteger& aLS = aSIE.SubShapes();
aItLI.Initialize(aLS);
for(; aItLI.More(); aItLI.Next()) {
nV = aItLI.Value();
void BRepFeat_Builder::CheckSolidImages()
{
BOPTools_MapOfSet aMST;
- BOPCol_ListOfShape aLSImNew;
- BOPCol_MapOfShape aMS;
- BOPCol_ListIteratorOfListOfShape aIt;
+ TopTools_ListOfShape aLSImNew;
+ TopTools_MapOfShape aMS;
+ TopTools_ListIteratorOfListOfShape aIt;
TopExp_Explorer aExp, aExpF;
Standard_Boolean bFlagSD;
//
const TopoDS_Shape& aArgs0=myArguments.First();
const TopoDS_Shape& aArgs1=myTools.First();
//
- const BOPCol_ListOfShape& aLSIm = myImages.Find(aArgs1);
+ const TopTools_ListOfShape& aLSIm = myImages.Find(aArgs1);
aIt.Initialize(aLSIm);
for(;aIt.More();aIt.Next()) {
const TopoDS_Shape& aSolIm = aIt.Value();
for(; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aSolid = aExp.Current();
if (myImages.IsBound(aSolid)) {
- BOPCol_ListOfShape& aLSImSol = myImages.ChangeFind(aSolid);
+ TopTools_ListOfShape& aLSImSol = myImages.ChangeFind(aSolid);
aIt.Initialize(aLSImSol);
for(;aIt.More();aIt.Next()) {
const TopoDS_Shape& aSolIm = aIt.Value();
//purpose :
//=======================================================================
void BRepFeat_Builder::FillRemoved(const TopoDS_Shape& S,
- BOPCol_MapOfShape& M)
+ TopTools_MapOfShape& M)
{
if (myShapes.Contains(S)) {
return;
//function : FillIn3DParts
//purpose :
//=======================================================================
- void BRepFeat_Builder::FillIn3DParts(BOPCol_DataMapOfShapeListOfShape& theInParts,
- BOPCol_DataMapOfShapeShape& theDraftSolids,
+ void BRepFeat_Builder::FillIn3DParts(TopTools_DataMapOfShapeListOfShape& theInParts,
+ TopTools_DataMapOfShapeShape& theDraftSolids,
const Handle(NCollection_BaseAllocator)& theAllocator)
{
GetReport()->Clear();
BRep_Builder aBB;
TopoDS_Solid aSolidSp;
TopoDS_Face aFP;
- BOPCol_ListIteratorOfListOfShape aItS, aItFP, aItEx;
- BOPCol_MapIteratorOfMapOfShape aItMS, aItMS1;
+ TopTools_ListIteratorOfListOfShape aItS, aItFP, aItEx;
+ TopTools_MapIteratorOfMapOfShape aItMS, aItMS1;
//
- BOPCol_ListOfShape aLIF(theAllocator);
- BOPCol_MapOfShape aMFDone(100, theAllocator);
- BOPCol_MapOfShape aMSolids(100, theAllocator);
- BOPCol_MapOfShape aMFaces(100, theAllocator);
- BOPCol_MapOfShape aMFIN(100, theAllocator);
- BOPCol_IndexedMapOfShape aMS(100, theAllocator);
- BOPCol_IndexedDataMapOfShapeListOfShape aMEF(100, theAllocator);
+ TopTools_ListOfShape aLIF(theAllocator);
+ TopTools_MapOfShape aMFDone(100, theAllocator);
+ TopTools_MapOfShape aMSolids(100, theAllocator);
+ TopTools_MapOfShape aMFaces(100, theAllocator);
+ TopTools_MapOfShape aMFIN(100, theAllocator);
+ TopTools_IndexedMapOfShape aMS(100, theAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aMEF(100, theAllocator);
//
theDraftSolids.Clear();
//
case TopAbs_FACE: {
// all faces (originals or images)
if (myImages.IsBound(aS)) {
- const BOPCol_ListOfShape& aLS=myImages.Find(aS);
+ const TopTools_ListOfShape& aLS=myImages.Find(aS);
aItS.Initialize(aLS);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aFx=aItS.Value();
if (myImages.IsBound(aShell)) {
bHasImage=Standard_True;
//
- const BOPCol_ListOfShape& aLS=myImages.Find(aShell);
+ const TopTools_ListOfShape& aLS=myImages.Find(aShell);
aItS.Initialize(aLS);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Shape& aSx=aItS.Value();
aMS.Add(aSx);
- BOPTools::MapShapes(aSx, TopAbs_FACE, aMS);
- BOPTools::MapShapes(aSx, TopAbs_EDGE, aMS);
- BOPTools::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapes(aSx, TopAbs_FACE, aMS);
+ TopExp::MapShapes(aSx, TopAbs_EDGE, aMS);
+ TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
}
else {
//aMS.Add(aShell);
- BOPTools::MapShapes(aShell, TopAbs_FACE, aMS);
- BOPTools::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
+ TopExp::MapShapes(aShell, TopAbs_FACE, aMS);
+ TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF);
}
}
//
// 2 all faces that are not from aSolid [ aLFP1 ]
- BOPCol_IndexedDataMapOfShapeListOfShape aMEFP(100, theAllocator);
- BOPCol_ListOfShape aLFP1(theAllocator);
- BOPCol_ListOfShape aLFP(theAllocator);
- BOPCol_ListOfShape aLCBF(theAllocator);
- BOPCol_ListOfShape aLFIN(theAllocator);
- BOPCol_ListOfShape aLEx(theAllocator);
+ TopTools_IndexedDataMapOfShapeListOfShape aMEFP(100, theAllocator);
+ TopTools_ListOfShape aLFP1(theAllocator);
+ TopTools_ListOfShape aLFP(theAllocator);
+ TopTools_ListOfShape aLCBF(theAllocator);
+ TopTools_ListOfShape aLFIN(theAllocator);
+ TopTools_ListOfShape aLEx(theAllocator);
//
// for all non-solid faces build EF map [ aMEFP ]
aItMS1.Initialize(aMFaces);
for (; aItMS1.More(); aItMS1.Next()) {
const TopoDS_Shape& aFace=aItMS1.Value();
if (!aMS.Contains(aFace)) {
- BOPTools::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP);
+ TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP);
}
}
//
const TopoDS_Shape& aE=aMEFP.FindKey(j);
//
if (aMEF.Contains(aE)) { // !!
- const BOPCol_ListOfShape& aLF=aMEFP(j);
+ const TopTools_ListOfShape& aLF=aMEFP(j);
aItFP.Initialize(aLF);
for (; aItFP.More(); aItFP.Next()) {
const TopoDS_Shape& aF=aItFP.Value();
aItEx.Initialize(aLEx);
for (; aItEx.More(); aItEx.Next()) {
const TopoDS_Shape& aE=aItEx.Value();
- const BOPCol_ListOfShape& aLF=aMEFP.FindFromKey(aE);
+ const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE);
aItFP.Initialize(aLF);
for (; aItFP.More(); aItFP.Next()) {
const TopoDS_Shape& aF=aItFP.Value();
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <Standard_Integer.hxx>
#include <BOPAlgo_BOP.hxx>
+#include <NCollection_BaseAllocator.hxx>
#include <Standard_Boolean.hxx>
+#include <Standard_Integer.hxx>
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_BaseAllocator.hxx>
+#include <TopTools_MapOfShape.hxx>
class TopoDS_Shape;
class TopoDS_Face;
Standard_EXPORT void RebuildFaces();
//! Rebuilds edges in accordance with the kept parts of the tool.
- Standard_EXPORT void RebuildEdge (const TopoDS_Shape& theE, const TopoDS_Face& theF, const BOPCol_MapOfShape& theME, BOPCol_ListOfShape& aLEIm);
+ Standard_EXPORT void RebuildEdge (const TopoDS_Shape& theE, const TopoDS_Face& theF, const TopTools_MapOfShape& theME, TopTools_ListOfShape& aLEIm);
//! Collects the images of the object, that contains in
//! the images of the tool.
Standard_EXPORT void FillRemoved();
//! Adds the shape S and its sub-shapes into myRemoved map.
- Standard_EXPORT void FillRemoved (const TopoDS_Shape& theS, BOPCol_MapOfShape& theM);
+ Standard_EXPORT void FillRemoved (const TopoDS_Shape& theS, TopTools_MapOfShape& theM);
Standard_EXPORT virtual void Prepare() Standard_OVERRIDE;
//! Function is redefined to avoid the usage of removed faces.
- Standard_EXPORT virtual void FillIn3DParts (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator& theAllocator) Standard_OVERRIDE;
+ Standard_EXPORT virtual void FillIn3DParts (TopTools_DataMapOfShapeListOfShape& theInParts, TopTools_DataMapOfShapeShape& theDraftSolids, const Handle(NCollection_BaseAllocator)& theAllocator) Standard_OVERRIDE;
- BOPCol_MapOfShape myShapes;
- BOPCol_MapOfShape myRemoved;
+ TopTools_MapOfShape myShapes;
+ TopTools_MapOfShape myRemoved;
Standard_Integer myFuse;
#include <BOPAlgo_BOP.hxx>
#include <BOPAlgo_PaveFiller.hxx>
-#include <BOPCol_DataMapOfShapeListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
}
BOPAlgo_PaveFiller aPF;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
aLS.Append(myShape1);
aLS.Append(myShape2);
aPF.SetArguments(aLS);
const BOPDS_PDS& theDS = aPF.PDS();
//
BOPDS_VectorOfInterfFF& aFFs = theDS->InterfFF();
- Standard_Integer aNbFFs = aFFs.Extent();
+ Standard_Integer aNbFFs = aFFs.Length();
if(!SplitUEdges(myUEdges, theDS, myHistMap)) {
return;
aFFi.Indices(nF1, nF2);
//
BOPDS_VectorOfPoint& aVP=aFFi.ChangePoints();
- aNbP=aVP.Extent();
+ aNbP=aVP.Length();
const BOPDS_VectorOfCurve& aVC=aFFi.Curves();
- aNbC=aVC.Extent();
+ aNbC=aVC.Length();
if (!aNbP && !aNbC) {
if (!theDS->HasInterfSubShapes(nF1, nF2)) {
continue;
Standard_Integer vindex1 = theDS->Index(V1);
Standard_Integer vindex2 = theDS->Index(V2);
Standard_Integer vvit = 0;
- Standard_Integer aNbVVs = aVVs.Extent();
+ Standard_Integer aNbVVs = aVVs.Length();
for(vvit = 0; !bvertexfound && (vvit < aNbVVs); vvit++) {
//const BOPTools_VVInterference& aVV = aVVs(vvit);
Standard_Integer eeit = 0;
Standard_Integer aNbEEs;
- aNbEEs = aEEs.Extent();
+ aNbEEs = aEEs.Length();
for(eeit = 0; eeit < aNbEEs; ++eeit) {
const BOPDS_InterfEE& aEE = aEEs(eeit);
BRep_Builder aBB;
aBB.MakeCompound(theResult);
- Standard_Integer aNbCurves = theBCurves.Extent();
+ Standard_Integer aNbCurves = theBCurves.Length();
Standard_Integer cit = 0;
BOPDS_ListIteratorOfListOfPaveBlock aPBIt;
#include <Adaptor3d_HSurface.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
+#include <BOPTools_AlgoTools.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPTools_AlgoTools.hxx>
#include <stdio.h>
#ifdef DRAW
static void MakeChain(const TopoDS_Shape& theV,
const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
TopTools_MapOfShape& theMDone,
- BOPCol_ListOfShape& theChain)
+ TopTools_ListOfShape& theChain)
{
if (theMDone.Add(theV)) {
theChain.Append(theV);
const TopoDS_Vertex& aV = TopoDS::Vertex(theDMVV.FindKey(i));
//
// find chain of vertices
- BOPCol_ListOfShape aLVChain;
+ TopTools_ListOfShape aLVChain;
MakeChain(aV, theDMVV, aMVDone, aLVChain);
//
if (aLVChain.Extent() < 2) {
//
TopoDS_Vertex aVNewInt = TopoDS::Vertex(aVNew.Oriented(TopAbs_INTERNAL));
//
- BOPCol_ListIteratorOfListOfShape aIt(aLVChain);
+ TopTools_ListIteratorOfListOfShape aIt(aLVChain);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aVOld = aIt.Value();
// update the parameters on edges
#include <TopTools_MapOfShape.hxx>
//
#include <BRepBndLib.hxx>
-#include <BOPCol_BoxBndTree.hxx>
+#include <BOPTools_BoxBndTree.hxx>
#include <NCollection_UBTreeFiller.hxx>
//
#include <BOPTools_AlgoTools.hxx>
//---------------------------------------------------------------
// Prepare tools for sorting the bounding boxes
- BOPCol_BoxBndTree aBBTree;
+ BOPTools_BoxBndTree aBBTree;
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
//
NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> aMFaces;
const TopoDS_Face& aF1 = TopoDS::Face(aItL.Value());
const Bnd_Box& aBoxF1 = aMFaces.FindFromKey(aF1);
//
- BOPCol_BoxBndTreeSelector aSelector;
+ BOPTools_BoxBndTreeSelector aSelector;
aSelector.SetBox(aBoxF1);
aBBTree.Select(aSelector);
//
- const BOPCol_ListOfInteger& aLI = aSelector.Indices();
- BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
+ const TColStd_ListOfInteger& aLI = aSelector.Indices();
+ TColStd_ListIteratorOfListOfInteger aItLI(aLI);
for (; aItLI.More(); aItLI.Next()) {
Standard_Integer i = aItLI.Value();
const TopoDS_Face& aF2 = TopoDS::Face(aMFaces.FindKey(i));
//
#include <BOPAlgo_MakerVolume.hxx>
#include <BOPTools_AlgoTools.hxx>
-#include <BOPCol_ListOfShape.hxx>
#include <stdio.h>
// POP for NT
TopTools_ListOfShape& theLSF);
static
- Standard_Boolean BuildShellsCompleteInter(const BOPCol_ListOfShape& theLF,
+ Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF,
BRepAlgo_Image& theImage,
TopoDS_Shape& theShells);
#endif
//
// Prepare list of splits of the offset faces to make the shells
- BOPCol_ListOfShape aLSF;
+ TopTools_ListOfShape aLSF;
const TopTools_ListOfShape& R = myImageOffset.Roots();
TopTools_ListIteratorOfListOfShape it(R);
//
//
if (!bDone) {
BRepTools_Quilt Glue;
- BOPCol_ListIteratorOfListOfShape aItLS(aLSF);
+ TopTools_ListIteratorOfListOfShape aItLS(aLSF);
for (; aItLS.More(); aItLS.Next()) {
Glue.Add(aItLS.Value());
}
// In case there will be more than just one solid, it will be
// rebuilt using only outer faces.
//=======================================================================
-Standard_Boolean BuildShellsCompleteInter(const BOPCol_ListOfShape& theLF,
+Standard_Boolean BuildShellsCompleteInter(const TopTools_ListOfShape& theLF,
BRepAlgo_Image& theImage,
TopoDS_Shape& theShells)
{
}
//
// get faces attached to only one solid
- BOPCol_ListOfShape aLF(anAllocLoc);
+ TopTools_ListOfShape aLF(anAllocLoc);
for (i = 1; i <= aNb; ++i) {
const TopTools_ListOfShape& aLS = aDMFS(i);
if (aLS.Extent() == 1) {
#include <BOPAlgo_MakerVolume.hxx>
#include <BOPAlgo_BuilderFace.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_DataMapOfShapeShape.hxx>
-#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <BOPTools.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
TopTools_DataMapOfShapeListOfShape& theMELF);
static
- void IntersectEdges(const BOPCol_ListOfShape& theLA,
+ void IntersectEdges(const TopTools_ListOfShape& theLA,
const TopTools_ListOfShape& theLE,
const TopTools_MapOfShape& theMVBounds,
const TopTools_MapOfShape& theVertsToAvoid,
}
//
// get edges to intersect from descendants of the offset faces
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
//
TopTools_ListIteratorOfListOfShape aItLF(theLF);
for (; aItLF.More(); aItLF.Next()) {
//
TopTools_ListOfShape aLA;
// fill map with edges images
- BOPCol_ListIteratorOfListOfShape aIt(aLS);
+ TopTools_ListIteratorOfListOfShape aIt(aLS);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE = aIt.Value();
const TopTools_ListOfShape& aLEIm = aGFE.Modified(aE);
theLFImages.Clear();
//
// take edges to split the face
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
TopExp_Explorer aExp(theEdges, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
TopoDS_Edge aE = TopoDS::Edge(aExp.Current());
aBF.SetShapes(aLE);
aBF.Perform();
//
- const BOPCol_ListOfShape& aLFSp = aBF.Areas();
- BOPCol_ListIteratorOfListOfShape aItLF(aLFSp);
+ const TopTools_ListOfShape& aLFSp = aBF.Areas();
+ TopTools_ListIteratorOfListOfShape aItLF(aLFSp);
for (; aItLF.More(); aItLF.Next()) {
TopoDS_Shape& aFSp = aItLF.ChangeValue();
aFSp.Orientation(anOr);
}
//
// build new planar face using these edges
- BOPCol_ListOfShape aLE;
+ TopTools_ListOfShape aLE;
Standard_Integer i, aNbE = aMEImWire.Extent();
for (i = 1; i <= aNbE; ++i) {
aLE.Append(aMEImWire(i).Oriented(TopAbs_FORWARD));
aBF.SetShapes(aLE);
aBF.Perform();
//
- const BOPCol_ListOfShape& aLFNew = aBF.Areas();
+ const TopTools_ListOfShape& aLFNew = aBF.Areas();
if (aLFNew.IsEmpty()) {
continue;
}
TopTools_IndexedMapOfShape& theMEInside,
TopoDS_Shape& theSolids)
{
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
TopTools_MapOfShape aMFence;
TopTools_IndexedMapOfShape aMFInv;
TopTools_ListIteratorOfListOfShape aItLF;
const BOPDS_PDS& pDS = theBuilder.PDS();
// analyze all Face/Face intersections
const BOPDS_VectorOfInterfFF& aFFs = pDS->InterfFF();
- Standard_Integer iInt, aNbFF = aFFs.Extent();
+ Standard_Integer iInt, aNbFF = aFFs.Length();
for (iInt = 0; iInt < aNbFF; ++iInt) {
const BOPDS_InterfFF& aFF = aFFs(iInt);
const BOPDS_VectorOfCurve& aVNC = aFF.Curves();
- Standard_Integer aNbC = aVNC.Extent();
+ Standard_Integer aNbC = aVNC.Length();
if (!aNbC) {
continue;
}
aBB.MakeCompound(aCFHangs);
// Tool for getting the splits of faces
- const BOPCol_DataMapOfShapeListOfShape& aMVIms = theMV.Images();
+ const TopTools_DataMapOfShapeListOfShape& aMVIms = theMV.Images();
TopTools_ListIteratorOfListOfShape aItLArgs(theMV.Arguments());
for (; aItLArgs.More(); aItLArgs.Next())
for (; anExpF.More(); anExpF.Next())
{
const TopoDS_Shape& aF = anExpF.Current();
- const BOPCol_ListOfShape* pLFIm = aMVIms.Seek(aF);
+ const TopTools_ListOfShape* pLFIm = aMVIms.Seek(aF);
if (pLFIm)
{
TopTools_ListIteratorOfListOfShape aItLFIm(*pLFIm);
}
// Make connexity blocks of all hanging parts and check that they are isolated
- BOPCol_ListOfShape aLCBHangs;
+ TopTools_ListOfShape aLCBHangs;
BOPTools_AlgoTools::MakeConnexityBlocks(aCFHangs, TopAbs_EDGE, TopAbs_FACE, aLCBHangs);
if (aLCBHangs.IsEmpty())
return;
Standard_Integer i, aNbE = theInvEdges.Extent();
for (i = 1; i <= aNbE; ++i) {
const TopoDS_Shape& aEInv = theInvEdges(i);
- const BOPCol_ListOfShape *pLEIm = aMVIms.Seek(aEInv);
+ const TopTools_ListOfShape *pLEIm = aMVIms.Seek(aEInv);
if (pLEIm)
{
- BOPCol_ListIteratorOfListOfShape aItLEIm(*pLEIm);
+ TopTools_ListIteratorOfListOfShape aItLEIm(*pLEIm);
for (; aItLEIm.More(); aItLEIm.Next())
aMEInv.Add(aItLEIm.Value());
}
}
// Tool for getting the origins of the splits
- const BOPCol_DataMapOfShapeListOfShape& aMVOrs = theMV.Origins();
+ const TopTools_DataMapOfShapeListOfShape& aMVOrs = theMV.Origins();
- BOPCol_ListIteratorOfListOfShape aItLCBH(aLCBHangs);
+ TopTools_ListIteratorOfListOfShape aItLCBH(aLCBHangs);
for (; aItLCBH.More(); aItLCBH.Next())
{
const TopoDS_Shape& aCBH = aItLCBH.Value();
}
// Check block to be isolated
- const BOPCol_ListOfShape* pLFOr = aMVOrs.Seek(aF);
+ const TopTools_ListOfShape* pLFOr = aMVOrs.Seek(aF);
if (pLFOr)
{
TopTools_ListIteratorOfListOfShape aItLFOr(*pLFOr);
return;
}
//
- BOPCol_ListOfShape aLArgs;
+ TopTools_ListOfShape aLArgs;
TopTools_MapOfShape aMFence;
TopTools_ListIteratorOfListOfShape aIt, aIt1;
TopExp_Explorer aExp;
continue;
// Get the splits of new edges to intersect
- BOPCol_ListOfShape aLSplits;
+ TopTools_ListOfShape aLSplits;
TopTools_ListIteratorOfListOfShape aItLE(aBlockLENew);
for (; aItLE.More(); aItLE.Next())
TopTools_MapOfShape aMEVal;
// Blocks of valid edges on the first stage
- BOPCol_ListOfShape aLValBlocks;
+ TopTools_ListOfShape aLValBlocks;
// Context for caching the classification tools
Handle(IntTools_Context) aCtx = new IntTools_Context;
//function : IntersectEdges
//purpose : Intersecting the trimmed edges to avoid self-intersections
//=======================================================================
-void IntersectEdges(const BOPCol_ListOfShape& theLA,
+void IntersectEdges(const TopTools_ListOfShape& theLA,
const TopTools_ListOfShape& theLE,
const TopTools_MapOfShape& theMVBounds,
const TopTools_MapOfShape& theVertsToAvoid,
TopoDS_Compound aSp;
BRep_Builder aBB;
aBB.MakeCompound(aSp);
- BOPCol_ListIteratorOfListOfShape anIt(theLA);
+ TopTools_ListIteratorOfListOfShape anIt(theLA);
for (; anIt.More(); anIt.Next()) {
const TopoDS_Shape& aE = anIt.Value();
aBB.Add(aSp, aE);
//
// check edge/edge intersections
const BOPDS_VectorOfInterfEE& aEEs = pDS->InterfEE();
- Standard_Integer i, aNb = aEEs.Extent();
+ Standard_Integer i, aNb = aEEs.Length();
for (i = 0; i < aNb; ++i) {
const BOPDS_InterfEE& aEE = aEEs(i);
//
TopTools_IndexedMapOfShape aMSSec;
TopExp::MapShapes(aSecR, aMSSec);
//
- const BOPCol_DataMapOfShapeListOfShape& anIm = aSec.Images();
+ const TopTools_DataMapOfShapeListOfShape& anIm = aSec.Images();
for (TopExp_Explorer aExp(theSplits, TopAbs_EDGE); aExp.More(); aExp.Next())
{
const TopoDS_Shape& aE = aExp.Current();
continue;
}
//
- const BOPCol_ListOfShape* pLEIm = anIm.Seek(aE);
+ const TopTools_ListOfShape* pLEIm = anIm.Seek(aE);
if (!pLEIm) {
// no splits, i.e. completely coincides with some edge from boundary
continue;
}
//
- BOPCol_ListIteratorOfListOfShape aItLEIm(*pLEIm);
+ TopTools_ListIteratorOfListOfShape aItLEIm(*pLEIm);
for (; aItLEIm.More(); aItLEIm.Next()) {
const TopoDS_Shape& aEIm = aItLEIm.Value();
if (!aMSSec.Contains(aEIm)) {
//check if vertex with index "index" is not created in VV or EE or EF interference
//VV
BOPDS_VectorOfInterfVV& aVVs=pDS->InterfVV();
- aNbVVs = aVVs.Extent();
+ aNbVVs = aVVs.Length();
for(aInt = 0; aInt < aNbVVs; aInt++) {
const BOPDS_InterfVV& aVV = aVVs(aInt);
if (aVV.HasIndexNew()) {
}
//EE
BOPDS_VectorOfInterfEE& aEEs=pDS->InterfEE();
- aNbEEs = aEEs.Extent();
+ aNbEEs = aEEs.Length();
for(aInt = 0; aInt < aNbEEs; aInt++) {
const BOPDS_InterfEE& aEE = aEEs(aInt);
IntTools_CommonPrt aCP = aEE.CommonPart();
}
//EF
BOPDS_VectorOfInterfEF& aEFs=pDS->InterfEF();
- aNbEFs = aEFs.Extent();
+ aNbEFs = aEFs.Length();
for(aInt = 0; aInt < aNbEFs; aInt++) {
const BOPDS_InterfEF& aEF = aEFs(aInt);
IntTools_CommonPrt aCP = aEF.CommonPart();
return Standard_True;
BOPDS_VectorOfInterfFF& aFFs = pDS->InterfFF();
- Standard_Integer aNb = aFFs.Extent();
+ Standard_Integer aNb = aFFs.Length();
Standard_Integer i, j, nbe = 0;
TopTools_SequenceOfShape Edges;
{
BOPDS_InterfFF& aFFi=aFFs(i);
const BOPDS_VectorOfCurve& aBCurves=aFFi.Curves();
- Standard_Integer aNbCurves = aBCurves.Extent();
+ Standard_Integer aNbCurves = aBCurves.Length();
for (j = 0; j < aNbCurves; ++j)
{
BRepLib::BuildCurves3d(cpF2);
BOPAlgo_PaveFiller aPF1, aPF2;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
aLS.Append(cpF1);
aLS.Append(cpF2);
aPF1.SetArguments(aLS);
const BOPDS_PDS& pDS = pPF->PDS();
BOPDS_VectorOfInterfFF& aFFs=pDS->InterfFF();
- Standard_Integer aNb = aFFs.Extent();
+ Standard_Integer aNb = aFFs.Length();
Standard_Integer i = 0, j = 0, k;
// Store Result
L1.Clear(); L2.Clear();
BOPDS_InterfFF& aFFi=aFFs(i);
const BOPDS_VectorOfCurve& aBCurves=aFFi.Curves();
- Standard_Integer aNbCurves = aBCurves.Extent();
+ Standard_Integer aNbCurves = aBCurves.Length();
for (j = 0; j < aNbCurves; j++) {
const BOPDS_Curve& aBC=aBCurves(j);
}
BOPAlgo_PaveFiller theDSFiller;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
aLS.Append(S1);
aLS.Append(S2);
theDSFiller.SetArguments(aLS);
#include <Approx_FitAndDivide.hxx>
#include <BiTgte_Blend.hxx>
#include <BiTgte_CurveOnEdge.hxx>
-#include <BiTgte_DataMapOfShapeBox.hxx>
#include <Bnd_Box.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
if (myRadius < 0.) Side = TopAbs_OUT;
BRepOffset_Inter3d Inter(myAsDes,Side,myTol);
- BiTgte_DataMapOfShapeBox MapSBox;
+ TopTools_DataMapOfShapeBox MapSBox;
TopTools_MapOfShape Done;
//TopTools_MapIteratorOfMapOfShape it;
Standard_Boolean BiTgte_Blend::Intersect
(const TopoDS_Shape& Init,
const TopoDS_Face& Face,
- const BiTgte_DataMapOfShapeBox& MapSBox,
+ const TopTools_DataMapOfShapeBox& MapSBox,
const BRepOffset_Offset& OF1,
BRepOffset_Inter3d& Inter)
{
#include <TColStd_HArray1OfInteger.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BiTgte_ContactType.hxx>
-#include <BiTgte_DataMapOfShapeBox.hxx>
+#include <TopTools_DataMapOfShapeBox.hxx>
class BRepAlgo_AsDes;
class StdFail_NotDone;
class Standard_OutOfRange;
//! Computes the intersections with <Face> and all the
//! OffsetFaces stored in <myMapSF>. Returns <True>
//! if an intersections ends on a boundary of a Face.
- Standard_EXPORT Standard_Boolean Intersect (const TopoDS_Shape& Init, const TopoDS_Face& Face, const BiTgte_DataMapOfShapeBox& MapSBox, const BRepOffset_Offset& OF1, BRepOffset_Inter3d& Inter);
+ Standard_EXPORT Standard_Boolean Intersect (const TopoDS_Shape& Init, const TopoDS_Face& Face, const TopTools_DataMapOfShapeBox& MapSBox, const BRepOffset_Offset& OF1, BRepOffset_Inter3d& Inter);
Standard_Real myRadius;
+++ /dev/null
-// Copyright (c) 2015 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#ifndef BiTgte_DataMapIteratorOfDataMapOfShapeBox_HeaderFile
-#define BiTgte_DataMapIteratorOfDataMapOfShapeBox_HeaderFile
-
-#include <BiTgte_DataMapOfShapeBox.hxx>
-
-#endif
+++ /dev/null
-// Created on: 1996-12-16
-// Created by: Bruno DUMORTIER
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef BiTgte_DataMapOfShapeBox_HeaderFile
-#define BiTgte_DataMapOfShapeBox_HeaderFile
-
-#include <TopoDS_Shape.hxx>
-#include <Bnd_Box.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-#include <NCollection_DataMap.hxx>
-
-typedef NCollection_DataMap<TopoDS_Shape,Bnd_Box,TopTools_ShapeMapHasher> BiTgte_DataMapOfShapeBox;
-typedef NCollection_DataMap<TopoDS_Shape,Bnd_Box,TopTools_ShapeMapHasher>::Iterator BiTgte_DataMapIteratorOfDataMapOfShapeBox;
-
-
-#endif
BiTgte_CurveOnEdge.hxx
BiTgte_CurveOnVertex.cxx
BiTgte_CurveOnVertex.hxx
-BiTgte_DataMapIteratorOfDataMapOfShapeBox.hxx
-BiTgte_DataMapOfShapeBox.hxx
BiTgte_HCurveOnEdge.hxx
BiTgte_HCurveOnEdge_0.cxx
BiTgte_HCurveOnVertex.hxx
IntTools_FaceFace.hxx
IntTools_FClass2d.cxx
IntTools_FClass2d.hxx
-IntTools_IndexedDataMapOfTransientAddress.hxx
IntTools_ListIteratorOfListOfBox.hxx
IntTools_ListIteratorOfListOfCurveRangeSample.hxx
IntTools_ListIteratorOfListOfSurfaceRangeSample.hxx
IntTools_Context::~IntTools_Context()
{
Standard_Address anAdr;
- BOPCol_DataMapIteratorOfDataMapOfShapeAddress aIt;
- BOPCol_DataMapIteratorOfDataMapOfTransientAddress aIt1;
+ DataMapOfShapeAddress::Iterator aIt;
+ DataMapOfTransientAddress::Iterator aIt1;
//
IntTools_FClass2d* pFClass2d;
//
void IntTools_Context::clearCachedPOnSProjectors()
{
GeomAPI_ProjectPointOnSurf* pProjPS;
- BOPCol_DataMapIteratorOfDataMapOfShapeAddress aIt(myProjPSMap);
+ DataMapOfShapeAddress::Iterator aIt(myProjPSMap);
for (; aIt.More(); aIt.Next()) {
Standard_Address anAdr=aIt.Value();
pProjPS=(GeomAPI_ProjectPointOnSurf*)anAdr;
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <BOPCol_BaseAllocator.hxx>
-#include <BOPCol_DataMapOfShapeAddress.hxx>
-#include <BOPCol_DataMapOfTransientAddress.hxx>
+#include <NCollection_BaseAllocator.hxx>
+#include <NCollection_DataMap.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Precision.hxx>
#include <TopAbs_State.hxx>
#include <Standard_Boolean.hxx>
#include <BRepAdaptor_Surface.hxx>
+#include <TColStd_MapTransientHasher.hxx>
class IntTools_FClass2d;
class TopoDS_Face;
class GeomAPI_ProjectPointOnSurf;
class Bnd_Box;
class TopoDS_Shape;
-
//! The intersection Context contains geometrical
//! and topological toolkit (classifiers, projectors, etc).
//! The intersection Context is for caching the tools
Standard_EXPORT IntTools_Context();
Standard_EXPORT virtual ~IntTools_Context();
- Standard_EXPORT IntTools_Context(const BOPCol_BaseAllocator& theAllocator);
+ Standard_EXPORT IntTools_Context(const Handle(NCollection_BaseAllocator)& theAllocator);
//! Returns a reference to point classifier
protected:
-
- BOPCol_BaseAllocator myAllocator;
- BOPCol_DataMapOfShapeAddress myFClass2dMap;
- BOPCol_DataMapOfShapeAddress myProjPSMap;
- BOPCol_DataMapOfShapeAddress myProjPCMap;
- BOPCol_DataMapOfShapeAddress mySClassMap;
- BOPCol_DataMapOfTransientAddress myProjPTMap;
- BOPCol_DataMapOfShapeAddress myHatcherMap;
- BOPCol_DataMapOfShapeAddress myProjSDataMap;
- BOPCol_DataMapOfShapeAddress myBndBoxDataMap;
- BOPCol_DataMapOfShapeAddress mySurfAdaptorMap;
+ typedef NCollection_DataMap<TopoDS_Shape,
+ Standard_Address,
+ TopTools_ShapeMapHasher> DataMapOfShapeAddress;
+ typedef NCollection_DataMap<Handle(Standard_Transient),
+ Standard_Address,
+ TColStd_MapTransientHasher> DataMapOfTransientAddress;
+
+ Handle(NCollection_BaseAllocator) myAllocator;
+ DataMapOfShapeAddress myFClass2dMap;
+ DataMapOfShapeAddress myProjPSMap;
+ DataMapOfShapeAddress myProjPCMap;
+ DataMapOfShapeAddress mySClassMap;
+ DataMapOfTransientAddress myProjPTMap;
+ DataMapOfShapeAddress myHatcherMap;
+ DataMapOfShapeAddress myProjSDataMap;
+ DataMapOfShapeAddress myBndBoxDataMap;
+ DataMapOfShapeAddress mySurfAdaptorMap;
Standard_Integer myCreateFlag;
Standard_Real myPOnSTolerance;
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
-#include <BOPCol_MapOfInteger.hxx>
+#include <TColStd_MapOfInteger.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <ElCLib.hxx>
Standard_Real aTi11, aTi12, aTi21, aTi22;
Standard_Real aTj11, aTj12, aTj21, aTj22;
Standard_Real aRes1, aRes2, dTR1, dTR2;
- BOPCol_MapOfInteger aMI;
+ TColStd_MapOfInteger aMI;
//
aRes1 = Resolution(myCurve1.Curve().Curve(),
myCurve1.GetType(), myResCoeff1, myTol);
+++ /dev/null
-// Created on: 2000-05-18
-// Created by: Peter KURNEV
-// Copyright (c) 2000-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef IntTools_IndexedDataMapOfTransientAddress_HeaderFile
-#define IntTools_IndexedDataMapOfTransientAddress_HeaderFile
-
-#include <Standard_Transient.hxx>
-#include <Standard_Address.hxx>
-#include <TColStd_MapTransientHasher.hxx>
-#include <NCollection_IndexedDataMap.hxx>
-
-typedef NCollection_IndexedDataMap<Handle(Standard_Transient),Standard_Address,TColStd_MapTransientHasher> IntTools_IndexedDataMapOfTransientAddress;
-
-
-#endif
return anAppended;
}
+ //! Appends an empty value and returns the reference to it
+ TheItemType& Appended ()
+ {
+ TheItemType& anAppended = *(TheItemType* )expandV (myLength);
+ return anAppended;
+ }
+
//! Operator() - query the const value
const TheItemType& operator() (const Standard_Integer theIndex) const
{
for (; anCheckIter.More(); anCheckIter.Next())
{
const BOPAlgo_CheckResult& aCurCheckRes = anCheckIter.Value();
- const BOPCol_ListOfShape& aCurFaultyShapes = aCurCheckRes.GetFaultyShapes1();
- BOPCol_ListIteratorOfListOfShape aFaultyIter(aCurFaultyShapes);
+ const TopTools_ListOfShape& aCurFaultyShapes = aCurCheckRes.GetFaultyShapes1();
+ TopTools_ListIteratorOfListOfShape aFaultyIter(aCurFaultyShapes);
for (; aFaultyIter.More(); aFaultyIter.Next())
{
const TopoDS_Shape& aFaultyShape = aFaultyIter.Value();
#include <BRepAlgoAPI_Cut.hxx>
#include <BRepAlgoAPI_Section.hxx>
//
-#include <BOPTools.hxx>
-//
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
+#include <TopExp.hxx>
+#include <TopTools_MapOfShape.hxx>
//=======================================================================
//function : OCC25446
//purpose :
aOp = (BOPAlgo_Operation)iOp;
//
Standard_Integer iErr;
- BOPCol_ListOfShape aLS;
+ TopTools_ListOfShape aLS;
BOPAlgo_PaveFiller aPF;
//
aLS.Append(aS1);
const TopoDS_Shape& aRes = pBuilder->Shape();
DBRep::Set(argv[1], aRes);
//
- BOPCol_MapOfShape aMapArgs, aMapShape;
- BOPCol_MapIteratorOfMapOfShape aIt;
+ TopTools_MapOfShape aMapArgs, aMapShape;
+ TopTools_MapIteratorOfMapOfShape aIt;
Standard_Boolean bIsDeletedHist, bIsDeletedMap;
TopAbs_ShapeEnum aType;
//
- BOPTools::MapShapes(aS1, aMapArgs);
- BOPTools::MapShapes(aS2, aMapArgs);
- BOPTools::MapShapes(aRes, aMapShape);
+ TopExp::MapShapes(aS1, aMapArgs);
+ TopExp::MapShapes(aS2, aMapArgs);
+ TopExp::MapShapes(aRes, aMapShape);
//
aIt.Initialize(aMapArgs);
for (; aIt.More(); aIt.Next()) {
IntTools
BRepAlgoAPI
-BOPCol
BOPDS
BOPAlgo
BOPTools
}
}
+//=======================================================================
+//function : MapShapes
+//purpose :
+//=======================================================================
+void TopExp::MapShapes(const TopoDS_Shape& S,
+ TopTools_MapOfShape& M)
+{
+ M.Add(S);
+ for (TopoDS_Iterator it(S); it.More(); it.Next())
+ MapShapes(it.Value(), M);
+}
+
//=======================================================================
//function : MapShapesAndAncestors
//purpose :
#include <TopAbs_ShapeEnum.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
#include <Standard_Boolean.hxx>
class TopoDS_Shape;
class TopoDS_Vertex;
//! Stores in the map <M> all the sub-shapes of <S>.
Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_IndexedMapOfShape& M);
-
+
+ //! Stores in the map <M> all the sub-shapes of <S>.
+ Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_MapOfShape& M);
+
//! Stores in the map <M> all the subshape of <S> of
//! type <TS> for each one append to the list all
//! the ancestors of type <TA>. For example map all
TopTools_DataMapOfIntegerShape.hxx
TopTools_DataMapOfOrientedShapeInteger.hxx
TopTools_DataMapOfOrientedShapeShape.hxx
+TopTools_DataMapOfShapeBox.hxx
TopTools_DataMapOfShapeInteger.hxx
TopTools_DataMapOfShapeListOfInteger.hxx
TopTools_DataMapOfShapeListOfShape.hxx
TopTools_HSequenceOfShape.hxx
TopTools_IndexedDataMapOfShapeAddress.hxx
TopTools_IndexedDataMapOfShapeListOfShape.hxx
+TopTools_IndexedDataMapOfShapeReal.hxx
TopTools_IndexedDataMapOfShapeShape.hxx
TopTools_IndexedMapOfOrientedShape.hxx
TopTools_IndexedMapOfShape.hxx
TopTools_ListIteratorOfListOfShape.hxx
+TopTools_ListOfListOfShape.hxx
TopTools_ListOfShape.hxx
TopTools_LocationSet.cxx
TopTools_LocationSet.hxx
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef TopTools_DataMapOfShapeBox_HeaderFile
+#define TopTools_DataMapOfShapeBox_HeaderFile
+
+#include <Bnd_Box.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+
+#include <NCollection_DataMap.hxx>
+
+typedef NCollection_DataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> TopTools_DataMapOfShapeBox;
+typedef TopTools_DataMapOfShapeBox::Iterator TopTools_DataMapIteratorOfDataMapOfShapeBox;
+
+#endif
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef TopTools_IndexedDataMapOfShapeReal_HeaderFile
+#define TopTools_IndexedDataMapOfShapeReal_HeaderFile
+
+#include <NCollection_IndexedDataMap.hxx>
+#include <Standard_Real.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopTools_ShapeMapHasher.hxx>
+
+typedef NCollection_IndexedDataMap<TopoDS_Shape, Standard_Real, TopTools_ShapeMapHasher> TopTools_IndexedDataMapOfShapeReal;
+
+#endif
--- /dev/null
+// Created by: Eugeny MALTCHIKOV
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#ifndef TopTools_ListOfListOfShape_HeaderFile
+#define TopTools_ListOfListOfShape_HeaderFile
+
+#include <TopTools_ListOfShape.hxx>
+
+typedef NCollection_List<TopTools_ListOfShape> TopTools_ListOfListOfShape;
+typedef TopTools_ListOfListOfShape::Iterator TopTools_ListIteratorOfListOfListOfShape;
+
+
+#endif