mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028567: Get rid of the unused DRAW commands based on old Boolean Operations (BRepAlgo)
1. Removal of the traces of the usage of old Boolean operations in BRepFeat package. 2. The DRAW commands *fubl* and *cubl* based on old Boolean operations have been removed. The alternative for these commands are the commands *bfuseblend* and *bcutblend* respectively. The last two commands are based on the modern Boolean operations. 3. The DRAW command *ksection* based on old Boolean operations has been removed. The command *bsection* should be used as alternative. Test cases which have been using the *ksection* command have been modified to use the *bsection* command. 4. The class QANewBRepNaming_BooleanOperation has been modified to use modern Boolean operations. The class QANewBRepNaming_BooleanOperation has been removed as not used. The class QANewBRepNaming_BooleanOperationFeat has been renamed to QANewBRepNaming_BooleanOperation as it has nothing to do with Feat algorithm.
This commit is contained in:
@@ -20,9 +20,6 @@
|
||||
#include <Draw_Interpretor.hxx>
|
||||
#include <Draw_Appli.hxx>
|
||||
#include <BRepFilletAPI_MakeFillet.hxx>
|
||||
#include <BRepAlgo_BooleanOperation.hxx>
|
||||
#include <BRepAlgo_Fuse.hxx>
|
||||
#include <BRepAlgo_Cut.hxx>
|
||||
#include <BiTgte_Blend.hxx>
|
||||
#include <TopOpeBRepBuild_HBuilder.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
@@ -35,7 +32,6 @@
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
//#include <BOPTools_DSFiller.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
@@ -318,62 +314,6 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di,
|
||||
|
||||
|
||||
|
||||
//**********************************************
|
||||
// command fuse and cut with fillets *
|
||||
//**********************************************
|
||||
|
||||
Standard_Integer topoblend(Draw_Interpretor& di, Standard_Integer narg, const char** a)
|
||||
{
|
||||
printtolblend(di);
|
||||
if(narg != 5) return 1;
|
||||
Standard_Boolean fuse = !strcmp(a[0],"fubl");
|
||||
TopoDS_Shape S1 = DBRep::Get(a[2]);
|
||||
TopoDS_Shape S2 = DBRep::Get(a[3]);
|
||||
Standard_Real Rad = Draw::Atof(a[4]);
|
||||
BRepAlgo_BooleanOperation* BC;
|
||||
if(fuse){
|
||||
BC = new BRepAlgo_Fuse(S1,S2);
|
||||
}
|
||||
else{
|
||||
BC = new BRepAlgo_Cut(S1,S2);
|
||||
}
|
||||
TopoDS_Shape ShapeCut = BC->Shape();
|
||||
|
||||
Handle(TopOpeBRepBuild_HBuilder) build = BC->Builder();
|
||||
TopTools_ListIteratorOfListOfShape its;
|
||||
|
||||
TopoDS_Compound result;
|
||||
BRep_Builder B;
|
||||
B.MakeCompound(result);
|
||||
|
||||
TopExp_Explorer ex;
|
||||
for (ex.Init(ShapeCut,TopAbs_SOLID); ex.More(); ex.Next()) {
|
||||
const TopoDS_Shape& cutsol = ex.Current();
|
||||
|
||||
BRepFilletAPI_MakeFillet fill(cutsol);
|
||||
fill.SetParams(ta,t3d,t2d,t3d,t2d,fl);
|
||||
fill.SetContinuity(blend_cont, tapp_angle);
|
||||
its = build->Section();
|
||||
while (its.More()) {
|
||||
TopoDS_Edge E = TopoDS::Edge(its.Value());
|
||||
fill.Add(Rad,E);
|
||||
its.Next();
|
||||
}
|
||||
|
||||
fill.Build();
|
||||
if(fill.IsDone()){
|
||||
B.Add(result,fill.Shape());
|
||||
}
|
||||
else {
|
||||
B.Add(result,cutsol);
|
||||
}
|
||||
}
|
||||
|
||||
delete BC;
|
||||
DBRep::Set(a[1],result);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//**********************************************
|
||||
// bfuse or bcut and then blend the section
|
||||
//**********************************************
|
||||
@@ -789,14 +729,6 @@ void BRepTest::FilletCommands(Draw_Interpretor& theCommands)
|
||||
"buildevol end of the evol fillet computation",__FILE__,
|
||||
BUILDEVOL,g);
|
||||
|
||||
theCommands.Add("fubl",
|
||||
"fubl result shape1 shape2 radius",__FILE__,
|
||||
topoblend,g);
|
||||
|
||||
theCommands.Add("cubl",
|
||||
"cubl result shape tool radius",__FILE__,
|
||||
topoblend,g);
|
||||
|
||||
theCommands.Add("bfuseblend",
|
||||
"bfuseblend result shape1 shape2 radius [-d]",__FILE__,
|
||||
boptopoblend,g);
|
||||
|
Reference in New Issue
Block a user