mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +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:
parent
66d6976f7a
commit
2f0109b77d
@ -60,5 +60,6 @@ is
|
|||||||
returns Shell from TopoDS;
|
returns Shell from TopoDS;
|
||||||
---Purpose: Returns the outer most shell of <S>. Returns a Null
|
---Purpose: Returns the outer most shell of <S>. Returns a Null
|
||||||
-- shell if <S> has no outer shell.
|
-- shell if <S> has no outer shell.
|
||||||
|
-- If <S> has only one shell, then it will return, without checking orientation.
|
||||||
|
|
||||||
end BRepClass3d;
|
end BRepClass3d;
|
||||||
|
@ -61,8 +61,25 @@ TopoDS_Shell BRepClass3d::OuterShell(const TopoDS_Solid& aSolid)
|
|||||||
aTol=1.e-7;
|
aTol=1.e-7;
|
||||||
bFound=Standard_False;
|
bFound=Standard_False;
|
||||||
//
|
//
|
||||||
aIt.Initialize(aSolid);
|
// if solid has one shell, it will return, without checking orientation
|
||||||
for (; aIt.More(); aIt.Next()) {
|
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();
|
const TopoDS_Shape& aSx=aIt.Value();
|
||||||
if (aSx.ShapeType()==TopAbs_SHELL) {
|
if (aSx.ShapeType()==TopAbs_SHELL) {
|
||||||
aShell=*((TopoDS_Shell*)&aSx);
|
aShell=*((TopoDS_Shell*)&aSx);
|
||||||
|
@ -53,9 +53,6 @@ package BRepTools
|
|||||||
-- * OuterWire : A method to find the outer wire of a
|
-- * OuterWire : A method to find the outer wire of a
|
||||||
-- face.
|
-- face.
|
||||||
--
|
--
|
||||||
-- * OuterShell : A method to find the outer shell of
|
|
||||||
-- a solid.
|
|
||||||
--
|
|
||||||
-- * Map3DEdges : A method to map all the 3D Edges of
|
-- * Map3DEdges : A method to map all the 3D Edges of
|
||||||
-- a Shape.
|
-- a Shape.
|
||||||
--
|
--
|
||||||
@ -234,10 +231,6 @@ is
|
|||||||
---Purpose: Returns the outer most wire of <F>. Returns a Null
|
---Purpose: Returns the outer most wire of <F>. Returns a Null
|
||||||
-- wire if <F> has no wires.
|
-- wire if <F> has no wires.
|
||||||
|
|
||||||
OuterShell(S : Solid from TopoDS) returns Shell from TopoDS;
|
|
||||||
---Purpose: Returns the outer most shell of <S>. Returns a Null
|
|
||||||
-- wire if <S> has no shells.
|
|
||||||
|
|
||||||
Map3DEdges(S : Shape from TopoDS;
|
Map3DEdges(S : Shape from TopoDS;
|
||||||
M : in out IndexedMapOfShape from TopTools);
|
M : in out IndexedMapOfShape from TopTools);
|
||||||
---Purpose: Stores in the map <M> all the 3D topology edges
|
---Purpose: Stores in the map <M> all the 3D topology edges
|
||||||
|
@ -586,22 +586,6 @@ TopoDS_Wire BRepTools::OuterWire(const TopoDS_Face& F)
|
|||||||
return Wres;
|
return Wres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : OuterShell
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
TopoDS_Shell BRepTools::OuterShell(const TopoDS_Solid& S)
|
|
||||||
{
|
|
||||||
TopExp_Explorer its(S,TopAbs_SHELL);
|
|
||||||
if (its.More())
|
|
||||||
return TopoDS::Shell(its.Current());
|
|
||||||
else
|
|
||||||
return TopoDS_Shell();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Map3DEdges
|
//function : Map3DEdges
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
|
#include <BRepClass3d.hxx>
|
||||||
#include <BRepClass3d_SolidExplorer.hxx>
|
#include <BRepClass3d_SolidExplorer.hxx>
|
||||||
#include <TopOpeBRepTool_EXPORT.hxx>
|
#include <TopOpeBRepTool_EXPORT.hxx>
|
||||||
#include <TopOpeBRepTool_SC.hxx>
|
#include <TopOpeBRepTool_SC.hxx>
|
||||||
@ -738,11 +739,11 @@ void TopOpeBRepBuild_Builder::MergeKPartisdisj()
|
|||||||
//modified by NIZHNY-MKK Fri May 19 16:47:23 2000.END
|
//modified by NIZHNY-MKK Fri May 19 16:47:23 2000.END
|
||||||
sol1 = TopoDS::Solid(exsol1.Current());
|
sol1 = TopoDS::Solid(exsol1.Current());
|
||||||
ChangeMerged(sol1,myState1);
|
ChangeMerged(sol1,myState1);
|
||||||
outsha1 = BRepTools::OuterShell(sol1);
|
outsha1 = BRepClass3d::OuterShell(sol1);
|
||||||
|
|
||||||
sol2 = TopoDS::Solid(exsol2.Current());
|
sol2 = TopoDS::Solid(exsol2.Current());
|
||||||
ChangeMerged(sol2,myState2);
|
ChangeMerged(sol2,myState2);
|
||||||
outsha2 = BRepTools::OuterShell(sol2);
|
outsha2 = BRepClass3d::OuterShell(sol2);
|
||||||
|
|
||||||
TopAbs_State stsol1 = KPclasSS(outsha1,sol2);
|
TopAbs_State stsol1 = KPclasSS(outsha1,sol2);
|
||||||
TopAbs_State stsol2 = KPclasSS(outsha2,sol1);
|
TopAbs_State stsol2 = KPclasSS(outsha2,sol1);
|
||||||
@ -1909,8 +1910,8 @@ static TopoDS_Solid BuildNewSolid(const TopoDS_Solid& sol1,
|
|||||||
TopoDS_Shell outsha;
|
TopoDS_Shell outsha;
|
||||||
Standard_Integer icla;
|
Standard_Integer icla;
|
||||||
TopoDS_Solid othersol;
|
TopoDS_Solid othersol;
|
||||||
TopoDS_Shell outsha1 = BRepTools::OuterShell(sol1);
|
TopoDS_Shell outsha1 = BRepClass3d::OuterShell(sol1);
|
||||||
TopoDS_Shell outsha2 = BRepTools::OuterShell(sol2);
|
TopoDS_Shell outsha2 = BRepClass3d::OuterShell(sol2);
|
||||||
|
|
||||||
|
|
||||||
TopoDS_Solid newsol;
|
TopoDS_Solid newsol;
|
||||||
@ -2057,9 +2058,9 @@ static Standard_Boolean disjPerformFuse(const TopTools_IndexedMapOfShape& theMap
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
sol2 = TopoDS::Solid(localshape2);
|
sol2 = TopoDS::Solid(localshape2);
|
||||||
outsha2 = BRepTools::OuterShell(sol2);
|
outsha2 = BRepClass3d::OuterShell(sol2);
|
||||||
|
|
||||||
outsha1 = BRepTools::OuterShell(acurrentsolid);
|
outsha1 = BRepClass3d::OuterShell(acurrentsolid);
|
||||||
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
||||||
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
|
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
|
||||||
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
||||||
@ -2114,7 +2115,7 @@ static Standard_Boolean disjPerformCommon(const TopTools_IndexedMapOfShape& theM
|
|||||||
if(localshape1.ShapeType()!=TopAbs_SOLID)
|
if(localshape1.ShapeType()!=TopAbs_SOLID)
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
sol1 = TopoDS::Solid(localshape1);
|
sol1 = TopoDS::Solid(localshape1);
|
||||||
outsha1 = BRepTools::OuterShell(sol1);
|
outsha1 = BRepClass3d::OuterShell(sol1);
|
||||||
|
|
||||||
for(Standard_Integer j=1; j<=aMapOfSeparatedSolid2.Extent(); j++) {
|
for(Standard_Integer j=1; j<=aMapOfSeparatedSolid2.Extent(); j++) {
|
||||||
const TopoDS_Shape& localshape2 = aMapOfSeparatedSolid2(j);
|
const TopoDS_Shape& localshape2 = aMapOfSeparatedSolid2(j);
|
||||||
@ -2122,7 +2123,7 @@ static Standard_Boolean disjPerformCommon(const TopTools_IndexedMapOfShape& theM
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
|
||||||
sol2 = TopoDS::Solid(localshape2);
|
sol2 = TopoDS::Solid(localshape2);
|
||||||
outsha2 = BRepTools::OuterShell(sol2);
|
outsha2 = BRepClass3d::OuterShell(sol2);
|
||||||
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
||||||
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,sol1);
|
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,sol1);
|
||||||
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
||||||
@ -2201,8 +2202,8 @@ static Standard_Boolean disjPerformCut(const TopTools_IndexedMapOfShape& theMapO
|
|||||||
if(localshape2.ShapeType()!=TopAbs_SOLID)
|
if(localshape2.ShapeType()!=TopAbs_SOLID)
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
sol2 = TopoDS::Solid(localshape2);
|
sol2 = TopoDS::Solid(localshape2);
|
||||||
outsha2 = BRepTools::OuterShell(sol2);
|
outsha2 = BRepClass3d::OuterShell(sol2);
|
||||||
outsha1 = BRepTools::OuterShell(acurrentsolid);
|
outsha1 = BRepClass3d::OuterShell(acurrentsolid);
|
||||||
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
|
||||||
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
|
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
|
||||||
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <TopoDS_Shell.hxx>
|
#include <TopoDS_Shell.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TColStd_SequenceOfTransient.hxx>
|
#include <TColStd_SequenceOfTransient.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepClass3d.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
@ -63,7 +63,7 @@ TopoDSToStep_MakeBrepWithVoids::
|
|||||||
Handle(StepShape_OrientedClosedShell) aOCShell;
|
Handle(StepShape_OrientedClosedShell) aOCShell;
|
||||||
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
||||||
|
|
||||||
aOutShell = BRepTools::OuterShell(aSolid);
|
aOutShell = BRepClass3d::OuterShell(aSolid);
|
||||||
|
|
||||||
TopoDSToStep_Builder StepB;
|
TopoDSToStep_Builder StepB;
|
||||||
TopoDSToStep_Tool aTool;
|
TopoDSToStep_Tool aTool;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <TopoDSToStep_Builder.hxx>
|
#include <TopoDSToStep_Builder.hxx>
|
||||||
#include <TopoDSToStep_Tool.hxx>
|
#include <TopoDSToStep_Tool.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepClass3d.hxx>
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
#include <TCollection_HAsciiString.hxx>
|
#include <TCollection_HAsciiString.hxx>
|
||||||
@ -85,7 +85,7 @@ TopoDSToStep_MakeFacetedBrep::
|
|||||||
done = Standard_False;
|
done = Standard_False;
|
||||||
|
|
||||||
// Looking for the Outer Shell
|
// Looking for the Outer Shell
|
||||||
TopoDS_Shell aOuterShell = BRepTools::OuterShell(aSolid);
|
TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid);
|
||||||
|
|
||||||
if (!aOuterShell.IsNull()) {
|
if (!aOuterShell.IsNull()) {
|
||||||
if (aOuterShell.Closed()) {
|
if (aOuterShell.Closed()) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <TopoDS_Shell.hxx>
|
#include <TopoDS_Shell.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TColStd_SequenceOfTransient.hxx>
|
#include <TColStd_SequenceOfTransient.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepClass3d.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
@ -59,7 +59,7 @@ TopoDSToStep_MakeFacetedBrepAndBrepWithVoids::
|
|||||||
Handle(StepShape_OrientedClosedShell) aOCShell;
|
Handle(StepShape_OrientedClosedShell) aOCShell;
|
||||||
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
|
||||||
|
|
||||||
aOutShell = BRepTools::OuterShell(aSolid);
|
aOutShell = BRepClass3d::OuterShell(aSolid);
|
||||||
|
|
||||||
TopoDSToStep_Builder StepB;
|
TopoDSToStep_Builder StepB;
|
||||||
TopoDSToStep_Tool aTool;
|
TopoDSToStep_Tool aTool;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <TopoDSToStep.hxx>
|
#include <TopoDSToStep.hxx>
|
||||||
#include <TopoDSToStep_Builder.hxx>
|
#include <TopoDSToStep_Builder.hxx>
|
||||||
#include <TopoDSToStep_Tool.hxx>
|
#include <TopoDSToStep_Tool.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepClass3d.hxx>
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
#include <TCollection_HAsciiString.hxx>
|
#include <TCollection_HAsciiString.hxx>
|
||||||
@ -89,7 +89,7 @@ TopoDSToStep_MakeManifoldSolidBrep::
|
|||||||
TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& aSolid,
|
TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& aSolid,
|
||||||
const Handle(Transfer_FinderProcess)& FP)
|
const Handle(Transfer_FinderProcess)& FP)
|
||||||
{
|
{
|
||||||
TopoDS_Shell aOuterShell = BRepTools::OuterShell(aSolid);
|
TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid);
|
||||||
if (!aOuterShell.IsNull()) {
|
if (!aOuterShell.IsNull()) {
|
||||||
|
|
||||||
theManifoldSolidBrep = MakeManifoldSolidBrep(aOuterShell, FP);
|
theManifoldSolidBrep = MakeManifoldSolidBrep(aOuterShell, FP);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user