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

0023487: Remove obsolete BRepTools::OuterShell() function

All corresponding calls to BRepTools::OuterShell() replaced by function BRepClass3d::OuterShell()
Changed function BRepClass3d::OuterShell
This commit is contained in:
ilv
2012-11-23 15:01:28 +04:00
parent 66d6976f7a
commit 2f0109b77d
9 changed files with 39 additions and 43 deletions

View File

@@ -60,5 +60,6 @@ is
returns Shell from TopoDS;
---Purpose: Returns the outer most shell of <S>. Returns a Null
-- shell if <S> has no outer shell.
-- If <S> has only one shell, then it will return, without checking orientation.
end BRepClass3d;

View File

@@ -61,8 +61,25 @@ TopoDS_Shell BRepClass3d::OuterShell(const TopoDS_Solid& aSolid)
aTol=1.e-7;
bFound=Standard_False;
//
aIt.Initialize(aSolid);
for (; aIt.More(); aIt.Next()) {
// if solid has one shell, it will return, without checking orientation
Standard_Integer aShellCounter = 0;
for (aIt.Initialize(aSolid); aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
if (aSx.ShapeType()==TopAbs_SHELL) {
aShell=*((TopoDS_Shell*)&aSx);
aShellCounter++;
if (aShellCounter >= 2)
break;
}
}
if (aShellCounter == 0) {
return aDummy;
}
else if (aShellCounter == 1) {
return aShell;
}
//
for (aIt.Initialize(aSolid); aIt.More(); aIt.Next()) {
const TopoDS_Shape& aSx=aIt.Value();
if (aSx.ShapeType()==TopAbs_SHELL) {
aShell=*((TopoDS_Shell*)&aSx);