mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-07 18:30:55 +03:00
0026855: Draw commands to debug Boolean Operations Algorithm
The commands to debug BOA. These commands should serve only debug purposes and should not be used in tests. Removing old implementation of the duplicated bopnews command.
This commit is contained in:
parent
832ae82d0a
commit
b1682e23b2
src/BOPTest
tests/bugs/modalg_2
@ -42,6 +42,7 @@ void BOPTest::AllCommands(Draw_Interpretor& theCommands)
|
||||
BOPTest::APICommands (theCommands);
|
||||
BOPTest::OptionCommands (theCommands);
|
||||
BOPTest::HistoryCommands (theCommands);
|
||||
BOPTest::DebugCommands (theCommands);
|
||||
BOPTest::CellsCommands (theCommands);
|
||||
}
|
||||
//=======================================================================
|
||||
|
@ -55,9 +55,9 @@ public:
|
||||
|
||||
Standard_EXPORT static void HistoryCommands (Draw_Interpretor& aDI);
|
||||
|
||||
Standard_EXPORT static void DebugCommands (Draw_Interpretor& aDI);
|
||||
Standard_EXPORT static void CellsCommands (Draw_Interpretor& aDI);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <BOPCol_ListOfShape.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPTest.hxx>
|
||||
#include <BOPTest_DrawableShape.hxx>
|
||||
#include <BOPTest_Objects.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAlgoAPI_BooleanOperation.hxx>
|
||||
@ -32,7 +31,6 @@
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
#include <DBRep.hxx>
|
||||
#include <Draw.hxx>
|
||||
#include <Draw_Color.hxx>
|
||||
#include <DrawTrSurf.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
@ -77,7 +75,6 @@ static Standard_Integer bfuse (Draw_Interpretor&, Standard_Integer, const ch
|
||||
static Standard_Integer bcommon (Draw_Interpretor&, Standard_Integer, const char**);
|
||||
//
|
||||
static Standard_Integer bopcurves (Draw_Interpretor&, Standard_Integer, const char**);
|
||||
static Standard_Integer bopnews (Draw_Interpretor&, Standard_Integer, const char**);
|
||||
static Standard_Integer mkvolume (Draw_Interpretor&, Standard_Integer, const char**);
|
||||
|
||||
//=======================================================================
|
||||
@ -109,7 +106,6 @@ static Standard_Integer mkvolume (Draw_Interpretor&, Standard_Integer, const c
|
||||
//
|
||||
theCommands.Add("bopcurves", "use bopcurves F1 F2 [-2d/-2d1/-2d2]",
|
||||
__FILE__, bopcurves, g);
|
||||
theCommands.Add("bopnews" , "use bopnews -v[e,f]" , __FILE__, bopnews, g);
|
||||
theCommands.Add("mkvolume", "make solids from set of shapes.\nmkvolume r b1 b2 ... [-c] [-ni]",
|
||||
__FILE__, mkvolume , g);
|
||||
}
|
||||
@ -528,77 +524,6 @@ Standard_Integer bsmt (Draw_Interpretor& di,
|
||||
return 0;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : bopnews
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer bopnews (Draw_Interpretor& di,
|
||||
Standard_Integer n,
|
||||
const char** a)
|
||||
{
|
||||
if (n!=2) {
|
||||
di << " use bopnews -v[e,f]\n";
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
if (pPF==NULL) {
|
||||
di << " Prepare BOPAlgo_PaveFiller first >bop S1 S2\n";
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
char buf[32];
|
||||
Standard_CString aText;
|
||||
Standard_Integer i, i1, i2, iFound;
|
||||
Draw_Color aTextColor(Draw_cyan);
|
||||
TopAbs_ShapeEnum aT;
|
||||
Handle(BOPTest_DrawableShape) aDShape;
|
||||
//
|
||||
const BOPDS_PDS& pDS=pPF->PDS();
|
||||
//
|
||||
aT=TopAbs_SHAPE;
|
||||
if (!strcmp (a[1], "-f")) {
|
||||
aT=TopAbs_FACE;
|
||||
}
|
||||
else if (!strcmp (a[1], "-e")){
|
||||
aT=TopAbs_EDGE;
|
||||
}
|
||||
else if (!strcmp (a[1], "-v")){
|
||||
aT=TopAbs_VERTEX;
|
||||
}
|
||||
else {
|
||||
di << " use bopnews -v[e,f]\n";
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
iFound=0;
|
||||
i1=pDS->NbSourceShapes();
|
||||
i2=pDS->NbShapes();
|
||||
for (i=i1; i<i2; ++i) {
|
||||
const BOPDS_ShapeInfo& aSI=pDS->ShapeInfo(i);
|
||||
if (aSI.ShapeType()==aT) {
|
||||
const TopoDS_Shape& aS=aSI.Shape();
|
||||
//
|
||||
Sprintf (buf, "z%d", i);
|
||||
aText=buf;
|
||||
aDShape=new BOPTest_DrawableShape (aS, aText, aTextColor);
|
||||
Draw::Set (aText, aDShape);
|
||||
//
|
||||
Sprintf (buf, " z%d", i);
|
||||
di << buf;
|
||||
//
|
||||
iFound=1;
|
||||
}
|
||||
}
|
||||
//
|
||||
if (iFound) {
|
||||
di << "\n";
|
||||
}
|
||||
else {
|
||||
di << " not found\n";
|
||||
}
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : bopcurves
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
1597
src/BOPTest/BOPTest_DebugCommands.cxx
Normal file
1597
src/BOPTest/BOPTest_DebugCommands.cxx
Normal file
File diff suppressed because it is too large
Load Diff
@ -13,4 +13,4 @@ BOPTest_OptionCommands.cxx
|
||||
BOPTest_PartitionCommands.cxx
|
||||
BOPTest_TolerCommands.cxx
|
||||
BOPTest_HistoryCommands.cxx
|
||||
BOPTest_CellsCommands.cxx
|
||||
BOPTest_DebugCommands.cxxBOPTest_CellsCommands.cxx
|
@ -10,8 +10,10 @@ set BugNumber OCC23008
|
||||
|
||||
restore [locate_data_file bug23008_ez15] b1
|
||||
restore [locate_data_file bug23008_fz37] b2
|
||||
bop b1 b2
|
||||
set info [ bopnews -v ]
|
||||
bclearobjects; bcleartools
|
||||
baddobjects b1; baddtools b2
|
||||
bfillds
|
||||
set info [ bopnews v ]
|
||||
for {set i 0} {$i <= 100} {incr i} {
|
||||
set word [lsearch $info z$i]
|
||||
if {$word == -1} {
|
||||
|
Loading…
x
Reference in New Issue
Block a user