mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028577: Get rid of the TopOpeBRep* algorithms in TKOffset toolkit
The TKOffset toolkit has been cleared from the usage of the obsolete TopOpeBRep* classes.
This commit is contained in:
@@ -40,12 +40,15 @@
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopOpeBRepTool_BoxSort.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_MapIteratorOfMapOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
//
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BOPCol_BoxBndTree.hxx>
|
||||
#include <NCollection_UBTreeFiller.hxx>
|
||||
//
|
||||
#include <BOPTools_AlgoTools.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@@ -160,40 +163,55 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
|
||||
// Calculate the intersections of offset faces
|
||||
// Distinction of intersection between faces // tangents.
|
||||
//---------------------------------------------------------------
|
||||
TopoDS_Face F2;
|
||||
TopTools_ListIteratorOfListOfShape it;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Construction of bounding boxes
|
||||
//---------------------------------------------------------------
|
||||
TopOpeBRepTool_BoxSort BOS;
|
||||
BRep_Builder B;
|
||||
TopoDS_Compound CompOS;
|
||||
B.MakeCompound(CompOS);
|
||||
|
||||
for (it.Initialize(SetOfFaces); it.More(); it.Next()) {
|
||||
const TopoDS_Shape& OS = it.Value();
|
||||
B.Add(CompOS,OS);
|
||||
// Prepare tools for sorting the bounding boxes
|
||||
BOPCol_BoxBndTree aBBTree;
|
||||
NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
|
||||
//
|
||||
NCollection_IndexedDataMap<TopoDS_Shape, Bnd_Box, TopTools_ShapeMapHasher> aMFaces;
|
||||
// Construct bounding boxes for faces and add them to the tree
|
||||
TopTools_ListIteratorOfListOfShape aItL(SetOfFaces);
|
||||
for (; aItL.More(); aItL.Next()) {
|
||||
const TopoDS_Face& aF = TopoDS::Face(aItL.Value());
|
||||
//
|
||||
// compute bounding box
|
||||
Bnd_Box aBoxF;
|
||||
BRepBndLib::Add(aF, aBoxF);
|
||||
//
|
||||
Standard_Integer i = aMFaces.Add(aF, aBoxF);
|
||||
//
|
||||
aTreeFiller.Add(i, aBoxF);
|
||||
}
|
||||
BOS.AddBoxesMakeCOB(CompOS,TopAbs_FACE);
|
||||
|
||||
//---------------------------
|
||||
// Intersection of faces //
|
||||
//---------------------------
|
||||
for (it.Initialize(SetOfFaces); it.More(); it.Next()) {
|
||||
const TopoDS_Face& F1 = TopoDS::Face(it.Value());
|
||||
TColStd_ListIteratorOfListOfInteger itLI = BOS.Compare(F1);
|
||||
for (; itLI.More(); itLI.Next()) {
|
||||
F2 = TopoDS::Face(BOS.TouchedShape(itLI));
|
||||
FaceInter(F1,F2,InitOffsetFace);
|
||||
//
|
||||
// shake tree filler
|
||||
aTreeFiller.Fill();
|
||||
//
|
||||
// get faces with interfering bounding boxes
|
||||
aItL.Initialize(SetOfFaces);
|
||||
for (; aItL.More(); aItL.Next()) {
|
||||
const TopoDS_Face& aF1 = TopoDS::Face(aItL.Value());
|
||||
const Bnd_Box& aBoxF1 = aMFaces.FindFromKey(aF1);
|
||||
//
|
||||
BOPCol_BoxBndTreeSelector aSelector;
|
||||
aSelector.SetBox(aBoxF1);
|
||||
aBBTree.Select(aSelector);
|
||||
//
|
||||
const BOPCol_ListOfInteger& aLI = aSelector.Indices();
|
||||
BOPCol_ListIteratorOfListOfInteger aItLI(aLI);
|
||||
for (; aItLI.More(); aItLI.Next()) {
|
||||
Standard_Integer i = aItLI.Value();
|
||||
const TopoDS_Face& aF2 = TopoDS::Face(aMFaces.FindKey(i));
|
||||
//
|
||||
// intersect faces
|
||||
FaceInter(aF1, aF2, InitOffsetFace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : CompletInt
|
||||
//purpose :
|
||||
//function : FaceInter
|
||||
//purpose : Performs intersection of the given faces
|
||||
//=======================================================================
|
||||
|
||||
void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
#include <BRepAdaptor_HCurve.hxx>
|
||||
@@ -113,14 +114,6 @@
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopOpeBRep_DSFiller.hxx>
|
||||
#include <TopOpeBRep_FacesFiller.hxx>
|
||||
#include <TopOpeBRep_GeomTool.hxx>
|
||||
#include <TopOpeBRep_ShapeIntersector.hxx>
|
||||
#include <TopOpeBRepBuild_Builder.hxx>
|
||||
#include <TopOpeBRepDS_CurveExplorer.hxx>
|
||||
#include <TopOpeBRepDS_HDataStructure.hxx>
|
||||
#include <TopOpeBRepTool_GeomTool.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
|
Reference in New Issue
Block a user