All corresponding calls to BRepTools::OuterShell() replaced by function BRepClass3d::OuterShell()
Changed function BRepClass3d::OuterShell
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;
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);
-- * OuterWire : A method to find the outer wire of a
-- face.
--
- -- * OuterShell : A method to find the outer shell of
- -- a solid.
- --
-- * Map3DEdges : A method to map all the 3D Edges of
-- a Shape.
--
---Purpose: Returns the outer most wire of <F>. Returns a Null
-- 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;
M : in out IndexedMapOfShape from TopTools);
---Purpose: Stores in the map <M> all the 3D topology edges
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
//purpose :
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
+#include <BRepClass3d.hxx>
#include <BRepClass3d_SolidExplorer.hxx>
#include <TopOpeBRepTool_EXPORT.hxx>
#include <TopOpeBRepTool_SC.hxx>
//modified by NIZHNY-MKK Fri May 19 16:47:23 2000.END
sol1 = TopoDS::Solid(exsol1.Current());
ChangeMerged(sol1,myState1);
- outsha1 = BRepTools::OuterShell(sol1);
+ outsha1 = BRepClass3d::OuterShell(sol1);
sol2 = TopoDS::Solid(exsol2.Current());
ChangeMerged(sol2,myState2);
- outsha2 = BRepTools::OuterShell(sol2);
+ outsha2 = BRepClass3d::OuterShell(sol2);
TopAbs_State stsol1 = KPclasSS(outsha1,sol2);
TopAbs_State stsol2 = KPclasSS(outsha2,sol1);
TopoDS_Shell outsha;
Standard_Integer icla;
TopoDS_Solid othersol;
- TopoDS_Shell outsha1 = BRepTools::OuterShell(sol1);
- TopoDS_Shell outsha2 = BRepTools::OuterShell(sol2);
+ TopoDS_Shell outsha1 = BRepClass3d::OuterShell(sol1);
+ TopoDS_Shell outsha2 = BRepClass3d::OuterShell(sol2);
TopoDS_Solid newsol;
continue;
}
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 stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
if(localshape1.ShapeType()!=TopAbs_SOLID)
return Standard_False;
sol1 = TopoDS::Solid(localshape1);
- outsha1 = BRepTools::OuterShell(sol1);
+ outsha1 = BRepClass3d::OuterShell(sol1);
for(Standard_Integer j=1; j<=aMapOfSeparatedSolid2.Extent(); j++) {
const TopoDS_Shape& localshape2 = aMapOfSeparatedSolid2(j);
return Standard_False;
sol2 = TopoDS::Solid(localshape2);
- outsha2 = BRepTools::OuterShell(sol2);
+ outsha2 = BRepClass3d::OuterShell(sol2);
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,sol1);
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
if(localshape2.ShapeType()!=TopAbs_SOLID)
return Standard_False;
sol2 = TopoDS::Solid(localshape2);
- outsha2 = BRepTools::OuterShell(sol2);
- outsha1 = BRepTools::OuterShell(acurrentsolid);
+ outsha2 = BRepClass3d::OuterShell(sol2);
+ outsha1 = BRepClass3d::OuterShell(acurrentsolid);
TopAbs_State stsol1 = aShapeClassifier.StateShapeShape(outsha1,Snull,sol2);
TopAbs_State stsol2 = aShapeClassifier.StateShapeShape(outsha2,Snull,acurrentsolid);
Standard_Integer ires=RESUNDEF, icla1=SHEUNDEF, icla2=SHEUNDEF;
#include <TopoDS_Shell.hxx>
#include <TopoDS.hxx>
#include <TColStd_SequenceOfTransient.hxx>
-#include <BRepTools.hxx>
+#include <BRepClass3d.hxx>
#include <StdFail_NotDone.hxx>
#include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx>
Handle(StepShape_OrientedClosedShell) aOCShell;
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
- aOutShell = BRepTools::OuterShell(aSolid);
+ aOutShell = BRepClass3d::OuterShell(aSolid);
TopoDSToStep_Builder StepB;
TopoDSToStep_Tool aTool;
#include <TopoDSToStep_Builder.hxx>
#include <TopoDSToStep_Tool.hxx>
#include <TopoDS_Iterator.hxx>
-#include <BRepTools.hxx>
+#include <BRepClass3d.hxx>
#include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx>
#include <TCollection_HAsciiString.hxx>
done = Standard_False;
// Looking for the Outer Shell
- TopoDS_Shell aOuterShell = BRepTools::OuterShell(aSolid);
+ TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid);
if (!aOuterShell.IsNull()) {
if (aOuterShell.Closed()) {
#include <TopoDS_Shell.hxx>
#include <TopoDS.hxx>
#include <TColStd_SequenceOfTransient.hxx>
-#include <BRepTools.hxx>
+#include <BRepClass3d.hxx>
#include <StdFail_NotDone.hxx>
#include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx>
Handle(StepShape_OrientedClosedShell) aOCShell;
Handle(StepShape_HArray1OfOrientedClosedShell) aVoids;
- aOutShell = BRepTools::OuterShell(aSolid);
+ aOutShell = BRepClass3d::OuterShell(aSolid);
TopoDSToStep_Builder StepB;
TopoDSToStep_Tool aTool;
#include <TopoDSToStep.hxx>
#include <TopoDSToStep_Builder.hxx>
#include <TopoDSToStep_Tool.hxx>
-#include <BRepTools.hxx>
+#include <BRepClass3d.hxx>
#include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx>
#include <TCollection_HAsciiString.hxx>
TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& aSolid,
const Handle(Transfer_FinderProcess)& FP)
{
- TopoDS_Shell aOuterShell = BRepTools::OuterShell(aSolid);
+ TopoDS_Shell aOuterShell = BRepClass3d::OuterShell(aSolid);
if (!aOuterShell.IsNull()) {
theManifoldSolidBrep = MakeManifoldSolidBrep(aOuterShell, FP);