1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025700: Ensuring uniform control of the functionalities of the Boolean operations algorithm at the level of DRAW application

Changes:
1.
Class BOPTest_Chronometer
The class definition that depends on TBB has been removed

2.
For the following commands:
>bop s1 s2 [tol]
>bopcommon r s1 s2 [tol]
>bfuse r s1 s2 [tol]
>bcut s1 s2 [tol]
>btuc r s1 s2 [tol]
>bsection r s1 s2 [-n2d/-n2d1/-n2d2] [-na] [tol]
>mkvolume r b1 b2 ... [-c] [-ni] [-s] [tol]
>bopcheck Shape [level of check: 0 - 9] [-t -s] [-tol tol]
>bopargcheck Shape1 [[Shape2] [-F/O/C/T/S/U] [/R|F|T|V|E|I|P|C|S]] [#BF] [-tol tol]
>bfillds [-s -t] [tol]
the syntax has been changed. Parameter [tol] has been removed.

The value "tol"  (i.e. Fuzzy Value) is option for the algorithm.

If it is necessary, the value "tol" can be set by the command:
>bfuzzyvalue value

see
http://tracker.dev.opencascade.org/view.php?id=25614
for more details

3.
For the following commands:
>bopcheck Shape [level of check: 0 - 9] [-t -s] [-tol tol]
>bfillds [-s -t] [tol]
>bbuild r [-s -t]
>bbop r op [-s -t]
the syntax has been changed. Parameter [-s] has been removed.
Parameter [-s] was to provide the sequential mode of the computations.

The mode of the computations is option for the algorithm.

The mode of the computations can be set by the command:
 >brunparallel [0/1]
       1 -sets the parallel mode of the computations
       0 -sets the sequential mode of the computations

see
http://tracker.dev.opencascade.org/view.php?id=25614
for more details
This commit is contained in:
pkv
2015-01-14 09:43:30 +03:00
committed by bugmaster
parent 49297cb6bd
commit 43cb001124
13 changed files with 441 additions and 482 deletions

View File

@@ -25,6 +25,7 @@
static Standard_Integer boptions (Draw_Interpretor&, Standard_Integer, const char**);
static Standard_Integer brunparallel (Draw_Interpretor&, Standard_Integer, const char**);
static Standard_Integer bfuzzyvalue (Draw_Interpretor&, Standard_Integer, const char**);
static Standard_Integer bparallelmode(Draw_Interpretor&, Standard_Integer, const char**);
//=======================================================================
//function : OptionCommands
@@ -36,11 +37,15 @@ void BOPTest::OptionCommands(Draw_Interpretor& theCommands)
if (done) return;
done = Standard_True;
// Chapter's name
const char* g = "Partition commands";
const char* g = "BOPTest commands";
// Commands
theCommands.Add("boptions", "use boptions" , __FILE__, boptions, g);
theCommands.Add("brunparallel", "use brunparallel [0/1]" , __FILE__, brunparallel, g);
theCommands.Add("bfuzzyvalue", "use bfuzzyvalue value" , __FILE__, bfuzzyvalue, g);
theCommands.Add("bparallelmode",
"bparallelmode [1/0] : show / set parallel mode for boolean operations",
__FILE__, bparallelmode, g);
}
//=======================================================================
//function : boptions
@@ -121,3 +126,30 @@ Standard_Integer brunparallel(Draw_Interpretor& di,
//
return 0;
}
//=======================================================================
//function : bparallelmode
//purpose :
//=======================================================================
Standard_Integer bparallelmode(Draw_Interpretor& di,
Standard_Integer n,
const char** a)
{
Standard_Boolean bRunParallel;
//
if (n == 2) {
bRunParallel=(Standard_Boolean)Draw::Atoi(a[1]);
BOPTest_Objects::SetRunParallel(bRunParallel);
if (bRunParallel) {
di << "Parallel mode for boolean operations has been enabled";
}
else {
di << "Parallel mode for boolean operations has been disabled";
}
}
else {
bRunParallel=BOPTest_Objects::RunParallel();
di << "Parallel mode state for boolean operations: "
<< (bRunParallel? "enabled" : "disabled");
}
return 0;
}