mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028576: Get rid of the TopOpeBRep* algorithms in TKFeat toolkit
The TKFeat toolkit has been cleared from the usage of TopOpeBRep* classes.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAlgo.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
#include <BRepAlgoAPI_Cut.hxx>
|
||||
@@ -50,7 +51,6 @@
|
||||
#include <TopoDS_Compound.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopOpeBRepBuild_HBuilder.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
@@ -1270,90 +1270,6 @@ static void Descendants(const TopoDS_Shape& S,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateDescendants
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepFeat_Form::UpdateDescendants(const Handle(TopOpeBRepBuild_HBuilder)& B,
|
||||
const TopoDS_Shape& S,
|
||||
const Standard_Boolean SkipFace)
|
||||
{
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdm;
|
||||
TopTools_ListIteratorOfListOfShape it,it2;
|
||||
TopTools_MapIteratorOfMapOfShape itm;
|
||||
TopExp_Explorer exp;
|
||||
|
||||
for (itdm.Initialize(myMap);itdm.More();itdm.Next()) {
|
||||
const TopoDS_Shape& orig = itdm.Key();
|
||||
if (SkipFace && orig.ShapeType() == TopAbs_FACE) {
|
||||
continue;
|
||||
}
|
||||
TopTools_MapOfShape newdsc;
|
||||
|
||||
if (itdm.Value().IsEmpty()) {myMap.ChangeFind(orig).Append(orig);}
|
||||
|
||||
for (it.Initialize(itdm.Value());it.More();it.Next()) {
|
||||
const TopoDS_Shape& sh = it.Value();
|
||||
if(sh.ShapeType() != TopAbs_FACE) continue;
|
||||
const TopoDS_Face& fdsc = TopoDS::Face(it.Value());
|
||||
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
|
||||
if (exp.Current().IsSame(fdsc)) { // preserved
|
||||
newdsc.Add(fdsc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!exp.More()) {
|
||||
if (B->IsSplit(fdsc, TopAbs_OUT)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_OUT));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsSplit(fdsc, TopAbs_IN)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_IN));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsSplit(fdsc, TopAbs_ON)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_ON));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_OUT)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_OUT));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_IN)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_IN));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_ON)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_ON));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
myMap.ChangeFind(orig).Clear();
|
||||
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
|
||||
// check the appartenance to the shape...
|
||||
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
|
||||
if (exp.Current().IsSame(itm.Key())) {
|
||||
// const TopoDS_Shape& sh = itm.Key();
|
||||
myMap.ChangeFind(orig).Append(itm.Key());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : UpdateDescendants
|
||||
//purpose :
|
||||
|
@@ -36,7 +36,6 @@ class TopoDS_Shape;
|
||||
class Geom_Curve;
|
||||
class LocOpe_Gluer;
|
||||
class BRepAlgoAPI_BooleanOperation;
|
||||
class TopOpeBRepBuild_HBuilder;
|
||||
|
||||
|
||||
//! Provides general functions to build form features.
|
||||
@@ -158,8 +157,6 @@ protected:
|
||||
|
||||
Standard_EXPORT void UpdateDescendants (const BRepAlgoAPI_BooleanOperation& aBOP, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False);
|
||||
|
||||
Standard_EXPORT void UpdateDescendants (const Handle(TopOpeBRepBuild_HBuilder)& B, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False);
|
||||
|
||||
Standard_EXPORT Standard_Boolean TransformShapeFU (const Standard_Integer flag);
|
||||
|
||||
|
||||
|
@@ -71,7 +71,6 @@
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopOpeBRepBuild_HBuilder.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
@@ -85,7 +85,6 @@
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopOpeBRepBuild_HBuilder.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAlgo.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
@@ -73,7 +74,6 @@
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopOpeBRepBuild_HBuilder.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
@@ -358,88 +358,6 @@ void BRepFeat_RibSlot::UpdateDescendants(const LocOpe_Gluer& G)
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateDescendants
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepFeat_RibSlot::UpdateDescendants (const Handle(TopOpeBRepBuild_HBuilder)& B,
|
||||
const TopoDS_Shape& S,
|
||||
const Standard_Boolean SkipFace)
|
||||
{
|
||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdm;
|
||||
TopTools_ListIteratorOfListOfShape it,it2;
|
||||
TopTools_MapIteratorOfMapOfShape itm;
|
||||
TopExp_Explorer exp;
|
||||
|
||||
for (itdm.Initialize(myMap);itdm.More();itdm.Next()) {
|
||||
const TopoDS_Shape& orig = itdm.Key();
|
||||
if (SkipFace && orig.ShapeType() == TopAbs_FACE) {
|
||||
continue;
|
||||
}
|
||||
TopTools_MapOfShape newdsc;
|
||||
for (it.Initialize(itdm.Value());it.More();it.Next()) {
|
||||
const TopoDS_Shape& sh = it.Value();
|
||||
if(sh.ShapeType() != TopAbs_FACE) continue;
|
||||
const TopoDS_Face& fdsc = TopoDS::Face(it.Value());
|
||||
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
|
||||
if (exp.Current().IsSame(fdsc)) { // preserved
|
||||
newdsc.Add(fdsc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!exp.More()) {
|
||||
if (B->IsSplit(fdsc, TopAbs_OUT)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_OUT));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsSplit(fdsc, TopAbs_IN)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_IN));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsSplit(fdsc, TopAbs_ON)) {
|
||||
for (it2.Initialize(B->Splits(fdsc,TopAbs_ON));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_OUT)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_OUT));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_IN)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_IN));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
if (B->IsMerged(fdsc, TopAbs_ON)) {
|
||||
for (it2.Initialize(B->Merged(fdsc,TopAbs_ON));
|
||||
it2.More();it2.Next()) {
|
||||
newdsc.Add(it2.Value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
myMap.ChangeFind(orig).Clear();
|
||||
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
|
||||
// check the belonging to the shape...
|
||||
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
|
||||
if (exp.Current().IsSame(itm.Key())) {
|
||||
myMap.ChangeFind(orig).Append(itm.Key());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : FirstShape
|
||||
|
@@ -43,7 +43,6 @@ class TopoDS_Face;
|
||||
class Geom_Curve;
|
||||
class TopoDS_Vertex;
|
||||
class LocOpe_Gluer;
|
||||
class TopOpeBRepBuild_HBuilder;
|
||||
class BRepAlgoAPI_BooleanOperation;
|
||||
|
||||
|
||||
@@ -146,8 +145,6 @@ protected:
|
||||
//! and deleted faces during the course of the glueing operation.
|
||||
Standard_EXPORT void UpdateDescendants (const LocOpe_Gluer& G);
|
||||
|
||||
Standard_EXPORT void UpdateDescendants (const Handle(TopOpeBRepBuild_HBuilder)& B, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False);
|
||||
|
||||
Standard_EXPORT void UpdateDescendants (const BRepAlgoAPI_BooleanOperation& aBOP, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user