if (IsClosedShell(aShell)) {
myLoops.Append(aShell);
}
- //modified by NIZNHY-PKV Wed Oct 27 07:10:41 2010f
else {
Standard_Boolean bRefine;
TopoDS_Shell aShx;
myLoops.Append(aShx);
}
}
- //modified by NIZNHY-PKV Wed Oct 27 07:10:44 2010t
} // for (; aItF.More(); aItF.Next()) {
//
// Post Treatment
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;
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);
//
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)) {
- aMFP.Add(aF);
+ //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
//function : RefineShell
//purpose :
//=======================================================================
- Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
- TopoDS_Shell& aShx)
+Standard_Boolean RefineShell(const TopoDS_Shell& aShell,
+ TopoDS_Shell& aShx)
{
Standard_Boolean bRet;
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
}
//
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);
}
}
+//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;