mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028786: Refactoring of the Warning/Error reporting system of Boolean Operations Algorithm
0. Basic tools for defining classes representing alerts (errors, warnings etc.) and collecting them during execution of algorithms are added in Message package. 1. Refactoring of the Error/Warning reporting system of the algorithms in Boolean Component. To dump the description of the Error/Warning status of the algorithm the DumpErrors/DumpWarnings method should be called. Also, the methods GerErrorMsg(int Error) and GetWarningMsg(int Warning) have been implemented to get the description for the given Error/Warning. All Error/Warning statuses are now listed in the enumeration ErrorStatusEnum/WarningStatusEnum of the algorithm. It is also possible to get the shapes for which the warning has been set by using the method GetWarningShapes(). 2. The new class BOPAlgo_Options has been created to unify the options of the BOPAlgo_* and BRepAlgoAPI* algorithms. 3. The new checks across the algorithms have been added to detect and report errors and warnings. 4. Test cases boolean bopcut_complex B9 E1 E5 E8 boolean bopfuse_complex B4 B5 C9 D1 D4 D5 D6 D7 have been rewritten to use Cells Builder algorithm instead of Boolean Operations algorithm, because latter always returns error "Unsupported Boolean operation" for these cases. 5. New chapter has been added in the user guide for Boolean Operations - Error / Warning reporting system. 6. Added comment to NCollection_List::Remove(Iterator&)
This commit is contained in:
@@ -14,9 +14,7 @@
|
||||
|
||||
|
||||
#include <BRepAlgoAPI_Algo.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <NCollection_BaseAllocator.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@@ -25,10 +23,7 @@
|
||||
//=======================================================================
|
||||
BRepAlgoAPI_Algo::BRepAlgoAPI_Algo()
|
||||
:
|
||||
myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()),
|
||||
myErrorStatus(1),
|
||||
myWarningStatus(0),
|
||||
myRunParallel(Standard_False)
|
||||
BOPAlgo_Options(NCollection_BaseAllocator::CommonBaseAllocator())
|
||||
{}
|
||||
//=======================================================================
|
||||
// function:
|
||||
@@ -37,10 +32,7 @@ BRepAlgoAPI_Algo::BRepAlgoAPI_Algo()
|
||||
BRepAlgoAPI_Algo::BRepAlgoAPI_Algo
|
||||
(const Handle(NCollection_BaseAllocator)& theAllocator)
|
||||
:
|
||||
myAllocator(theAllocator),
|
||||
myErrorStatus(1),
|
||||
myWarningStatus(0),
|
||||
myRunParallel(Standard_False)
|
||||
BOPAlgo_Options(theAllocator)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
@@ -51,70 +43,6 @@ BRepAlgoAPI_Algo::~BRepAlgoAPI_Algo()
|
||||
{
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Allocator
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
const Handle(NCollection_BaseAllocator)& BRepAlgoAPI_Algo::Allocator()const
|
||||
{
|
||||
return myAllocator;
|
||||
}
|
||||
//=======================================================================
|
||||
// function: ErrorStatus
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
Standard_Integer BRepAlgoAPI_Algo::ErrorStatus()const
|
||||
{
|
||||
return myErrorStatus;
|
||||
}
|
||||
//=======================================================================
|
||||
// function: WarningStatus
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
Standard_Integer BRepAlgoAPI_Algo::WarningStatus()const
|
||||
{
|
||||
return myWarningStatus;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : SetRunParallel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_Algo::SetRunParallel(const Standard_Boolean theFlag)
|
||||
{
|
||||
myRunParallel=theFlag;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : RunParallel
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean BRepAlgoAPI_Algo::RunParallel()const
|
||||
{
|
||||
return myRunParallel;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : SetProgressIndicator
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_Algo::SetProgressIndicator
|
||||
(const Handle(Message_ProgressIndicator)& theObj)
|
||||
{
|
||||
if (!theObj.IsNull()) {
|
||||
myProgressIndicator=theObj;
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : UserBreak
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_Algo::UserBreak() const
|
||||
{
|
||||
if (myProgressIndicator.IsNull()) {
|
||||
return;
|
||||
}
|
||||
if (myProgressIndicator->UserBreak()) {
|
||||
throw Standard_NotImplemented ("BRepAlgoAPI_Algo::UserBreak(), method is not implemented");
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Shape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
@@ -122,13 +50,3 @@ const TopoDS_Shape& BRepAlgoAPI_Algo::Shape()
|
||||
{
|
||||
return myShape;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Clear
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_Algo::Clear()
|
||||
{
|
||||
}
|
||||
// myErrorStatus
|
||||
//
|
||||
// 1 - object is just initialized
|
||||
|
@@ -23,82 +23,52 @@
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||
#include <BOPAlgo_Options.hxx>
|
||||
class Message_ProgressIndicator;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
//! provides the root interface for algorithms
|
||||
class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape
|
||||
//! Provides the root interface for the API algorithms
|
||||
|
||||
class BRepAlgoAPI_Algo : public BRepBuilderAPI_MakeShape,
|
||||
protected BOPAlgo_Options
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns error status of the algorithm
|
||||
//! ==0 - no errors occured
|
||||
//! !=0 - is in the event of various error conditions
|
||||
Standard_EXPORT Standard_Integer ErrorStatus() const;
|
||||
|
||||
//! Returns warning status of the algorithm
|
||||
//! ==0 - no warning occured
|
||||
//! !=0 - is in the event of various warning conditions
|
||||
Standard_EXPORT Standard_Integer WarningStatus() const;
|
||||
|
||||
Standard_EXPORT const BOPCol_BaseAllocator& Allocator() const;
|
||||
|
||||
//! Set the flag of parallel processing
|
||||
//! if <theFlag> is true the parallel processing is switched on
|
||||
//! if <theFlag> is false the parallel processing is switched off
|
||||
Standard_EXPORT void SetRunParallel (const Standard_Boolean theFlag);
|
||||
|
||||
//! Returns the flag of parallel processing
|
||||
Standard_EXPORT Standard_Boolean RunParallel() const;
|
||||
|
||||
//! Set the Progress Indicator object.
|
||||
Standard_EXPORT void SetProgressIndicator (const Handle(Message_ProgressIndicator)& theObj);
|
||||
|
||||
Standard_EXPORT virtual const TopoDS_Shape& Shape() Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
// Provide access to methods of protected base class BOPAlgo_Options
|
||||
// (inherited as protected to avoid problems with SWIG wrapper)
|
||||
using BOPAlgo_Options::Clear;
|
||||
using BOPAlgo_Options::SetRunParallel;
|
||||
using BOPAlgo_Options::RunParallel;
|
||||
using BOPAlgo_Options::SetFuzzyValue;
|
||||
using BOPAlgo_Options::FuzzyValue;
|
||||
using BOPAlgo_Options::HasErrors;
|
||||
using BOPAlgo_Options::HasWarnings;
|
||||
using BOPAlgo_Options::HasError;
|
||||
using BOPAlgo_Options::HasWarning;
|
||||
using BOPAlgo_Options::DumpErrors;
|
||||
using BOPAlgo_Options::DumpWarnings;
|
||||
using BOPAlgo_Options::ClearWarnings;
|
||||
using BOPAlgo_Options::GetReport;
|
||||
using BOPAlgo_Options::SetProgressIndicator;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Algo();
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
|
||||
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~BRepAlgoAPI_Algo();
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_Algo(const BOPCol_BaseAllocator& theAllocator);
|
||||
|
||||
//! Breaks the execution if the break signal
|
||||
//! is indicated by myProgressIndicator.
|
||||
Standard_EXPORT void UserBreak() const;
|
||||
|
||||
Standard_EXPORT virtual void Clear();
|
||||
|
||||
|
||||
BOPCol_BaseAllocator myAllocator;
|
||||
Standard_Integer myErrorStatus;
|
||||
Standard_Integer myWarningStatus;
|
||||
Standard_Boolean myRunParallel;
|
||||
Handle(Message_ProgressIndicator) myProgressIndicator;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_Algo_HeaderFile
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <BOPAlgo_BOP.hxx>
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Section.hxx>
|
||||
#include <BOPAlgo_Alerts.hxx>
|
||||
#include <BOPDS_Curve.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPDS_Interf.hxx>
|
||||
@@ -179,7 +180,7 @@ BRepAlgoAPI_BooleanOperation::~BRepAlgoAPI_BooleanOperation()
|
||||
void BRepAlgoAPI_BooleanOperation::Clear()
|
||||
{
|
||||
BRepAlgoAPI_BuilderAlgo::Clear();
|
||||
|
||||
//
|
||||
myModifFaces.Clear();
|
||||
myEdgeMap.Clear();
|
||||
}
|
||||
@@ -262,21 +263,22 @@ void BRepAlgoAPI_BooleanOperation::SetAttributes()
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_BooleanOperation::Build()
|
||||
{
|
||||
Standard_Integer iErr, aNbArgs, aNbTools;
|
||||
GetReport()->Clear();
|
||||
|
||||
Standard_Integer aNbArgs, aNbTools;
|
||||
BRepAlgoAPI_DumpOper aDumpOper;
|
||||
//
|
||||
myBuilderCanWork=Standard_False;
|
||||
myErrorStatus=0;
|
||||
NotDone();
|
||||
//
|
||||
aNbArgs=myArguments.Extent();
|
||||
aNbTools=myTools.Extent();
|
||||
if (aNbArgs<1 && aNbTools<1) {
|
||||
myErrorStatus=2;
|
||||
AddError (new BOPAlgo_AlertTooFewArguments);
|
||||
return;
|
||||
}
|
||||
if (myOperation==BOPAlgo_UNKNOWN) {
|
||||
myErrorStatus=6;
|
||||
AddError (new BOPAlgo_AlertBOPNotSet);
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -313,9 +315,10 @@ void BRepAlgoAPI_BooleanOperation::Build()
|
||||
SetAttributes();
|
||||
//
|
||||
myDSFiller->Perform();
|
||||
iErr=myDSFiller->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=100+iErr;
|
||||
//
|
||||
GetReport()->Merge (myDSFiller->GetReport());
|
||||
if (HasErrors())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}// if (myEntryType) {
|
||||
@@ -331,6 +334,7 @@ void BRepAlgoAPI_BooleanOperation::Build()
|
||||
//
|
||||
if (myBuilder) {
|
||||
delete myBuilder;
|
||||
myBuilder = NULL;
|
||||
}
|
||||
//
|
||||
BOPAlgo_BOP *pBOP;
|
||||
@@ -351,9 +355,10 @@ void BRepAlgoAPI_BooleanOperation::Build()
|
||||
myBuilder->SetProgressIndicator(myProgressIndicator);
|
||||
//
|
||||
myBuilder->PerformWithFiller(*myDSFiller);
|
||||
iErr = myBuilder->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=200+iErr;
|
||||
//
|
||||
GetReport()->Merge (myBuilder->GetReport());
|
||||
if (HasErrors())
|
||||
{
|
||||
return;
|
||||
}
|
||||
//
|
||||
@@ -698,4 +703,3 @@ void BRepAlgoAPI_DumpOper::Dump (const TopoDS_Shape& theShape1,
|
||||
fprintf(afile, "%s\n",aBopString.ToCString());
|
||||
fclose(afile);
|
||||
}
|
||||
//XXXX
|
||||
|
@@ -33,10 +33,16 @@ class TopoDS_Shape;
|
||||
|
||||
//! The abstract class BooleanOperation is the root
|
||||
//! class of Boolean Operations (see Overview).
|
||||
//! Boolean Operations algorithm is divided onto two parts.
|
||||
//! - The first one is computing interference between arguments.
|
||||
//! - The second one is building the result of operation.
|
||||
//! The class BooleanOperation provides API level of both parts
|
||||
//! Boolean Operations algorithm is divided onto two parts:<br>
|
||||
//! - The first one is computing interference between arguments;<br>
|
||||
//! - The second one is building the result of operation;<br>
|
||||
//! The class BooleanOperation provides API level of both parts.<br>
|
||||
//!
|
||||
//! Additionally to the errors of the parent class the algorithm
|
||||
//! returns the following Error statuses:<br>
|
||||
//! - 0 - in case of success;<br>
|
||||
//! - *BOPAlgo_AlertBOPNotSet* - in case the type of Boolean Operation is not set.<br>
|
||||
//!
|
||||
class BRepAlgoAPI_BooleanOperation : public BRepAlgoAPI_BuilderAlgo
|
||||
{
|
||||
public:
|
||||
@@ -108,11 +114,7 @@ Standard_EXPORT virtual ~BRepAlgoAPI_BooleanOperation();
|
||||
//! For use in BRepNaming.
|
||||
Standard_EXPORT virtual Standard_Boolean HasDeleted() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_BooleanOperation();
|
||||
|
@@ -28,7 +28,6 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo()
|
||||
myEntryType(1),
|
||||
myDSFiller(NULL),
|
||||
myBuilder(NULL),
|
||||
myFuzzyValue(0.),
|
||||
myNonDestructive(Standard_False),
|
||||
myGlue(BOPAlgo_GlueOff)
|
||||
{}
|
||||
@@ -42,7 +41,6 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo
|
||||
BRepAlgoAPI_Algo(),
|
||||
myEntryType(0),
|
||||
myBuilder(NULL),
|
||||
myFuzzyValue(0.),
|
||||
myNonDestructive(Standard_False),
|
||||
myGlue(BOPAlgo_GlueOff)
|
||||
{
|
||||
@@ -58,22 +56,6 @@ BRepAlgoAPI_BuilderAlgo::~BRepAlgoAPI_BuilderAlgo()
|
||||
Clear();
|
||||
}
|
||||
//=======================================================================
|
||||
//function : SetFuzzyValue
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_BuilderAlgo::SetFuzzyValue(const Standard_Real theFuzz)
|
||||
{
|
||||
myFuzzyValue = (theFuzz < 0.) ? 0. : theFuzz;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : FuzzyValue
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Real BRepAlgoAPI_BuilderAlgo::FuzzyValue() const
|
||||
{
|
||||
return myFuzzyValue;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : SetNonDestructive
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
@@ -111,6 +93,7 @@ BOPAlgo_GlueEnum BRepAlgoAPI_BuilderAlgo::Glue() const
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_BuilderAlgo::Clear()
|
||||
{
|
||||
BRepAlgoAPI_Algo::Clear();
|
||||
if (myDSFiller && myEntryType) {
|
||||
delete myDSFiller;
|
||||
myDSFiller=NULL;
|
||||
@@ -143,10 +126,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Arguments()const
|
||||
//=======================================================================
|
||||
void BRepAlgoAPI_BuilderAlgo::Build()
|
||||
{
|
||||
Standard_Integer iErr;
|
||||
//
|
||||
NotDone();
|
||||
myErrorStatus=0;
|
||||
//
|
||||
Clear();
|
||||
//
|
||||
@@ -165,14 +145,17 @@ void BRepAlgoAPI_BuilderAlgo::Build()
|
||||
myDSFiller->SetGlue(myGlue);
|
||||
//
|
||||
myDSFiller->Perform();
|
||||
iErr=myDSFiller->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=100+iErr;
|
||||
//
|
||||
GetReport()->Merge (myDSFiller->GetReport());
|
||||
if (HasErrors())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}// if (myEntryType) {
|
||||
//
|
||||
if (myBuilder) {
|
||||
delete myBuilder;
|
||||
myBuilder = NULL;
|
||||
}
|
||||
myBuilder=new BOPAlgo_Builder(myAllocator);
|
||||
//
|
||||
@@ -182,10 +165,8 @@ void BRepAlgoAPI_BuilderAlgo::Build()
|
||||
myBuilder->SetProgressIndicator(myProgressIndicator);
|
||||
//
|
||||
myBuilder->PerformWithFiller(*myDSFiller);
|
||||
iErr=myBuilder->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus=200+iErr;
|
||||
}
|
||||
//
|
||||
GetReport()->Merge (myBuilder->GetReport());
|
||||
//
|
||||
Done();
|
||||
myShape=myBuilder->Shape();
|
||||
|
@@ -32,7 +32,16 @@ class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The clsss contains API level of General Fuse algorithm
|
||||
//! The class contains API level of the General Fuse algorithm.<br>
|
||||
//!
|
||||
//! It returns the following Error statuses:<br>
|
||||
//! - 0 - in case of success;<br>
|
||||
//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the operation;<br>
|
||||
//! - *BOPAlgo_AlertIntersectionFailed* - in case the intersection of the arguments has failed;<br>
|
||||
//! - *BOPAlgo_AlertBuilderFailed* - in case building of the result shape has failed.<br>
|
||||
//!
|
||||
//! Warnings statuses from underlying DS Filler and Builder algorithms
|
||||
//! are collected in the report.
|
||||
class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo
|
||||
{
|
||||
public:
|
||||
@@ -47,12 +56,6 @@ Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
|
||||
//! Empty constructor
|
||||
Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF);
|
||||
|
||||
//! Sets the additional tolerance
|
||||
Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
|
||||
|
||||
//! Returns the additional tolerance
|
||||
Standard_EXPORT Standard_Real FuzzyValue() const;
|
||||
|
||||
//! Sets the flag that defines the mode of treatment.
|
||||
//! In non-destructive mode the argument shapes are not modified. Instead
|
||||
//! a copy of a sub-shape is created in the result if it is needed to be updated.
|
||||
@@ -105,19 +108,25 @@ Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
|
||||
//! protected methods
|
||||
Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
|
||||
|
||||
//! Returns the Intersection tool
|
||||
const BOPAlgo_PPaveFiller& DSFiller() const
|
||||
{
|
||||
return myDSFiller;
|
||||
}
|
||||
|
||||
|
||||
//! Returns the Building tool
|
||||
const BOPAlgo_PBuilder& Builder() const
|
||||
{
|
||||
return myBuilder;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
|
||||
|
||||
|
||||
Standard_Integer myEntryType;
|
||||
BOPAlgo_PPaveFiller myDSFiller;
|
||||
BOPAlgo_PBuilder myBuilder;
|
||||
Standard_Real myFuzzyValue;
|
||||
Standard_Boolean myNonDestructive;
|
||||
TopTools_ListOfShape myArguments;
|
||||
BOPAlgo_GlueEnum myGlue;
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <BOPAlgo_PaveFiller.hxx>
|
||||
#include <BOPAlgo_Splitter.hxx>
|
||||
#include <BOPAlgo_Alerts.hxx>
|
||||
|
||||
//=======================================================================
|
||||
// function: Empty constructor
|
||||
@@ -64,16 +65,15 @@ const TopTools_ListOfShape& BRepAlgoAPI_Splitter::Tools() const
|
||||
void BRepAlgoAPI_Splitter::Build()
|
||||
{
|
||||
NotDone();
|
||||
myErrorStatus = 0;
|
||||
//
|
||||
Clear();
|
||||
//
|
||||
if (myArguments.IsEmpty() ||
|
||||
(myArguments.Extent() + myTools.Extent()) < 2) {
|
||||
myErrorStatus = 1;
|
||||
AddError (new BOPAlgo_AlertTooFewArguments);
|
||||
return;
|
||||
}
|
||||
//
|
||||
Clear();
|
||||
//
|
||||
if (myEntryType) {
|
||||
if (myDSFiller) {
|
||||
delete myDSFiller;
|
||||
@@ -100,9 +100,11 @@ void BRepAlgoAPI_Splitter::Build()
|
||||
myDSFiller->SetGlue(myGlue);
|
||||
//
|
||||
myDSFiller->Perform();
|
||||
Standard_Integer iErr = myDSFiller->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus = 2;
|
||||
//
|
||||
GetReport()->Merge (myDSFiller->GetReport());
|
||||
if (HasErrors())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -121,10 +123,8 @@ void BRepAlgoAPI_Splitter::Build()
|
||||
myBuilder->SetProgressIndicator(myProgressIndicator);
|
||||
//
|
||||
myBuilder->PerformWithFiller(*myDSFiller);
|
||||
Standard_Integer iErr = myBuilder->ErrorStatus();
|
||||
if (iErr) {
|
||||
myErrorStatus = 3;
|
||||
}
|
||||
//
|
||||
GetReport()->Merge (myBuilder->GetReport());
|
||||
//
|
||||
Done();
|
||||
myShape = myBuilder->Shape();
|
||||
|
@@ -44,9 +44,9 @@
|
||||
//!
|
||||
//! The algorithm returns the following Error statuses:<br>
|
||||
//! - 0 - in case of success;<br>
|
||||
//! - 1 - in case there is no enough arguments for the operation;<br>
|
||||
//! - 2 - in case the Intersection of the arguments has failed;<br>
|
||||
//! - 3 - in case the Building of the result has failed.
|
||||
//! - *BOPAlgo_AlertTooFewArguments* - in case there is no enough arguments for the operation;<br>
|
||||
//! - *BOPAlgo_AlertIntersectionFailed* - in case the Intersection of the arguments has failed;<br>
|
||||
//! - *BOPAlgo_AlertBuilderFailed* - in case the Building of the result has failed.
|
||||
class BRepAlgoAPI_Splitter : public BRepAlgoAPI_BuilderAlgo
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user