From f1b2eddc0f7406ccd9d17147468ffc17fe55a791 Mon Sep 17 00:00:00 2001 From: emv Date: Mon, 20 Mar 2017 16:54:37 +0300 Subject: [PATCH] 0028576: Get rid of the TopOpeBRep* algorithms in TKFeat toolkit The TKFeat toolkit has been cleared from the usage of TopOpeBRep* classes. --- dox/dev_guides/upgrade/upgrade.md | 3 +- src/BRepFeat/BRepFeat_Form.cxx | 86 +------------------- src/BRepFeat/BRepFeat_Form.hxx | 3 - src/BRepFeat/BRepFeat_MakeLinearForm.cxx | 1 - src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx | 1 - src/BRepFeat/BRepFeat_RibSlot.cxx | 84 +------------------ src/BRepFeat/BRepFeat_RibSlot.hxx | 3 - src/LocOpe/FILES | 3 - src/LocOpe/LocOpe.hxx | 2 - src/LocOpe/LocOpe_HBuilder.cxx | 22 ----- src/LocOpe/LocOpe_HBuilder.hxx | 68 ---------------- src/LocOpe/LocOpe_HBuilder.lxx | 50 ------------ src/TopTrans/TopTrans_SurfaceTransition.cxx | 1 - 13 files changed, 4 insertions(+), 323 deletions(-) delete mode 100644 src/LocOpe/LocOpe_HBuilder.cxx delete mode 100644 src/LocOpe/LocOpe_HBuilder.hxx delete mode 100644 src/LocOpe/LocOpe_HBuilder.lxx diff --git a/dox/dev_guides/upgrade/upgrade.md b/dox/dev_guides/upgrade/upgrade.md index f5418fc8a4..7be91788cc 100644 --- a/dox/dev_guides/upgrade/upgrade.md +++ b/dox/dev_guides/upgrade/upgrade.md @@ -1098,7 +1098,6 @@ The following obsolete features have been removed: Text resolution can be managed by rendering parameter *Graphic3d_RenderingParams::Resolution*, returned by *V3d_View::ChangeRenderingParams()*. * Methods *PrsMgr_PresentationManager::BoundBox*, *PrsMgr_PresentationManager::Hilight* and *SelectMgr_EntityOwner::Hilight* have been removed as not used. The corresponding method in custom implementations of *SelectMgr_EntityOwner* can be removed safely. *PrsMgr_PresentationManager::Color* with the corresponding style must be used instead. * Class *NCollection_QuickSort* has been removed. The code that used the tools provided by that class should be corrected manually. The recommended approach is to use sorting algorithms provided by STL (std::sort). See also @ref upgrade_occt700_sorttools above. -* The class *QANewBRepNaming_BooleanOperationFeat* has been removed. The class *QANewBRepNaming_BooleanOperation* should be used instead. * Package *Dico*. The code that used the tools provided by that package should be corrected manually. The recommended approach is to use *NCollection_DataMap* and *NCollection_IndexedDataMap* classes. @@ -1125,6 +1124,8 @@ The following obsolete features have been removed: These properties were unused, and therefore application should remove occurrences of these methods. * *AIS_InteractiveObject::SelectionPriority()*. These property was not implemented. +* The class *LocOpe_HBuilder* has been removed as obsolete. +* The class *QANewBRepNaming_BooleanOperationFeat* has been removed. The class *QANewBRepNaming_BooleanOperation* should be used instead. @subsection upgrade_occt720_correction_of_Offset_API Corrections in BRepOffset API diff --git a/src/BRepFeat/BRepFeat_Form.cxx b/src/BRepFeat/BRepFeat_Form.cxx index 604ffb805e..bfea093c05 100644 --- a/src/BRepFeat/BRepFeat_Form.cxx +++ b/src/BRepFeat/BRepFeat_Form.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -50,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -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 : diff --git a/src/BRepFeat/BRepFeat_Form.hxx b/src/BRepFeat/BRepFeat_Form.hxx index 5f8c08fefb..0fd741d6e4 100644 --- a/src/BRepFeat/BRepFeat_Form.hxx +++ b/src/BRepFeat/BRepFeat_Form.hxx @@ -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); diff --git a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx index 143cb58fe2..8c7468d26e 100644 --- a/src/BRepFeat/BRepFeat_MakeLinearForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeLinearForm.cxx @@ -71,7 +71,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx index 7549555350..c0b7e470aa 100644 --- a/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx +++ b/src/BRepFeat/BRepFeat_MakeRevolutionForm.cxx @@ -85,7 +85,6 @@ #include #include #include -#include #include #include #include diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 786e0f9608..0ac9d16750 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -73,7 +74,6 @@ #include #include #include -#include #include #include #include @@ -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 diff --git a/src/BRepFeat/BRepFeat_RibSlot.hxx b/src/BRepFeat/BRepFeat_RibSlot.hxx index 2f970e2996..33036ebb18 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.hxx +++ b/src/BRepFeat/BRepFeat_RibSlot.hxx @@ -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); diff --git a/src/LocOpe/FILES b/src/LocOpe/FILES index 0fe8ca4d97..ff2da377dc 100644 --- a/src/LocOpe/FILES +++ b/src/LocOpe/FILES @@ -31,9 +31,6 @@ LocOpe_GluedShape.hxx LocOpe_Gluer.cxx LocOpe_Gluer.hxx LocOpe_Gluer.lxx -LocOpe_HBuilder.cxx -LocOpe_HBuilder.hxx -LocOpe_HBuilder.lxx LocOpe_LinearForm.cxx LocOpe_LinearForm.hxx LocOpe_LinearForm.lxx diff --git a/src/LocOpe/LocOpe.hxx b/src/LocOpe/LocOpe.hxx index 59a2115697..64fbd146fb 100644 --- a/src/LocOpe/LocOpe.hxx +++ b/src/LocOpe/LocOpe.hxx @@ -47,7 +47,6 @@ class LocOpe_CurveShapeIntersector; class LocOpe_CSIntersector; class LocOpe_BuildShape; class LocOpe_SplitDrafts; -class LocOpe_HBuilder; class LocOpe_BuildWires; @@ -107,7 +106,6 @@ friend class LocOpe_CurveShapeIntersector; friend class LocOpe_CSIntersector; friend class LocOpe_BuildShape; friend class LocOpe_SplitDrafts; -friend class LocOpe_HBuilder; friend class LocOpe_BuildWires; }; diff --git a/src/LocOpe/LocOpe_HBuilder.cxx b/src/LocOpe/LocOpe_HBuilder.cxx deleted file mode 100644 index 51d95f6459..0000000000 --- a/src/LocOpe/LocOpe_HBuilder.cxx +++ /dev/null @@ -1,22 +0,0 @@ -// Created on: 1996-07-01 -// Created by: Jacques GOUSSARD -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(LocOpe_HBuilder,TopOpeBRepBuild_HBuilder) \ No newline at end of file diff --git a/src/LocOpe/LocOpe_HBuilder.hxx b/src/LocOpe/LocOpe_HBuilder.hxx deleted file mode 100644 index 9acd49a7cc..0000000000 --- a/src/LocOpe/LocOpe_HBuilder.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 1996-07-01 -// Created by: Jacques GOUSSARD -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _LocOpe_HBuilder_HeaderFile -#define _LocOpe_HBuilder_HeaderFile - -#include -#include - -#include -#include -class TopOpeBRepDS_BuildTool; - - -class LocOpe_HBuilder; -DEFINE_STANDARD_HANDLE(LocOpe_HBuilder, TopOpeBRepBuild_HBuilder) - - -class LocOpe_HBuilder : public TopOpeBRepBuild_HBuilder -{ - -public: - - - LocOpe_HBuilder(const TopOpeBRepDS_BuildTool& BT); - - Standard_Boolean Classify() const; - - void Classify (const Standard_Boolean B); - - - - - DEFINE_STANDARD_RTTIEXT(LocOpe_HBuilder,TopOpeBRepBuild_HBuilder) - -protected: - - - - -private: - - - - -}; - - -#include - - - - - -#endif // _LocOpe_HBuilder_HeaderFile diff --git a/src/LocOpe/LocOpe_HBuilder.lxx b/src/LocOpe/LocOpe_HBuilder.lxx deleted file mode 100644 index 601e03ad55..0000000000 --- a/src/LocOpe/LocOpe_HBuilder.lxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 1996-07-01 -// Created by: Jacques GOUSSARD -// Copyright (c) 1996-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -//======================================================================= -//function : LocOpe_HBuilder -//purpose : -//======================================================================= - -inline LocOpe_HBuilder::LocOpe_HBuilder(const TopOpeBRepDS_BuildTool& BT): - TopOpeBRepBuild_HBuilder(BT) -{ - myBuilder.ChangeClassify(Standard_True); -} - - -//======================================================================= -//function : Classify -//purpose : -//======================================================================= - -inline Standard_Boolean LocOpe_HBuilder::Classify () const -{ - return myBuilder.Classify(); -} - - -//======================================================================= -//function : Classify -//purpose : -//======================================================================= - -inline void LocOpe_HBuilder::Classify (const Standard_Boolean B) -{ - myBuilder.ChangeClassify(B); -} - - diff --git a/src/TopTrans/TopTrans_SurfaceTransition.cxx b/src/TopTrans/TopTrans_SurfaceTransition.cxx index 846620c335..d3ebdde0cb 100644 --- a/src/TopTrans/TopTrans_SurfaceTransition.cxx +++ b/src/TopTrans/TopTrans_SurfaceTransition.cxx @@ -33,7 +33,6 @@ static Standard_Boolean STATIC_DEFINED = Standard_False; -//#include static gp_Dir FUN_nCinsideS(const gp_Dir& tgC, const gp_Dir& ngS) { // Give us a curve C on suface S, , a parameter