1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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:
emv
2017-03-17 14:33:50 +03:00
committed by bugmaster
parent 8b956afe8e
commit e45b5ff7f2
34 changed files with 1713 additions and 2347 deletions

View File

@@ -57,7 +57,6 @@
#include <TopoDS_Vertex.hxx>
#include <TopTools_MapOfShape.hxx>
//#include <BRepAlgo_Cut.hxx>
#define NECHANTBARYC 11
//=======================================================================

View File

@@ -57,10 +57,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:30:25 2002 f
//#include <BRepAlgo_Cut.hxx>
//#include <BRepAlgo_Fuse.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:30:29 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
#endif
@@ -320,10 +316,7 @@ static void Descendants(const TopoDS_Shape&,
TopTools_DataMapOfShapeListOfShape locmap;
TopExp_Explorer expp(Comp, TopAbs_SOLID);
if(expp.More() && !Comp.IsNull() && !myGShape.IsNull()) {
//modified by NIZNHY-PKV Thu Mar 21 17:15:36 2002 f
//BRepAlgo_Cut trP(myGShape,Comp);
BRepAlgoAPI_Cut trP(myGShape, Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:15:58 2002 t
exp.Init(trP.Shape(), TopAbs_SOLID);
if (exp.Current().IsNull()) {
theOpe = 2;
@@ -395,10 +388,7 @@ static void Descendants(const TopoDS_Shape&,
}
}// if(!mySUntil.IsNull())
//
//modified by NIZNHY-PKV Thu Mar 21 17:21:49 2002 f
//UpdateDescendants(trP.Builder(),theGShape,Standard_True); // skip faces
UpdateDescendants(trP,theGShape,Standard_True); // skip faces
//modified by NIZNHY-PKV Thu Mar 21 17:22:32 2002 t
theGlue.Init(mySbase,theGShape);
for (itm.Initialize(myGluedF);itm.More();itm.Next()) {
@@ -605,10 +595,7 @@ static void Descendants(const TopoDS_Shape&,
TopExp_Explorer expp(Comp, TopAbs_SOLID);
if(expp.More() && !Comp.IsNull() && !myGShape.IsNull()) {
//modified by NIZNHY-PKV Thu Mar 21 17:24:52 2002 f
//BRepAlgo_Cut trP(myGShape,Comp);
BRepAlgoAPI_Cut trP(myGShape, Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:24:56 2002 t
// the result is necessarily a compound.
exp.Init(trP.Shape(),TopAbs_SOLID);
if (!exp.More()) {
@@ -659,10 +646,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
}
//modified by NIZNHY-PKV Thu Mar 21 17:27:23 2002 f
//UpdateDescendants(trP.Builder(),theGShape,Standard_True);
UpdateDescendants(trP,theGShape,Standard_True);
//modified by NIZNHY-PKV Thu Mar 21 17:27:31 2002 t
}//if(expp.More() && !Comp.IsNull() && !myGShape.IsNull()) {
//
@@ -1007,14 +991,12 @@ static void Descendants(const TopoDS_Shape&,
if (!myJustFeat) {
// removal of edges of section that have no common vertices
// with PartsOfTool preserved
//modified by NIZHNY-EMV Thu May 10 15:56:24 2012
if (bFlag) {
theBuilder.PerformResult();
myShape = theBuilder.Shape();
} else {
myShape = theBuilder.Shape();
}
//modified by NIZHNY-EMV Thu May 10 15:56:26 2012
Done();
}
else {
@@ -1372,7 +1354,6 @@ static void Descendants(const TopoDS_Shape& S,
}
}
}
//modified by NIZNHY-PKV Thu Mar 21 18:43:18 2002 f
//=======================================================================
//function : UpdateDescendants
//purpose :
@@ -1429,4 +1410,3 @@ static void Descendants(const TopoDS_Shape& S,
}
}
}
//modified by NIZNHY-PKV Thu Mar 21 18:43:36 2002 t

View File

@@ -63,10 +63,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:49:46 2002 f
//#include <BRepAlgo_Cut.hxx>
//#include <BRepAlgo_Fuse.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:50:04 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
#endif
@@ -258,25 +254,15 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
// if there is no gluing -> call topological operations
if(!myJustGluer) {
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:32:17 2002 f
//BRepAlgo_Fuse f(mySbase, myGShape);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, myGShape);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:32:23 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:32:57 2002 f
//BRepAlgo_Cut c(mySbase, myGShape);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, myGShape);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:33:00 2002 t
Done();
}
else {
@@ -372,35 +358,21 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
TopoDS_Solid S = BRepFeat::Tool(mySUntil, FUntil, Or);
if (!S.IsNull()) bB.Add(Comp,S);
//modified by NIZNHY-PKV Thu Mar 21 17:33:27 2002
//BRepAlgo_Cut trP(VraiDPrism,Comp);
//UpdateDescendants(trP.Builder(),trP.Shape(), Standard_False);
BRepAlgoAPI_Cut trP(VraiDPrism,Comp);
UpdateDescendants(trP, trP.Shape(), Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:33:32 2002 t
TopExp_Explorer ex(trP.Shape(), TopAbs_SOLID);
TopoDS_Shape Cutsh = ex.Current();
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:34:09 2002 f
//BRepAlgo_Fuse f(mySbase, Cutsh);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, Cutsh);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:34:13 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:34:56 2002 f
//BRepAlgo_Cut c(mySbase, Cutsh);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, Cutsh);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:34:59 2002 t
Done();
}
else {
@@ -570,32 +542,19 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
return;
}
//modified by NIZNHY-PKV Thu Mar 21 17:35:48 2002 f
//BRepAlgo_Cut trP(VraiDPrism,Comp);
BRepAlgoAPI_Cut trP(VraiDPrism,Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:35:59 2002 t
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:36:06 2002 f
//BRepAlgo_Fuse f(mySbase, trP.Shape());
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, trP.Shape());
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:36:33 2002 t
Done();
}
//
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:37:16 2002 f
//BRepAlgo_Cut c(mySbase, trP.Shape());
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, trP.Shape());
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:37:49 2002 t
Done();
}
else {
@@ -764,30 +723,17 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
return;
}
//modified by NIZNHY-PKV Thu Mar 21 17:38:33 2002 f
//BRepAlgo_Cut trP(VraiDPrism,Comp);
BRepAlgoAPI_Cut trP(VraiDPrism,Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:38:37 2002 t
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:40:03 2002 f
//BRepAlgo_Fuse f(mySbase, trP.Shape());
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, trP.Shape());
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:40:07 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:40:33 2002 t
//BRepAlgo_Cut c(mySbase, trP.Shape());
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, trP.Shape());
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:40:44 2002 t
Done();
}
else {
@@ -835,16 +781,10 @@ void BRepFeat_MakeDPrism::PerformThruAll()
GeneratedShapeValid();
if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:46:16 2002 f
//BRepAlgo_Cut c(mySbase, myGShape);
BRepAlgoAPI_Cut c(mySbase, myGShape);
//modified by NIZNHY-PKV Thu Mar 21 17:46:26 2002 t
if (c.IsDone()) {
myShape = c.Shape();
//modified by NIZNHY-PKV Thu Mar 21 17:46:39 2002 f
//UpdateDescendants(c.Builder(), myShape, Standard_False);
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:46:43 2002 t
Done();
}
}
@@ -942,30 +882,17 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
B.MakeCompound(TopoDS::Compound(Comp));
TopoDS_Solid S = BRepFeat::Tool(mySUntil, FUntil, Or);
if (!S.IsNull()) B.Add(Comp,S);
//modified by NIZNHY-PKV Thu Mar 21 17:47:14 2002 f
//BRepAlgo_Cut trP(VraiDPrism,Comp);
BRepAlgoAPI_Cut trP(VraiDPrism,Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:47:21 2002 t
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:47:42 2002 f
//BRepAlgo_Fuse f(mySbase, trP.Shape());
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, trP.Shape());
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:47:49 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:48:18 2002 f
//BRepAlgo_Cut c(mySbase, trP.Shape());
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, trP.Shape());
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:48:26 2002 t
Done();
}
else {

View File

@@ -80,11 +80,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:51:33 2002 f
//#include <BRepAlgo_Section.hxx>
//#include <BRepAlgo_Common.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:51:35 2002 t
//#include <DbgTools.hxx>
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
extern Standard_Boolean BRepFeat_GettraceFEATRIB();
@@ -227,10 +222,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
6.*myBnd, -6.*myBnd, 6.*myBnd);
TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape());
//modified by NIZNHY-PKV Fri Mar 22 16:49:28 2002 f
//BRepAlgo_Common PlaneS(BndBox, PlaneFace);
BRepAlgoAPI_Common PlaneS(BndBox, PlaneFace);
//modified by NIZNHY-PKV Fri Mar 22 16:49:39 2002 t
TopExp_Explorer EXP;
TopoDS_Shape PlaneSect = PlaneS.Shape();
EXP.Init(PlaneSect, TopAbs_WIRE);
@@ -945,10 +937,7 @@ void BRepFeat_MakeLinearForm::Perform()
Standard_Boolean v1OK = Standard_False, v2OK= Standard_False;
TopoDS_Vertex v1, v2, v3, v4, ve1, ve2;
//modified by NIZNHY-PKV Fri Mar 22 16:50:24 2002 f
//BRepAlgo_Section sect (fac, CurrentFace, Standard_False);
BRepAlgoAPI_Section sect (fac, CurrentFace, Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:50:32 2002 t
sect.Approximation(Standard_True);
sect.Build();
@@ -1069,10 +1058,7 @@ void BRepFeat_MakeLinearForm::Perform()
}
}
//modified by NIZNHY-PKV Fri Mar 22 16:50:53 2002 f
//BRepAlgo_Section sectf (fac, CurrentFace, Standard_False);
BRepAlgoAPI_Section sectf (fac, CurrentFace, Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:51:03 2002 t
sectf.Approximation(Standard_True);
sectf.Build();

View File

@@ -44,10 +44,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:54:27 2002 f
//#include <BRepAlgo_Fuse.hxx>
//#include <BRepAlgo_Cut.hxx>
//modified by NIZNHY-PKV Thu Mar 21 17:54:30 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
#endif
@@ -200,25 +196,15 @@ void BRepFeat_MakePipe::Perform()
if(myGluedF.IsEmpty()) {
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:53:05 2002 f
//BRepAlgo_Fuse f(mySbase, myGShape);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, myGShape);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:53:10 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 17:53:37 2002 f
//BRepAlgo_Cut c(mySbase, myGShape);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, myGShape);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 17:53:50 2002 t
Done();
}
else {

View File

@@ -296,25 +296,15 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle)
if(myGluedF.IsEmpty()) {
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 18:15:06 2002 f
//BRepAlgo_Fuse f(mySbase, myGShape);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, myGShape);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:15:11 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 18:15:37 2002 f
//BRepAlgo_Cut c(mySbase, myGShape);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, myGShape);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:15:47 2002 t
Done();
}
else {
@@ -415,10 +405,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
B.MakeCompound(TopoDS::Compound(Comp));
TopoDS_Solid S = BRepFeat::Tool(mySUntil, FUntil, Or);
if (!S.IsNull()) B.Add(Comp,S);
//modified by NIZNHY-PKV Thu Mar 21 18:17:31 2002 f
//BRepAlgo_Cut trP(VraiRevol,Comp);
BRepAlgoAPI_Cut trP(VraiRevol,Comp);
//modified by NIZNHY-PKV Thu Mar 21 18:17:37 2002 t
TopoDS_Shape Cutsh = trP.Shape();
TopExp_Explorer ex(Cutsh, TopAbs_SOLID);
for(; ex.More(); ex.Next()) {
@@ -432,25 +419,15 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
}
}
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 18:17:53 2002 f
//BRepAlgo_Fuse f(mySbase, VraiRevol);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, VraiRevol);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:17:57 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 18:18:23 2002 f
//BRepAlgo_Cut c(mySbase, VraiRevol);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, VraiRevol);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:18:28 2002 t
Done();
}
else {
@@ -459,41 +436,6 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
}
}
}
// Loop of control of descendance
/*
TopExp_Explorer expr(mySbase, TopAbs_FACE);
char nom1[20], nom2[20];
Standard_Integer ii = 0;
for(; expr.More(); expr.Next()) {
ii++;
sprintf(nom1, "faceinitial_%d", ii);
DBRep::Set(nom1, expr.Current());
Standard_Integer jj = 0;
const TopTools_ListOfShape& list = Modified(expr.Current());
TopTools_ListIteratorOfListOfShape ite(list);
for(; ite.More(); ite.Next()) {
jj++;
sprintf(nom2, "facemodifie_%d_%d", ii, jj);
DBRep::Set(nom2, ite.Value());
}
}
expr.Init(myPbase, TopAbs_EDGE);
ii=0;
for(; expr.More(); expr.Next()) {
ii++;
sprintf(nom1, "edgeinitial_%d", ii);
DBRep::Set(nom1, expr.Current());
Standard_Integer jj = 0;
const TopTools_ListOfShape& list = Generated(expr.Current());
TopTools_ListIteratorOfListOfShape ite(list);
for(; ite.More(); ite.Next()) {
jj++;
sprintf(nom2, "facegeneree_%d_%d", ii, jj);
DBRep::Set(nom2, ite.Value());
}
}
*/
}
@@ -618,14 +560,9 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
if (!SF.IsNull()) B.Add(Comp,SF);
TopoDS_Solid SU = BRepFeat::Tool(mySUntil, FUntil, OrU);
if (!SU.IsNull()) B.Add(Comp,SU);
//modified by NIZNHY-PKV Thu Mar 21 18:18:54 2002 f
//BRepAlgo_Cut trP(VraiRevol,Comp);
BRepAlgoAPI_Cut trP(VraiRevol,Comp);
//modified by NIZNHY-PKV Thu Mar 21 18:18:57 2002 t
TopoDS_Shape Cutsh = trP.Shape();
TopExp_Explorer ex(Cutsh, TopAbs_SOLID);
// Standard_Real PrF = BRepFeat::ParametricBarycenter(mySFrom, myBCurve);
// Standard_Real PrU = BRepFeat::ParametricBarycenter(mySUntil, myBCurve);
VraiRevol = ex.Current();
for(; ex.More(); ex.Next()) {
Standard_Real PrCur = BRepFeat::
@@ -636,25 +573,15 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
}
}
if(myFuse == 1 && !myJustFeat) {
//modified by NIZNHY-PKV Thu Mar 21 18:19:14 2002 f
//BRepAlgo_Fuse f(mySbase, VraiRevol);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, VraiRevol);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:19:18 2002 t
Done();
}
else if(myFuse == 0 && !myJustFeat) {
//modified by NIZNHY-PKV Thu Mar 21 18:19:46 2002 f
//BRepAlgo_Cut c(mySbase, VraiRevol);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, VraiRevol);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:19:50 2002 t
Done();
}
else {
@@ -759,10 +686,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
B.MakeCompound(TopoDS::Compound(Comp));
TopoDS_Solid S = BRepFeat::Tool(mySUntil, FUntil, Or);
if (!S.IsNull()) B.Add(Comp,S);
//modified by NIZNHY-PKV Thu Mar 21 18:20:14 2002 f
//BRepAlgo_Cut trP(VraiRevol,Comp);
BRepAlgoAPI_Cut trP(VraiRevol,Comp);
//modified by NIZNHY-PKV Thu Mar 21 18:20:19 2002 t
TopoDS_Shape Cutsh = trP.Shape();
TopExp_Explorer ex(Cutsh, TopAbs_SOLID);
for(; ex.More(); ex.Next()) {
@@ -776,25 +700,15 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
}
}
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 18:20:36 2002 f
//BRepAlgo_Fuse f(mySbase, VraiRevol);
//myShape = f.Shape();
//UpdateDescendants(f.Builder(), myShape, Standard_False);
BRepAlgoAPI_Fuse f(mySbase, VraiRevol);
myShape = f.Shape();
UpdateDescendants(f, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:20:40 2002 t
Done();
}
else if(myFuse == 0) {
//modified by NIZNHY-PKV Thu Mar 21 18:21:07 2002 f
//BRepAlgo_Cut c(mySbase, VraiRevol);
//myShape = c.Shape();
//UpdateDescendants(c.Builder(), myShape, Standard_False);
BRepAlgoAPI_Cut c(mySbase, VraiRevol);
myShape = c.Shape();
UpdateDescendants(c, myShape, Standard_False);
//modified by NIZNHY-PKV Thu Mar 21 18:21:26 2002 t
Done();
}
else {
@@ -855,10 +769,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
B.MakeCompound(TopoDS::Compound(Comp));
TopoDS_Solid S = BRepFeat::Tool(theSkface, FSk, Or);
if (!S.IsNull()) B.Add(Comp,S);
//modified by NIZNHY-PKV Thu Mar 21 18:21:54 2002 f
//BRepAlgo_Cut trP(VraiRevol,Comp);
BRepAlgoAPI_Cut trP(VraiRevol,Comp);
//modified by NIZNHY-PKV Thu Mar 21 18:21:58 2002 t
TopoDS_Shape Cutsh = trP.Shape();
TopExp_Explorer ex(Cutsh, TopAbs_SOLID);
for(; ex.More(); ex.Next()) {

View File

@@ -94,11 +94,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:56:15 2002
//#include <BRepAlgo_Cut.hxx>
//#include <BRepAlgo_Section.hxx>
//#include <BRepAlgo_Common.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:56:17 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
extern Standard_Boolean BRepFeat_GettraceFEATRIB();
@@ -270,10 +265,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
6.*myBnd, -6.*myBnd, 6.*myBnd);
TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape());
//modified by NIZNHY-PKV Fri Mar 22 16:52:26 2002 f
//BRepAlgo_Common PlaneS(BndBox, PlaneFace);
BRepAlgoAPI_Common PlaneS(BndBox, PlaneFace);
//modified by NIZNHY-PKV Fri Mar 22 16:52:31 2002 t
TopExp_Explorer EXP;
TopoDS_Shape PlaneSect = PlaneS.Shape();
EXP.Init(PlaneSect, TopAbs_WIRE);
@@ -890,14 +882,9 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
ElSLib::Parameters(myPln->Pln(), CheckPnt, paru, parv);
gp_Pnt2d checkpnt2d(paru, parv);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
//modified by NIZNHY-PKV Fri Mar 22 16:52:52 2002 f
//BRepAlgo_Cut c(BndFace, NewBndFace);
BRepAlgoAPI_Cut c(BndFace, NewBndFace);
//modified by NIZNHY-PKV Fri Mar 22 16:52:57 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
const TopoDS_Wire& aCurWire = TopoDS::Wire(exp.Current());
// akm 13/02/02 : we know the plane. Why not to use it?
// BRepLib_MakeFace ff(w);
BRepLib_MakeFace ff(myPln->Pln(), aCurWire, Standard_True);
NewBndFace = TopoDS::Face(ff.Shape());
}
@@ -1158,10 +1145,7 @@ void BRepFeat_MakeRevolutionForm::Perform()
if (!S1.IsNull()) B.Add(Comp,S1);
if (!S2.IsNull()) B.Add(Comp,S2);
//modified by NIZNHY-PKV Fri Mar 22 16:53:20 2002 f
//BRepAlgo_Cut trP(VraiForm,Comp);
BRepAlgoAPI_Cut trP(VraiForm,Comp);
//modified by NIZNHY-PKV Fri Mar 22 16:53:23 2002 t
// coupe de la nervure par deux plans parallels
TopTools_DataMapOfShapeListOfShape SlidingMap;
@@ -1287,10 +1271,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
// BRepBuilderAPI_MakeFace fac(myPln);
Standard_Boolean LastOK = Standard_False, FirstOK= Standard_False;
TopoDS_Vertex v1, v2, v3, v4, Vert;
//modified by NIZNHY-PKV Fri Mar 22 16:54:09 2002 f
//BRepAlgo_Section sect (fac, CurrentFace, Standard_False);
BRepAlgoAPI_Section sect (fac, CurrentFace, Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:54:14 2002 t
sect.Approximation(Standard_True);
sect.Build();
TopExp_Explorer Ex;
@@ -1312,7 +1293,6 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
return Standard_False;
}
//
//modified by NIZNHY-PKV Tue Apr 2 15:08:23 2002 f
if(!e1.IsNull()) {
Standard_Real aTolV1, aTolV2;
myListOfEdges.Clear();
@@ -1348,7 +1328,6 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
myListOfEdges.Clear();
}
}
//modified by NIZNHY-PKV Tue Apr 2 15:08:26 2002 t
//
if(!e1.IsNull()) {
myListOfEdges.Clear();
@@ -1513,10 +1492,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
}
}
//modified by NIZNHY-PKV Fri Mar 22 16:54:28 2002 f
//BRepAlgo_Section sectf (fac, CurrentFace, Standard_False);
BRepAlgoAPI_Section sectf (fac, CurrentFace, Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:54:33 2002 t
sectf.Approximation(Standard_True);
sectf.Build();
@@ -1618,10 +1594,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
ii = 0;
//modified by NIZNHY-PKV Fri Mar 22 16:54:45 2002 f
//BRepAlgo_Section sectf (fac, CurrentFace, Standard_False);
BRepAlgoAPI_Section sectf (fac, CurrentFace, Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:54:52 2002 t
sectf.Approximation(Standard_True);
sectf.Build();

View File

@@ -81,10 +81,6 @@
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:48:13 2002 f
//#include <BRepAlgo_Cut.hxx>
//#include <BRepAlgo_Fuse.hxx>
//modified by NIZNHY-PKV Fri Mar 22 16:48:16 2002 t
#ifdef OCCT_DEBUG
extern Standard_Boolean BRepFeat_GettraceFEAT();
extern Standard_Boolean BRepFeat_GettraceFEATRIB();
@@ -743,7 +739,7 @@ TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces,
if(!ASI.IsDone()) continue;
for(Standard_Integer jj = 1; jj<=Counter; jj++) {
if(ASI.NbPoints(jj) >= 1) {
Standard_Real app = ASI.Point(jj,1).Parameter();//modified by NIZNHY-PKV Fri Mar 22 17:05:23 2002 pp
Standard_Real app = ASI.Point(jj,1).Parameter();
if(app >= 0 && app < Par) {
Par = app;
FFF = f;
@@ -875,7 +871,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:04 2002 fx instead f
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_EDGE);
for(; ex5.More(); ex5.Next()) {
@@ -899,7 +895,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_VERTEX);
for(; ex5.More(); ex5.Next()) {
@@ -931,7 +927,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_EDGE);
for(; ex5.More(); ex5.Next()) {
@@ -956,7 +952,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
faces.Clear();
Map.Clear();
for(; ex4.More(); ex4.Next()) {
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());//modified by NIZNHY-PKV Fri Mar 22 17:06:36 2002 fx instead of f
const TopoDS_Face& fx = TopoDS::Face(ex4.Current());
if ( !Map.Add(fx)) continue;
ex5.Init(ex4.Current(), TopAbs_VERTEX);
for(; ex5.More(); ex5.Next()) {
@@ -1130,7 +1126,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:16:44 2002 fx/f
TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_EDGE);
for(; ex3.More(); ex3.Next()) {
@@ -1150,7 +1146,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:13:08 2002 fx/f
TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_VERTEX);
for(; ex3.More(); ex3.Next()) {
@@ -1183,7 +1179,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:12:06 2002 fx/f
TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_EDGE);
for(; ex3.More(); ex3.Next()) {
@@ -1203,7 +1199,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
TopExp_Explorer ex2;
ex2.Init(mySbase, TopAbs_FACE);
for(; ex2.More(); ex2.Next()) {
TopoDS_Face fx = TopoDS::Face(ex2.Current());//modified by NIZNHY-PKV Fri Mar 22 17:11:36 2002 fx/f
TopoDS_Face fx = TopoDS::Face(ex2.Current());
TopExp_Explorer ex3;
ex3.Init(fx, TopAbs_VERTEX);
for(; ex3.More(); ex3.Next()) {
@@ -1610,13 +1606,10 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
gp_Pnt2d checkpnt2d(u, v);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
// If face is not the correct part of BndFace take the complementary
//modified by NIZNHY-PKV Fri Mar 22 16:46:20 2002 f
//BRepAlgo_Cut c(BndFace, fac);
BRepAlgoAPI_Cut c(BndFace, fac);
//modified by NIZNHY-PKV Fri Mar 22 16:46:23 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
const TopoDS_Wire& w = TopoDS::Wire(exp.Current());
BRepLib_MakeFace ffx(w);//modified by NIZNHY-PKV Fri Mar 22 17:10:43 2002 ffx/ff
BRepLib_MakeFace ffx(w);
Prof = TopoDS::Face(ffx.Shape());
}
else {
@@ -2299,16 +2292,10 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
ElSLib::Parameters(myPln->Pln(), CheckPnt, u, v);
gp_Pnt2d checkpnt2d(u, v);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
//modified by NIZNHY-PKV Fri Mar 22 16:47:06 2002 f
//BRepAlgo_Cut c(BndFace, fac);
BRepAlgoAPI_Cut c(BndFace, fac);
//modified by NIZNHY-PKV Fri Mar 22 16:47:09 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
//modified by NIZNHY-PKV Fri Mar 22 16:47:23 2002 f
//UpdateDescendants(c.Builder(), c.Shape(), Standard_False);
UpdateDescendants(c, c.Shape(), Standard_False);
//modified by NIZNHY-PKV Fri Mar 22 16:47:28 2002 t
const TopoDS_Wire& ww = TopoDS::Wire(exp.Current());//modified by NIZNHY-PKV Fri Mar 22 17:10:16 2002 ww/w
const TopoDS_Wire& ww = TopoDS::Wire(exp.Current());
BRepLib_MakeFace ff(ww);
Prof = TopoDS::Face(ff.Shape());
}
@@ -2330,7 +2317,6 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
return ProfileOK;
}
//modified by NIZNHY-PKV Thu Mar 21 18:43:18 2002 f
//=======================================================================
//function : UpdateDescendants
//purpose :
@@ -2387,4 +2373,3 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
}
}
}
//modified by NIZNHY-PKV Thu Mar 21 18:43:36 2002 t