Mantis issue 0021129: EDF 1541 GEOM: Problem with GetInPlace.

This commit is contained in:
jfa 2011-06-16 09:30:35 +00:00
parent 82dd601449
commit 10e60380a9
2 changed files with 161 additions and 154 deletions

View File

@ -19,9 +19,9 @@
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
// File: GEOMAlgo_GetInPlace.cxx // File: GEOMAlgo_GetInPlace.cxx
// Created: // Created:
// Author: Peter KURNEV // Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx> #include <GEOMAlgo_GetInPlace.hxx>
@ -65,7 +65,7 @@
static static
void MapBRepShapes(const TopoDS_Shape& aS, void MapBRepShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aM); TopTools_IndexedMapOfShape& aM);
//======================================================================= //=======================================================================
@ -316,7 +316,10 @@ void GEOMAlgo_GetInPlace::Intersect()
// //
const TopoDS_Shape& aS1=aMS1(i); const TopoDS_Shape& aS1=aMS1(i);
BRepBndLib::Add(aS1, aBox1); BRepBndLib::Add(aS1, aBox1);
aBox1.SetGap(myTolerance); //modified by NIZNHY-PKV Fri Jun 10 08:20:03 2011f
//aBox1.SetGap(myTolerance);
aBox1.Enlarge(myTolerance);
//modified by NIZNHY-PKV Fri Jun 10 08:20:06 2011t
// //
aTreeFiller.Add(i, aBox1); aTreeFiller.Add(i, aBox1);
} }
@ -330,7 +333,10 @@ void GEOMAlgo_GetInPlace::Intersect()
// //
const TopoDS_Shape& aS2=aMS2(j); const TopoDS_Shape& aS2=aMS2(j);
BRepBndLib::Add(aS2, aBox2); BRepBndLib::Add(aS2, aBox2);
aBox2.SetGap(myTolerance); //modified by NIZNHY-PKV Fri Jun 10 08:20:23 2011f
//aBox2.SetGap(myTolerance);
aBox2.Enlarge(myTolerance);
//modified by NIZNHY-PKV Fri Jun 10 08:20:25 2011t
// //
aSelector.Clear(); aSelector.Clear();
aSelector.SetBox(aBox2); aSelector.SetBox(aBox2);
@ -346,14 +352,14 @@ void GEOMAlgo_GetInPlace::Intersect()
const TopoDS_Shape& aS1=aMS1(i); const TopoDS_Shape& aS1=aMS1(i);
// //
if (aDMSLS.IsBound(aS1)) { if (aDMSLS.IsBound(aS1)) {
TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aS1); TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aS1);
aLS.Append(aS2); aLS.Append(aS2);
} }
else { else {
TopTools_ListOfShape aLS; TopTools_ListOfShape aLS;
// //
aLS.Append(aS2); aLS.Append(aS2);
aDMSLS.Bind(aS1, aLS); aDMSLS.Bind(aS1, aLS);
} }
} }
}// for (j=1; j<=aNbS2; ++j) { }// for (j=1; j<=aNbS2; ++j) {
@ -395,7 +401,7 @@ void GEOMAlgo_GetInPlace::PerformVV()
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::FillEdgesOn() void GEOMAlgo_GetInPlace::FillEdgesOn()
{ {
Standard_Integer i, aNbE, aNbSOn; Standard_Integer i, aNbE;
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
TopTools_IndexedMapOfShape aME; TopTools_IndexedMapOfShape aME;
TopTools_MapIteratorOfMapOfShape aItMS; TopTools_MapIteratorOfMapOfShape aItMS;
@ -412,13 +418,13 @@ void GEOMAlgo_GetInPlace::FillEdgesOn()
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aV1=aIt.Value(); const TopoDS_Shape& aV1=aIt.Value();
if (myShapesOn.IsBound(aV1)) { if (myShapesOn.IsBound(aV1)) {
const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aV1); const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aV1);
aNbSOn=aMSOn.Extent(); //aNbSOn=aMSOn.Extent();
aItMS.Initialize(aMSOn); aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aV2=aItMS.Key(); const TopoDS_Shape& aV2=aItMS.Key();
FillShapesOn(aE1, aV2); FillShapesOn(aE1, aV2);
} }
} }
} }
} }
@ -444,7 +450,7 @@ void GEOMAlgo_GetInPlace::PerformVE()
if (myShapesOn.IsBound(aE1)) { if (myShapesOn.IsBound(aE1)) {
const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1); const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
if (aMSOn.Contains(aV2)) { if (aMSOn.Contains(aV2)) {
continue; continue;
} }
} }
// //
@ -486,8 +492,8 @@ void GEOMAlgo_GetInPlace::PerformEE()
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aV2=aIt.Value(); const TopoDS_Shape& aV2=aIt.Value();
if (!(aMSOn.Contains(aV2) || aMSIn.Contains(aV2))) { if (!(aMSOn.Contains(aV2) || aMSIn.Contains(aV2))) {
bFound=!bFound; bFound=!bFound;
break; break;
} }
} }
if (!bFound) { if (!bFound) {
@ -531,7 +537,7 @@ void GEOMAlgo_GetInPlace::PerformVF()
for (i=1; i<=aNbE; ++i) { for (i=1; i<=aNbE; ++i) {
const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i)); const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i));
if (BRep_Tool::Degenerated(aE1)) { if (BRep_Tool::Degenerated(aE1)) {
continue; continue;
} }
// //
bHasOn=myShapesOn.IsBound(aE1); bHasOn=myShapesOn.IsBound(aE1);
@ -540,7 +546,7 @@ void GEOMAlgo_GetInPlace::PerformVF()
const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX; const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX;
bFound= (aMSOn.Contains(aV2) || aMSIn.Contains(aV2)); bFound= (aMSOn.Contains(aV2) || aMSIn.Contains(aV2));
if (bFound) { if (bFound) {
break; break;
} }
} }
// //
@ -563,7 +569,7 @@ void GEOMAlgo_GetInPlace::PerformVF()
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::FillFacesOn() void GEOMAlgo_GetInPlace::FillFacesOn()
{ {
Standard_Integer i, j, aNbF, aNbE, aNbSOn; Standard_Integer i, j, aNbF, aNbE;
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
TopTools_IndexedMapOfShape aMF, aME; TopTools_IndexedMapOfShape aMF, aME;
TopTools_MapIteratorOfMapOfShape aItMS; TopTools_MapIteratorOfMapOfShape aItMS;
@ -579,25 +585,25 @@ void GEOMAlgo_GetInPlace::FillFacesOn()
for (j=1; j<=aNbE; ++j) { for (j=1; j<=aNbE; ++j) {
const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(j)); const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(j));
if (BRep_Tool::Degenerated(aE1)) { if (BRep_Tool::Degenerated(aE1)) {
continue; continue;
} }
// //
if (myShapesOn.IsBound(aE1)) { if (myShapesOn.IsBound(aE1)) {
const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1); const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
aItMS.Initialize(aMSOn); aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key(); const TopoDS_Shape& aS2=aItMS.Key();
FillShapesOn(aF1, aS2); FillShapesOn(aF1, aS2);
} }
} }
// //
if (myShapesIn.IsBound(aE1)) { if (myShapesIn.IsBound(aE1)) {
const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aE1); const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aE1);
aItMS.Initialize(aMSIn); aItMS.Initialize(aMSIn);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key(); const TopoDS_Shape& aS2=aItMS.Key();
FillShapesOn(aF1, aS2); FillShapesOn(aF1, aS2);
} }
} }
}//for (j=1; j<=aNbE; ++j) { }//for (j=1; j<=aNbE; ++j) {
}//for (i=1; i<=aNbF; ++i) { }//for (i=1; i<=aNbF; ++i) {
@ -609,7 +615,6 @@ void GEOMAlgo_GetInPlace::FillFacesOn()
void GEOMAlgo_GetInPlace::PerformEF() void GEOMAlgo_GetInPlace::PerformEF()
{ {
Standard_Boolean bFound, bHasOnF, bHasInF; Standard_Boolean bFound, bHasOnF, bHasInF;
Standard_Integer i, aNbE;
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
TopTools_MapOfShape aMSX; TopTools_MapOfShape aMSX;
// //
@ -639,7 +644,7 @@ void GEOMAlgo_GetInPlace::PerformEF()
const TopoDS_Shape& aV2=aIt.Value(); const TopoDS_Shape& aV2=aIt.Value();
bFound=(aMSOnF.Contains(aV2) || aMSInF.Contains(aV2)); bFound=(aMSOnF.Contains(aV2) || aMSInF.Contains(aV2));
if (!bFound) { if (!bFound) {
break; break;
} }
} }
if (!bFound) { if (!bFound) {
@ -689,11 +694,11 @@ void GEOMAlgo_GetInPlace::PerformFF()
for (i=1; i<=aNbS2; ++i) { for (i=1; i<=aNbS2; ++i) {
const TopoDS_Shape& aS2=aMS2(i); const TopoDS_Shape& aS2=aMS2(i);
if (aS2.IsSame(aF2)) { if (aS2.IsSame(aF2)) {
continue; continue;
} }
bFound=(aMSOnF.Contains(aS2) || aMSInF.Contains(aS2)); bFound=(aMSOnF.Contains(aS2) || aMSInF.Contains(aS2));
if (!bFound) { if (!bFound) {
break; break;
} }
} }
if (!bFound) { if (!bFound) {
@ -715,7 +720,7 @@ void GEOMAlgo_GetInPlace::PerformFF()
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::FillSolidsOn() void GEOMAlgo_GetInPlace::FillSolidsOn()
{ {
Standard_Integer i, j, aNbS, aNbF, aNbSOn; Standard_Integer i, j, aNbS, aNbF;
TopTools_IndexedMapOfShape aMS, aMF; TopTools_IndexedMapOfShape aMS, aMF;
TopTools_MapIteratorOfMapOfShape aItMS; TopTools_MapIteratorOfMapOfShape aItMS;
// //
@ -732,21 +737,21 @@ void GEOMAlgo_GetInPlace::FillSolidsOn()
const TopoDS_Shape& aF1=aMF(j); const TopoDS_Shape& aF1=aMF(j);
// //
if (myShapesOn.IsBound(aF1)) { if (myShapesOn.IsBound(aF1)) {
const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aF1); const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aF1);
aItMS.Initialize(aMSOn); aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key(); const TopoDS_Shape& aS2=aItMS.Key();
FillShapesOn(aSD1, aS2); FillShapesOn(aSD1, aS2);
} }
} }
// //
if (myShapesIn.IsBound(aF1)) { if (myShapesIn.IsBound(aF1)) {
const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aF1); const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aF1);
aItMS.Initialize(aMSIn); aItMS.Initialize(aMSIn);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key(); const TopoDS_Shape& aS2=aItMS.Key();
FillShapesOn(aSD1, aS2); FillShapesOn(aSD1, aS2);
} }
} }
}//for (j=1; j<=aNbF; ++j) { }//for (j=1; j<=aNbF; ++j) {
}//for (i=1; i<=aNbS; ++i) { }//for (i=1; i<=aNbS; ++i) {
@ -757,8 +762,7 @@ void GEOMAlgo_GetInPlace::FillSolidsOn()
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::PerformZF() void GEOMAlgo_GetInPlace::PerformZF()
{ {
Standard_Boolean bFound, bHasOnF, bHasInF; Standard_Boolean bFound, bHasOnF;
Standard_Integer i, aNbE;
TopTools_MapOfShape aMSX; TopTools_MapOfShape aMSX;
// //
myErrorStatus=0; myErrorStatus=0;
@ -824,17 +828,17 @@ void GEOMAlgo_GetInPlace::PerformZZ()
const TopoDS_Shape& aF2=aMS2(i); const TopoDS_Shape& aF2=aMS2(i);
// //
if (aMSIn.Contains(aF2)) { if (aMSIn.Contains(aF2)) {
++iCntIn; ++iCntIn;
bFound=Standard_True; bFound=Standard_True;
break; break;
} }
else if (!aMSOn.Contains(aF2)) { else if (!aMSOn.Contains(aF2)) {
++iCntOut; ++iCntOut;
bFound=Standard_False;// out bFound=Standard_False;// out
break; break;
} }
else { else {
++iCntOn; //on ++iCntOn; //on
} }
} }
// //
@ -845,7 +849,7 @@ void GEOMAlgo_GetInPlace::PerformZZ()
if (!iCntIn) { if (!iCntIn) {
bFound=CheckCoincidence(aSo1, aSo2); bFound=CheckCoincidence(aSo1, aSo2);
if (myErrorStatus) { if (myErrorStatus) {
return; return;
} }
} }
if (bFound) { if (bFound) {
@ -885,8 +889,8 @@ void GEOMAlgo_GetInPlace::FillImages()
aLSx.Clear(); aLSx.Clear();
aItMS.Initialize(aMSx); aItMS.Initialize(aMSx);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aVx=aItMS.Key(); const TopoDS_Shape& aVx=aItMS.Key();
aLSx.Append(aVx); aLSx.Append(aVx);
} }
// //
myImages.Bind(aV, aLSx); myImages.Bind(aV, aLSx);
@ -906,11 +910,11 @@ void GEOMAlgo_GetInPlace::FillImages()
aLSx.Clear(); aLSx.Clear();
aItMS.Initialize(aMSx); aItMS.Initialize(aMSx);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aEx=aItMS.Key(); const TopoDS_Shape& aEx=aItMS.Key();
aType=aEx.ShapeType(); aType=aEx.ShapeType();
if (aType==TopAbs_EDGE){ if (aType==TopAbs_EDGE){
aLSx.Append(aEx); aLSx.Append(aEx);
} }
} }
// //
myImages.Bind(aE, aLSx); myImages.Bind(aE, aLSx);
@ -928,14 +932,14 @@ void GEOMAlgo_GetInPlace::FillImages()
for(; aIt.More(); aIt.Next()) { for(; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aE=aIt.Value(); const TopoDS_Shape& aE=aIt.Value();
if (myImages.IsBound(aE)) { if (myImages.IsBound(aE)) {
const TopTools_ListOfShape& aLSi=myImages.Find(aE); const TopTools_ListOfShape& aLSi=myImages.Find(aE);
aNbSi=aLSi.Extent(); aNbSi=aLSi.Extent();
// //
aItLS.Initialize(aLSi); aItLS.Initialize(aLSi);
for (; aItLS.More(); aItLS.Next()) { for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aEi=aItLS.Value(); const TopoDS_Shape& aEi=aItLS.Value();
aLSx.Append(aEi); aLSx.Append(aEi);
} }
} }
} }
myImages.Bind(aW, aLSx); myImages.Bind(aW, aLSx);
@ -954,11 +958,11 @@ void GEOMAlgo_GetInPlace::FillImages()
aLSx.Clear(); aLSx.Clear();
aItMS.Initialize(aMSx); aItMS.Initialize(aMSx);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aFx=aItMS.Key(); const TopoDS_Shape& aFx=aItMS.Key();
aType=aFx.ShapeType(); aType=aFx.ShapeType();
if (aType==TopAbs_FACE){ if (aType==TopAbs_FACE){
aLSx.Append(aFx); aLSx.Append(aFx);
} }
} }
// //
myImages.Bind(aF, aLSx); myImages.Bind(aF, aLSx);
@ -976,14 +980,14 @@ void GEOMAlgo_GetInPlace::FillImages()
for(; aIt.More(); aIt.Next()) { for(; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aF=aIt.Value(); const TopoDS_Shape& aF=aIt.Value();
if (myImages.IsBound(aF)) { if (myImages.IsBound(aF)) {
const TopTools_ListOfShape& aLSi=myImages.Find(aF); const TopTools_ListOfShape& aLSi=myImages.Find(aF);
aNbSi=aLSi.Extent(); aNbSi=aLSi.Extent();
// //
aItLS.Initialize(aLSi); aItLS.Initialize(aLSi);
for (; aItLS.More(); aItLS.Next()) { for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aFi=aItLS.Value(); const TopoDS_Shape& aFi=aItLS.Value();
aLSx.Append(aFi); aLSx.Append(aFi);
} }
} }
} }
myImages.Bind(aSh, aLSx); myImages.Bind(aSh, aLSx);
@ -1002,11 +1006,11 @@ void GEOMAlgo_GetInPlace::FillImages()
aLSx.Clear(); aLSx.Clear();
aItMS.Initialize(aMSx); aItMS.Initialize(aMSx);
for (; aItMS.More(); aItMS.Next()) { for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aZx=aItMS.Key(); const TopoDS_Shape& aZx=aItMS.Key();
aType=aZx.ShapeType(); aType=aZx.ShapeType();
if (aType==TopAbs_SOLID){ if (aType==TopAbs_SOLID){
aLSx.Append(aZx); aLSx.Append(aZx);
} }
} }
// //
myImages.Bind(aZ, aLSx); myImages.Bind(aZ, aLSx);
@ -1024,14 +1028,14 @@ void GEOMAlgo_GetInPlace::FillImages()
for(; aIt.More(); aIt.Next()) { for(; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aZ=aIt.Value(); const TopoDS_Shape& aZ=aIt.Value();
if (myImages.IsBound(aZ)) { if (myImages.IsBound(aZ)) {
const TopTools_ListOfShape& aLSi=myImages.Find(aZ); const TopTools_ListOfShape& aLSi=myImages.Find(aZ);
aNbSi=aLSi.Extent(); aNbSi=aLSi.Extent();
// //
aItLS.Initialize(aLSi); aItLS.Initialize(aLSi);
for (; aItLS.More(); aItLS.Next()) { for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aZi=aItLS.Value(); const TopoDS_Shape& aZi=aItLS.Value();
aLSx.Append(aZi); aLSx.Append(aZi);
} }
} }
} }
myImages.Bind(aCs, aLSx); myImages.Bind(aCs, aLSx);
@ -1067,8 +1071,8 @@ void GEOMAlgo_GetInPlace::FillImagesCompound(const TopoDS_Shape& aS)
const TopTools_ListOfShape& aLSi=myImages.Find(aSx); const TopTools_ListOfShape& aLSi=myImages.Find(aSx);
aItLS.Initialize(aLSi); aItLS.Initialize(aLSi);
for (; aItLS.More(); aItLS.Next()) { for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aSi=aItLS.Value(); const TopoDS_Shape& aSi=aItLS.Value();
aLSx.Append(aSi); aLSx.Append(aSi);
} }
} }
} }
@ -1080,7 +1084,7 @@ void GEOMAlgo_GetInPlace::FillImagesCompound(const TopoDS_Shape& aS)
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::FillShapesIn(const TopoDS_Shape& aS1, void GEOMAlgo_GetInPlace::FillShapesIn(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) const TopoDS_Shape& aS2)
{ {
if (myShapesIn.IsBound(aS1)) { if (myShapesIn.IsBound(aS1)) {
TopTools_MapOfShape& aMS=myShapesIn.ChangeFind(aS1); TopTools_MapOfShape& aMS=myShapesIn.ChangeFind(aS1);
@ -1098,7 +1102,7 @@ void GEOMAlgo_GetInPlace::FillShapesIn(const TopoDS_Shape& aS1,
//purpose : //purpose :
//======================================================================= //=======================================================================
void GEOMAlgo_GetInPlace::FillShapesOn(const TopoDS_Shape& aS1, void GEOMAlgo_GetInPlace::FillShapesOn(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2) const TopoDS_Shape& aS2)
{ {
if (myShapesOn.IsBound(aS1)) { if (myShapesOn.IsBound(aS1)) {
TopTools_MapOfShape& aMS=myShapesOn.ChangeFind(aS1); TopTools_MapOfShape& aMS=myShapesOn.ChangeFind(aS1);
@ -1116,9 +1120,9 @@ void GEOMAlgo_GetInPlace::FillShapesOn(const TopoDS_Shape& aS1,
//purpose : //purpose :
//======================================================================= //=======================================================================
void MapBRepShapes(const TopoDS_Shape& aS, void MapBRepShapes(const TopoDS_Shape& aS,
TopTools_IndexedMapOfShape& aM) TopTools_IndexedMapOfShape& aM)
{ {
Standard_Boolean bHasBRep, bDegenerated; Standard_Boolean bDegenerated;
TopAbs_ShapeEnum aType; TopAbs_ShapeEnum aType;
TopoDS_Iterator aIt; TopoDS_Iterator aIt;
// //

View File

@ -3858,10 +3858,13 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
return NULL; return NULL;
} }
if (!aGIP.IsFound()) { // aGIP.IsFound() returns true only when the whole theShapeWhat
SetErrorCode(NOT_FOUND_ANY); // is found (as one shape or several parts). But we are also interested
return NULL; // in the partial result, that is why this check is commented.
} //if (!aGIP.IsFound()) {
// SetErrorCode(NOT_FOUND_ANY);
// return NULL;
//}
const TopTools_DataMapOfShapeListOfShape& aDMSLS = aGIP.Images(); const TopTools_DataMapOfShapeListOfShape& aDMSLS = aGIP.Images();
if (!aDMSLS.IsBound(aWhat)) { if (!aDMSLS.IsBound(aWhat)) {
@ -3871,7 +3874,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace (Handle(GEOM_Object)
// the list of shapes aLSA contains the shapes // the list of shapes aLSA contains the shapes
// of the Shape For Search that corresponds // of the Shape For Search that corresponds
// to the Argument aWhat // to the Argument aWhat
const TopTools_ListOfShape& aLSA = aDMSLS.Find(aWhat); const TopTools_ListOfShape& aLSA = aDMSLS.Find(aWhat);
if (aLSA.Extent() == 0) { if (aLSA.Extent() == 0) {
SetErrorCode(NOT_FOUND_ANY); // Not found any Results SetErrorCode(NOT_FOUND_ANY); // Not found any Results