Mantis issue 0021501: [CEA] Non regression test fails on MakePartition. A fix by PKV.

This commit is contained in:
jfa 2012-03-14 11:28:26 +00:00
parent 35bb93a206
commit 76cb7d05c4
2 changed files with 62 additions and 8 deletions

View File

@ -390,7 +390,6 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
if (IsClosedShell(aShell)) {
myLoops.Append(aShell);
}
//modified by NIZNHY-PKV Wed Oct 27 07:10:41 2010f
else {
Standard_Boolean bRefine;
TopoDS_Shell aShx;
@ -400,7 +399,6 @@ void GEOMAlgo_BuilderSolid::PerformLoops()
myLoops.Append(aShx);
}
}
//modified by NIZNHY-PKV Wed Oct 27 07:10:44 2010t
} // for (; aItF.More(); aItF.Next()) {
//
// Post Treatment
@ -611,10 +609,11 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
return;
}
//
Standard_Integer bFlag;
BRep_Builder aBB;
TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt;
TopoDS_Iterator aIt;
TopTools_MapOfShape aMF, aMFP;
TopTools_MapOfShape aMF, aMFP, aMFS;
TopTools_MapIteratorOfMapOfShape aItMF;
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
TopTools_ListOfShape aLSI;
@ -636,6 +635,16 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
for ( ; aSolidIt.More(); aSolidIt.Next()) {
TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value()));
//
//modified by NIZNHY-PKV Wed Mar 07 08:52:18 2012f
aMFS.Clear();
{
TopExp_Explorer aExp(aSolid, TopAbs_FACE);
while (aExp.More()) {
aMFS.Add(aExp.Current());
aExp.Next();
}
}
//modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t
aMEF.Clear();
TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF);
//
@ -644,10 +653,18 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes()
aItMF.Initialize(aMF);
for (; aItMF.More(); aItMF.Next()) {
const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key()));
if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
//modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f
if (!aMFS.Contains(aF)) {
bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext);
if (bFlag) {
aMFP.Add(aF);
}
}
//if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) {
// aMFP.Add(aF);
//}
//modified by NIZNHY-PKV Wed Mar 07 08:56:07 2012t
}
//
// 2.2 Make Internal Shells
aLSI.Clear();
@ -832,7 +849,7 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell)
//function : RefineShell
//purpose :
//=======================================================================
Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
TopoDS_Shell& aShx)
{

View File

@ -101,6 +101,11 @@ static
const Standard_Integer ,
NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f
static
Standard_Boolean IsClosed(const TopoDS_Edge& ,
const TopoDS_Face& );
//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t
//=======================================================================
//function : FillImagesFaces
@ -307,7 +312,10 @@ void GEOMAlgo_Builder::BuildSplitFaces()
}
//
bIsDegenerated=BRep_Tool::Degenerated(aE);
bIsClosed=BRep_Tool::IsClosed(aE, aF);
//modified by NIZNHY-PKV Wed Mar 07 07:46:09 2012f
bIsClosed=IsClosed(aE, aF);
//bIsClosed=BRep_Tool::IsClosed(aE, aF);
//modified by NIZNHY-PKV Wed Mar 07 07:46:13 2012t
//
const TopTools_ListOfShape& aLIE=myImages.Image(aE);
aIt.Initialize(aLIE);
@ -929,6 +937,35 @@ void UpdateCandidates(const Standard_Integer theNF,
}
}
//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f
//=======================================================================
//function : IsClosed
//purpose :
//=======================================================================
Standard_Boolean IsClosed(const TopoDS_Edge& aE,
const TopoDS_Face& aF)
{
Standard_Boolean bRet;
//
bRet=BRep_Tool::IsClosed(aE, aF);
if (bRet) {
TopTools_MapOfShape aM;
TopExp_Explorer aExp(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape& aEx=aExp.Current();
//
if (aM.Add(aEx)) {
bRet=aEx.IsSame(aE);
if (bRet) {
break;
}
}
}
}
return bRet;
}
//modified by NIZNHY-PKV Thu Feb 16 12:25:25 2012t
/*
{
TopoDS_Compound aCx;