-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// File: GEOMAlgo_RemoverWebs.cxx
// Created: Thu Mar 28 07:40:32 2013
// Author: Peter KURNEV
-// <pkv@irinox>
-//
+
#include <GEOMAlgo_RemoverWebs.hxx>
+#include <GEOMAlgo_ShapeAlgo.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
#include <BRep_Builder.hxx>
-#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-
#include <TopExp.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
-#include <IntTools_Context.hxx>
+#include <BOPInt_Context.hxx>
-#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <GEOMAlgo_BuilderSolid.hxx>
-#include <GEOMAlgo_Tools3D.hxx>
+#include <BOPAlgo_BuilderSolid.hxx>
+#include <BOPTools.hxx>
+#include <BOPTools_AlgoTools.hxx>
//=======================================================================
//function :
if (!myContext.IsNull()) {
myContext.Nullify();
}
- myContext=new IntTools_Context;
+ myContext=new BOPInt_Context;
//
BuildSolid();
//
TopAbs_Orientation aOr;
TopoDS_Iterator aIt1, aIt2;
BRep_Builder aBB;
- TopTools_IndexedMapOfShape aMSI;
- TopTools_IndexedDataMapOfShapeListOfShape aMFS;
- TopTools_ListOfShape aSFS;
- TopTools_ListIteratorOfListOfShape aItLS;
- GEOMAlgo_BuilderSolid aSB;
+ BOPCol_IndexedMapOfShape aMSI;
+ BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
+ BOPCol_ListOfShape aSFS;
+ BOPCol_ListIteratorOfListOfShape aItLS;
+ BOPAlgo_BuilderSolid aSB;
//
aNbF2=0;
//
// 1. aSFS: Faces
- TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
+ BOPTools::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
//
aNbF=aMFS.Extent();
for (i=1; i<=aNbF; ++i) {
aSFS.Append(aFi);
}
else {
- const TopTools_ListOfShape& aLSx=aMFS(i);
+ const BOPCol_ListOfShape& aLSx=aMFS(i);
aNbSx=aLSx.Extent();
if (aNbSx==1) {
- aSFS.Append(aFx);
+ aSFS.Append(aFx);
}
else if (aNbSx==2) {
- ++aNbF2;
+ ++aNbF2;
}
}
}
for (; aIt2.More(); aIt2.Next()) {
const TopoDS_Shape& aSi=aIt2.Value();
if (aSi.ShapeType()!=TopAbs_SHELL) {
- aOr=aSi.Orientation();
- if (aOr==TopAbs_INTERNAL) {
- aMSI.Add(aSi);
- }
+ aOr=aSi.Orientation();
+ if (aOr==TopAbs_INTERNAL) {
+ aMSI.Add(aSi);
+ }
}
}
}
aNbSI=aMSI.Extent();
//
// 3 Solids without internals
- GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, myResult);
+ BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, myResult);
//
aSB.SetContext(myContext);
aSB.SetShapes(aSFS);
return;
}
//
- const TopTools_ListOfShape& aLSR=aSB.Areas();
+ const BOPCol_ListOfShape& aLSR=aSB.Areas();
//
// 4 Add the internals
if (aNbSI) {
//function : AddInternalShapes
//purpose :
//=======================================================================
-void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
- const TopTools_IndexedMapOfShape& aMSI)
+void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
+ const BOPCol_IndexedMapOfShape& aMSI)
{
Standard_Integer i, aNbSI;
TopAbs_State aState;
TopoDS_Solid aSd;
BRep_Builder aBB;
- TopTools_ListIteratorOfListOfShape aItLS;
- Handle(IntTools_Context) aCtx;
+ BOPCol_ListIteratorOfListOfShape aItLS;
+ Handle(BOPInt_Context) aCtx;
//
- aCtx=new IntTools_Context;
+ aCtx=new BOPInt_Context;
//
aNbSI=aMSI.Extent();
for (i=1; i<=aNbSI; ++i) {
for (; aItLS.More(); aItLS.Next()) {
aSd=*((TopoDS_Solid*)&aItLS.Value());
//
- aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
+ aState=BOPTools_AlgoTools::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx);
if (aState==TopAbs_IN) {
- aBB.Add(aSd, aSI);
- //
- BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd);
- aSC.Load(aSd);
+ aBB.Add(aSd, aSI);
+ //
+ BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSd);
+ aSC.Load(aSd);
}
}
}
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// File: GEOMAlgo_RemoverWebs.hxx
// Created: Thu Mar 28 08:02:59 2013
// Author: Peter KURNEV
-// <pkv@petrex>
-//
+
// The algorithm is intended to build result [solid(s)]
// from given set of solids [argument].
// The result cosists of:
#include <Standard_Macro.hxx>
//
#include <GEOMAlgo_ShapeAlgo.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
+#include <BOPCol_ListOfShape.hxx>
+#include <BOPCol_IndexedMapOfShape.hxx>
//=======================================================================
//function : GEOMAlgo_RemoverWebs
void BuildSolid() ;
Standard_EXPORT
- static void AddInternalShapes(const TopTools_ListOfShape& ,
- const TopTools_IndexedMapOfShape& );
+ static void AddInternalShapes(const BOPCol_ListOfShape& ,
+ const BOPCol_IndexedMapOfShape& );
//
};