1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025609: Clean up the duplicate classes in TKBO project

1. 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*;

2. The class *BOPDS_PassKey* and containers for it have been removed as unused;

3. The unused containers from *IntTools* package have been removed:
- *IntTools_DataMapOfShapeAddress* is removed as unused;
- *IntTools_IndexedDataMapOfTransientAddress* is removed as unused;

4. The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;

5. The class *BOPTools* has been removed as duplicate of the class *TopExp*;
This commit is contained in:
emv
2017-11-23 10:57:25 +03:00
committed by bugmaster
parent 2da5126371
commit 1155d05a06
210 changed files with 2355 additions and 4551 deletions

View File

@@ -1,98 +0,0 @@
// 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());
}

View File

@@ -1,82 +0,0 @@
// 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

View File

@@ -16,10 +16,6 @@
// 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>
@@ -65,6 +61,9 @@
#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>
@@ -76,7 +75,7 @@ static
static
Standard_Boolean FindFacePairs (const TopoDS_Edge& theE,
const BOPCol_ListOfShape& thLF,
const TopTools_ListOfShape& thLF,
BOPTools_ListOfCoupleOfShape& theLCFF,
Handle(IntTools_Context)& theContext);
static
@@ -122,13 +121,13 @@ void BOPTools_AlgoTools::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)
{
// 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())
@@ -138,11 +137,11 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
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();
@@ -150,8 +149,8 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
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();
@@ -173,21 +172,21 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
(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);
@@ -199,7 +198,7 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
// purpose:
//=======================================================================
void BOPTools_AlgoTools::MakeConnexityBlocks
(const BOPCol_ListOfShape& theLS,
(const TopTools_ListOfShape& theLS,
const TopAbs_ShapeEnum theConnectionType,
const TopAbs_ShapeEnum theElementType,
BOPTools_ListOfConnexityBlock& theLCB)
@@ -209,9 +208,9 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
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();
@@ -221,21 +220,21 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
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))
@@ -270,8 +269,8 @@ void BOPTools_AlgoTools::MakeConnexityBlocks
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;
@@ -282,7 +281,7 @@ void BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape& theWire)
TopoDS_Wire aWire;
aBB.MakeWire(aWire);
// fence map
BOPCol_MapOfOrientedShape aMFence;
TopTools_MapOfOrientedShape aMFence;
//
TopoDS_Iterator aIt(theWire);
for (; aIt.More(); aIt.Next()) {
@@ -307,7 +306,7 @@ void BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape& theWire)
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;
@@ -315,7 +314,7 @@ void BOPTools_AlgoTools::OrientEdgesOnWire(TopoDS_Shape& theWire)
//
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)) {
@@ -362,26 +361,26 @@ void BOPTools_AlgoTools::OrientFacesOnShell (TopoDS_Shape& aShell)
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)) {
@@ -401,7 +400,7 @@ void BOPTools_AlgoTools::OrientFacesOnShell (TopoDS_Shape& aShell)
continue;
}
//
const BOPCol_ListOfShape& aLF=aEFMap.FindFromIndex(i);
const TopTools_ListOfShape& aLF=aEFMap.FindFromIndex(i);
aNbF=aLF.Extent();
if (aNbF!=2) {
continue;
@@ -466,10 +465,10 @@ void BOPTools_AlgoTools::OrientFacesOnShell (TopoDS_Shape& aShell)
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)) {
@@ -506,26 +505,26 @@ TopAbs_Orientation Orientation(const TopoDS_Edge& anE,
// 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
@@ -546,7 +545,7 @@ void BOPTools_AlgoTools::MakeConnexityBlock
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();
@@ -616,7 +615,7 @@ TopAbs_State BOPTools_AlgoTools::ComputeState
(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;
@@ -750,7 +749,7 @@ TopAbs_State BOPTools_AlgoTools::ComputeState
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)
{
@@ -759,7 +758,7 @@ Standard_Boolean BOPTools_AlgoTools::IsInternalFace
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:
@@ -792,7 +791,7 @@ Standard_Boolean BOPTools_AlgoTools::IsInternalFace
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
@@ -847,9 +846,9 @@ Standard_Boolean BOPTools_AlgoTools::IsInternalFace
// 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);
@@ -862,7 +861,7 @@ Standard_Boolean BOPTools_AlgoTools::IsInternalFace
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;
@@ -1646,7 +1645,7 @@ Standard_Integer BOPTools_AlgoTools::ComputeVV(const TopoDS_Vertex& aV1,
// 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();
@@ -1695,17 +1694,17 @@ Standard_Boolean BOPTools_AlgoTools::GetEdgeOnFace
//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;
@@ -2181,12 +2180,12 @@ Standard_Boolean BOPTools_AlgoTools::IsOpenShell(const TopoDS_Shell& aSh)
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) {
@@ -2196,7 +2195,7 @@ Standard_Boolean BOPTools_AlgoTools::IsOpenShell(const TopoDS_Shell& aSh)
}
//
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();

View File

@@ -22,18 +22,18 @@
#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;
@@ -60,7 +60,7 @@ public:
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);
@@ -134,14 +134,14 @@ public:
//! * 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
@@ -176,7 +176,7 @@ public:
//! 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.
@@ -189,7 +189,7 @@ public:
//! 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
@@ -198,7 +198,7 @@ public:
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
@@ -208,13 +208,13 @@ public:
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);
@@ -233,7 +233,7 @@ public:
//! 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);
@@ -241,7 +241,7 @@ public:
//! 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);
@@ -249,7 +249,7 @@ public:
//! 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);
@@ -331,7 +331,7 @@ public:
//! 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>.

View File

@@ -13,8 +13,6 @@
// commercial license or contractual agreement.
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPTools.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_Builder.hxx>
#include <BRep_CurveRepresentation.hxx>

View File

@@ -21,7 +21,6 @@
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <Standard_Integer.hxx>
class TopoDS_Edge;
class TopoDS_Face;

View File

@@ -14,8 +14,6 @@
#include <Bnd_Box.hxx>
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_IndexedMapOfShape.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BOPTools_AlgoTools3D.hxx>
#include <BRep_Builder.hxx>
@@ -62,9 +60,10 @@
#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);
@@ -631,7 +630,7 @@ Standard_Boolean BOPTools_AlgoTools3D::IsEmptyShape
{
Standard_Boolean bHasGeometry=Standard_False;
//
BOPCol_IndexedMapOfShape myShapes;
TopTools_IndexedMapOfShape myShapes;
//
Add(aS, myShapes, bHasGeometry);
@@ -642,7 +641,7 @@ Standard_Boolean BOPTools_AlgoTools3D::IsEmptyShape
//purpose :
//=======================================================================
void Add(const TopoDS_Shape& aS,
BOPCol_IndexedMapOfShape& myShapes,
TopTools_IndexedMapOfShape& myShapes,
Standard_Boolean& bHasGeometry)
{
Standard_Integer anIndex;

View File

@@ -16,9 +16,8 @@
#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>
@@ -59,6 +58,7 @@
#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>
@@ -81,12 +81,12 @@
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,
@@ -96,22 +96,22 @@ static
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
@@ -142,7 +142,7 @@ class BOPTools_CPC {
return myMaxTol;
}
//
void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
@@ -154,17 +154,17 @@ class BOPTools_CPC {
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;
//
@@ -184,7 +184,7 @@ class BOPTools_CWT {
myFace=aF;
}
//
void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
@@ -195,16 +195,16 @@ class BOPTools_CWT {
//
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;
//
@@ -233,7 +233,7 @@ class BOPTools_CDT {
myMaxTol=aMaxTol;
}
//
void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
@@ -246,16 +246,16 @@ class BOPTools_CDT {
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;
//
@@ -275,7 +275,7 @@ class BOPTools_CVT {
myEdge=aE;
}
//
void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
@@ -286,17 +286,17 @@ class BOPTools_CVT {
//
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;
//
@@ -316,7 +316,7 @@ class BOPTools_CET {
myFace=aF;
}
//
void SetMapToAvoid(const BOPCol_IndexedMapOfShape& aMapToAvoid) {
void SetMapToAvoid(const TopTools_IndexedMapOfShape& aMapToAvoid) {
mypMapToAvoid = &aMapToAvoid;
}
//
@@ -327,16 +327,16 @@ class BOPTools_CET {
//
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;
//
@@ -349,7 +349,7 @@ typedef BOPCol_Cnt
//=======================================================================
void BOPTools_AlgoTools::CorrectTolerances
(const TopoDS_Shape& aShape,
const BOPCol_IndexedMapOfShape& aMapToAvoid,
const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
@@ -363,7 +363,7 @@ void BOPTools_AlgoTools::CorrectTolerances
//=======================================================================
void BOPTools_AlgoTools::CorrectPointOnCurve
(const TopoDS_Shape& aS,
const BOPCol_IndexedMapOfShape& aMapToAvoid,
const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
@@ -373,7 +373,7 @@ void BOPTools_AlgoTools::CorrectPointOnCurve
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);
@@ -389,7 +389,7 @@ void BOPTools_AlgoTools::CorrectPointOnCurve
//=======================================================================
void BOPTools_AlgoTools::CorrectCurveOnSurface
(const TopoDS_Shape& aS,
const BOPCol_IndexedMapOfShape& aMapToAvoid,
const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Real aMaxTol,
const Standard_Boolean bRunParallel)
{
@@ -401,7 +401,7 @@ void BOPTools_AlgoTools::CorrectCurveOnSurface
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);
//
@@ -409,7 +409,7 @@ void BOPTools_AlgoTools::CorrectCurveOnSurface
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);
@@ -429,7 +429,7 @@ void BOPTools_AlgoTools::CorrectCurveOnSurface
//=======================================================================
void BOPTools_AlgoTools::CorrectShapeTolerances
(const TopoDS_Shape& aShape,
const BOPCol_IndexedMapOfShape& aMapToAvoid,
const TopTools_IndexedMapOfShape& aMapToAvoid,
const Standard_Boolean bRunParallel)
{
TopExp_Explorer aExp;
@@ -439,7 +439,7 @@ void BOPTools_AlgoTools::CorrectShapeTolerances
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);
}
@@ -451,7 +451,7 @@ void BOPTools_AlgoTools::CorrectShapeTolerances
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);
}
@@ -467,7 +467,7 @@ void BOPTools_AlgoTools::CorrectShapeTolerances
//=======================================================================
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);
@@ -674,7 +674,7 @@ static
// 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;
@@ -756,7 +756,7 @@ void CorrectWires(const TopoDS_Face& aFx,
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
@@ -976,7 +976,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
//purpose :
//=======================================================================
void CorrectVertexTolerance(const TopoDS_Edge& aE,
const BOPCol_IndexedMapOfShape& aMapToAvoid)
const TopTools_IndexedMapOfShape& aMapToAvoid)
{
Standard_Real aTolE, aTolV;
TopoDS_Iterator aIt;
@@ -1110,7 +1110,7 @@ Standard_Boolean Validate(const Adaptor3d_Curve& CRef,
// 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;
@@ -1145,7 +1145,7 @@ void UpdateEdges(const TopoDS_Face& aF,
//=======================================================================
void UpdateShape(const TopoDS_Shape& aS,
const Standard_Real aTol,
const BOPCol_IndexedMapOfShape& aMapToAvoid)
const TopTools_IndexedMapOfShape& aMapToAvoid)
{
if (aMapToAvoid.Contains(aS)) {
return;

View File

@@ -36,7 +36,7 @@
static
void TreatCompound(const TopoDS_Shape& theC1,
BOPCol_ListOfShape& theLSX);
TopTools_ListOfShape& theLSX);
//=======================================================================
// function: UpdateVertex
@@ -428,8 +428,8 @@ Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS)
{
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) {
@@ -479,12 +479,12 @@ Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS)
//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);

View File

@@ -0,0 +1,26 @@
// 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

View File

@@ -0,0 +1,70 @@
// 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

View File

@@ -16,7 +16,7 @@
#define BOPTools_ConnexityBlock_HeaderFile
#include <NCollection_BaseAllocator.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
//=======================================================================
//class : ConnexityBlock
@@ -38,11 +38,11 @@ class BOPTools_ConnexityBlock {
myLoops(myAllocator) {
};
//
const BOPCol_ListOfShape& Shapes()const {
const TopTools_ListOfShape& Shapes()const {
return myShapes;
};
//
BOPCol_ListOfShape& ChangeShapes() {
TopTools_ListOfShape& ChangeShapes() {
return myShapes;
};
//
@@ -54,19 +54,19 @@ class BOPTools_ConnexityBlock {
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;
};

View File

@@ -15,6 +15,8 @@
#ifndef BOPTools_CoupleOfShape_HeaderFile
#define BOPTools_CoupleOfShape_HeaderFile
#include <TopoDS_Shape.hxx>
//=======================================================================
//class :
//purpose :

View File

@@ -15,12 +15,12 @@
#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

View File

@@ -19,11 +19,11 @@
#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;
@@ -39,7 +39,7 @@ public:
BOPTools_EdgeSet();
virtual ~BOPTools_EdgeSet();
BOPTools_EdgeSet(const BOPCol_BaseAllocator& theAllocator);
BOPTools_EdgeSet(const Handle(NCollection_BaseAllocator)& theAllocator);
void SetShape (const TopoDS_Shape& theS);
@@ -47,13 +47,13 @@ virtual ~BOPTools_EdgeSet();
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;
@@ -65,8 +65,8 @@ protected:
TopoDS_Shape myShape;
BOPCol_MapOfShape myMap;
BOPCol_ListOfShape myEdges;
TopTools_MapOfShape myMap;
TopTools_ListOfShape myEdges;
private:

View File

@@ -80,9 +80,9 @@
//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()) {
@@ -106,9 +106,9 @@
//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()) {
@@ -124,7 +124,7 @@
{
Standard_Integer aNbEOther, aNbE;
Standard_Boolean bRet;
BOPCol_ListIteratorOfListOfShape aIt;
TopTools_ListIteratorOfListOfShape aIt;
//
aNbE=0;
aNbEOther=theOther.myEdges.Extent();

View File

@@ -0,0 +1,25 @@
// 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

View File

@@ -0,0 +1,176 @@
// 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

View File

@@ -13,12 +13,12 @@
// 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,
@@ -83,7 +83,7 @@ Standard_Integer BOPTools_Set::NbShapes()const
//=======================================================================
BOPTools_Set& BOPTools_Set::Assign(const BOPTools_Set& theOther)
{
BOPCol_ListIteratorOfListOfShape aIt;
TopTools_ListIteratorOfListOfShape aIt;
//
myShape=theOther.myShape;
myNbShapes=theOther.myNbShapes;
@@ -131,8 +131,8 @@ Standard_Boolean BOPTools_Set::IsEqual
return bRet;
}
//
BOPCol_MapOfShape aM1;
BOPCol_ListIteratorOfListOfShape aIt;
TopTools_MapOfShape aM1;
TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(myShapes);
for (; aIt.More(); aIt.Next()) {
@@ -198,7 +198,7 @@ void BOPTools_Set::Add(const TopoDS_Shape& theS,
return;
}
//
BOPCol_ListIteratorOfListOfShape aIt;
TopTools_ListIteratorOfListOfShape aIt;
//
aIt.Initialize(myShapes);
for (; aIt.More(); aIt.Next()) {

View File

@@ -19,12 +19,12 @@
#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;
@@ -39,7 +39,7 @@ public:
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)
@@ -66,8 +66,8 @@ protected:
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;

View File

@@ -19,12 +19,12 @@
#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;
@@ -41,13 +41,13 @@ public:
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);
@@ -55,7 +55,7 @@ virtual ~BOPTools_ShapeSet();
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);
@@ -67,7 +67,7 @@ virtual ~BOPTools_ShapeSet();
void Clear();
void Get (BOPCol_ListOfShape& theLS) const;
void Get (TopTools_ListOfShape& theLS) const;
Standard_Boolean Contains (const BOPTools_ShapeSet& theSet) const;
@@ -79,7 +79,7 @@ protected:
TopoDS_Shape myShape;
BOPCol_MapOfOrientedShape myMap;
TopTools_MapOfOrientedShape myMap;
private:

View File

@@ -89,9 +89,9 @@
//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()) {
@@ -113,9 +113,9 @@
//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()) {
@@ -139,9 +139,9 @@
//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()) {
@@ -156,7 +156,7 @@
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()) {
@@ -174,7 +174,7 @@
//=======================================================================
inline void BOPTools_ShapeSet::Subtract(const BOPTools_ShapeSet& theOther)
{
BOPCol_MapIteratorOfMapOfOrientedShape aIt;
TopTools_MapIteratorOfMapOfOrientedShape aIt;
//
aIt.Initialize(theOther.myMap);
for (; aIt.More(); aIt.Next()) {

View File

@@ -1,5 +1,3 @@
BOPTools.cxx
BOPTools.hxx
BOPTools_AlgoTools.cxx
BOPTools_AlgoTools.hxx
BOPTools_AlgoTools2D.cxx
@@ -9,17 +7,21 @@ BOPTools_AlgoTools3D.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