Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[bos #41409][FORUM] (2024) kindOfShape() bug for CONE2D
[modules/geom.git]
/
src
/
GEOMAlgo
/
GEOMAlgo_Splitter.cxx
diff --git
a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx
b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx
index f48c5e193c83a6af38a0590e9c79f4dd4ca7d255..d44677d0c29458a4c229da85a90aedc63c73b7c5 100644
(file)
--- a/
src/GEOMAlgo/GEOMAlgo_Splitter.cxx
+++ b/
src/GEOMAlgo/GEOMAlgo_Splitter.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
15 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
24 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-36,15
+36,14
@@
#include <BRep_Builder.hxx>
#include <BRep_Builder.hxx>
-#include <BOPCol_MapOfShape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-
-#include <BOPTools.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopExp.hxx>
static
void TreatCompound(const TopoDS_Shape& aC,
static
void TreatCompound(const TopoDS_Shape& aC,
-
BOPCol
_ListOfShape& aLSX);
+
TopTools
_ListOfShape& aLSX);
//=======================================================================
//function :
//=======================================================================
//function :
@@
-96,7
+95,7
@@
void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape)
//function : Tools
//purpose :
//=======================================================================
//function : Tools
//purpose :
//=======================================================================
-const
BOPCol
_ListOfShape& GEOMAlgo_Splitter::Tools()const
+const
TopTools
_ListOfShape& GEOMAlgo_Splitter::Tools()const
{
return myTools;
}
{
return myTools;
}
@@
-149,12
+148,10
@@
void GEOMAlgo_Splitter::Clear()
//=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{
//=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{
- myErrorStatus=0;
- //
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
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()) {
//
aIt.Initialize(myArguments);
for (; aIt.More(); aIt.Next()) {
@@
-162,7
+159,7
@@
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
aType=aS.ShapeType();
if (aType==theType && !myMapTools.Contains(aS)) {
if (myImages.IsBound(aS)) {
aType=aS.ShapeType();
if (aType==theType && !myMapTools.Contains(aS)) {
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();
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
@@
-183,17
+180,21
@@
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
//function : PostTreat
//purpose :
//=======================================================================
//function : PostTreat
//purpose :
//=======================================================================
+#if OCC_VERSION_LARGE < 0x07070000
void GEOMAlgo_Splitter::PostTreat()
void GEOMAlgo_Splitter::PostTreat()
+#else
+void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
+#endif
{
if (myLimit!=TopAbs_SHAPE) {
Standard_Integer i, aNbS;
BRep_Builder aBB;
TopoDS_Compound aC;
{
if (myLimit!=TopAbs_SHAPE) {
Standard_Integer i, aNbS;
BRep_Builder aBB;
TopoDS_Compound aC;
-
BOPCol
_IndexedMapOfShape aMx;
+
TopTools
_IndexedMapOfShape aMx;
//
aBB.MakeCompound(aC);
//
//
aBB.MakeCompound(aC);
//
-
BOPTools
::MapShapes(myShape, myLimit, aMx);
+
TopExp
::MapShapes(myShape, myLimit, aMx);
aNbS=aMx.Extent();
for (i=1; i<=aNbS; ++i) {
const TopoDS_Shape& aS=aMx(i);
aNbS=aMx.Extent();
for (i=1; i<=aNbS; ++i) {
const TopoDS_Shape& aS=aMx(i);
@@
-202,9
+203,9
@@
void GEOMAlgo_Splitter::PostTreat()
if (myLimitMode) {
Standard_Integer iType, iLimit, iTypeX;
TopAbs_ShapeEnum aType, aTypeX;
if (myLimitMode) {
Standard_Integer iType, iLimit, iTypeX;
TopAbs_ShapeEnum aType, aTypeX;
-
BOPCol
_ListOfShape aLSP, aLSX;
-
BOPCol
_ListIteratorOfListOfShape aIt, aItX, aItIm;
-
BOPCol
_MapOfShape aM;
+
TopTools
_ListOfShape aLSP, aLSX;
+
TopTools
_ListIteratorOfListOfShape aIt, aItX, aItIm;
+
TopTools
_MapOfShape aM;
//
iLimit=(Standard_Integer)myLimit;
//
//
iLimit=(Standard_Integer)myLimit;
//
@@
-242,13
+243,13
@@
void GEOMAlgo_Splitter::PostTreat()
}// for (; aIt.More(); aIt.Next()) {
//
aMx.Clear();
}// for (; aIt.More(); aIt.Next()) {
//
aMx.Clear();
-
BOPTools
::MapShapes(aC, aMx);
+
TopExp
::MapShapes(aC, aMx);
// 2. Add them to aC
aIt.Initialize(aLSP);
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS=aIt.Value();
if (myImages.IsBound(aS)) {
// 2. Add them to aC
aIt.Initialize(aLSP);
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);
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
aItIm.Initialize(aLSIm);
for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSIm=aItIm.Value();
@@
-273,7
+274,7
@@
void GEOMAlgo_Splitter::PostTreat()
//
Standard_Integer aNbS;
TopoDS_Iterator aIt;
//
Standard_Integer aNbS;
TopoDS_Iterator aIt;
-
BOPCol
_ListOfShape aLS;
+
TopTools
_ListOfShape aLS;
//
aIt.Initialize(myShape);
for (; aIt.More(); aIt.Next()) {
//
aIt.Initialize(myShape);
for (; aIt.More(); aIt.Next()) {
@@
-285,19
+286,23
@@
void GEOMAlgo_Splitter::PostTreat()
myShape=aLS.First();
}
//
myShape=aLS.First();
}
//
+#if OCC_VERSION_LARGE < 0x07070000
BOPAlgo_Builder::PostTreat();
BOPAlgo_Builder::PostTreat();
+#else
+ BOPAlgo_Builder::PostTreat(theRange);
+#endif
}
//=======================================================================
//function : TreatCompound
//purpose :
//=======================================================================
void TreatCompound(const TopoDS_Shape& aC1,
}
//=======================================================================
//function : TreatCompound
//purpose :
//=======================================================================
void TreatCompound(const TopoDS_Shape& aC1,
-
BOPCol
_ListOfShape& aLSX)
+
TopTools
_ListOfShape& aLSX)
{
Standard_Integer aNbC1;
TopAbs_ShapeEnum aType;
{
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 (aC1);
TopoDS_Iterator aItC;
//
aLC.Append (aC1);