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:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user