Open CASCADE Technology 7.8.2.dev
BOPAlgo_Options Class Reference

The class provides the following options for the algorithms in Boolean Component: More...

#include <BOPAlgo_Options.hxx>

Inheritance diagram for BOPAlgo_Options:

Public Member Functions

 BOPAlgo_Options ()
 Empty constructor.
 
 BOPAlgo_Options (const Handle< NCollection_BaseAllocator > &theAllocator)
 Constructor with allocator.
 
virtual ~BOPAlgo_Options ()
 Destructor.
 
const Handle< NCollection_BaseAllocator > & Allocator () const
 Returns allocator.
 
virtual void Clear ()
 Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.
 
Error reporting mechanism
void AddError (const Handle< Message_Alert > &theAlert)
 Adds the alert as error (fail)
 
void AddWarning (const Handle< Message_Alert > &theAlert)
 Adds the alert as warning.
 
Standard_Boolean HasErrors () const
 Returns true if algorithm has failed.
 
Standard_Boolean HasError (const Handle< Standard_Type > &theType) const
 Returns true if algorithm has generated error of specified type.
 
Standard_Boolean HasWarnings () const
 Returns true if algorithm has generated some warning alerts.
 
Standard_Boolean HasWarning (const Handle< Standard_Type > &theType) const
 Returns true if algorithm has generated warning of specified type.
 
const Handle< Message_Report > & GetReport () const
 Returns report collecting all errors and warnings.
 
void DumpErrors (Standard_OStream &theOS) const
 Dumps the error status into the given stream.
 
void DumpWarnings (Standard_OStream &theOS) const
 Dumps the warning statuses into the given stream.
 
void ClearWarnings ()
 Clears the warnings of the algorithm.
 
Fuzzy tolerance
void SetFuzzyValue (const Standard_Real theFuzz)
 Sets the additional tolerance.
 
Standard_Real FuzzyValue () const
 Returns the additional tolerance.
 

Usage of Oriented Bounding boxes

Handle< NCollection_BaseAllocatormyAllocator
 Enables/Disables the usage of OBB.
 
Handle< Message_ReportmyReport
 Enables/Disables the usage of OBB.
 
Standard_Boolean myRunParallel
 Enables/Disables the usage of OBB.
 
Standard_Real myFuzzyValue
 Enables/Disables the usage of OBB.
 
Standard_Boolean myUseOBB
 Enables/Disables the usage of OBB.
 
void SetUseOBB (const Standard_Boolean theUseOBB)
 Enables/Disables the usage of OBB.
 
Standard_Boolean UseOBB () const
 Returns the flag defining usage of OBB.
 
Standard_Boolean UserBreak (const Message_ProgressScope &thePS)
 Adds error to the report if the break signal was caught. Returns true in this case, false otherwise.
 

Parallel processing mode

void SetRunParallel (const Standard_Boolean theFlag)
 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_Boolean RunParallel () const
 Returns the flag of parallel processing.
 
static Standard_Boolean GetParallelMode ()
 Gets the global parallel mode.
 
static void SetParallelMode (const Standard_Boolean theNewMode)
 Sets the global parallel mode.
 

Detailed Description

The class provides the following options for the algorithms in Boolean Component:

  • Memory allocation tool - tool for memory allocations;
  • Error and warning reporting - allows recording warnings and errors occurred during the operation. Error means that the algorithm has failed.
  • Parallel processing mode - provides the possibility to perform operation in parallel mode;
  • Fuzzy tolerance - additional tolerance for the operation to detect touching or coinciding cases;
  • Using the Oriented Bounding Boxes - Allows using the Oriented Bounding Boxes of the shapes for filtering the intersections.

Constructor & Destructor Documentation

◆ BOPAlgo_Options() [1/2]

BOPAlgo_Options::BOPAlgo_Options ( )

Empty constructor.

◆ BOPAlgo_Options() [2/2]

BOPAlgo_Options::BOPAlgo_Options ( const Handle< NCollection_BaseAllocator > & theAllocator)

Constructor with allocator.

◆ ~BOPAlgo_Options()

virtual BOPAlgo_Options::~BOPAlgo_Options ( )
virtual

Destructor.

Member Function Documentation

◆ AddError()

void BOPAlgo_Options::AddError ( const Handle< Message_Alert > & theAlert)
inline

Adds the alert as error (fail)

◆ AddWarning()

void BOPAlgo_Options::AddWarning ( const Handle< Message_Alert > & theAlert)
inline

Adds the alert as warning.

◆ Allocator()

const Handle< NCollection_BaseAllocator > & BOPAlgo_Options::Allocator ( ) const
inline

Returns allocator.

◆ Clear()

virtual void BOPAlgo_Options::Clear ( )
inlinevirtual

◆ ClearWarnings()

void BOPAlgo_Options::ClearWarnings ( )
inline

Clears the warnings of the algorithm.

◆ DumpErrors()

void BOPAlgo_Options::DumpErrors ( Standard_OStream & theOS) const

Dumps the error status into the given stream.

◆ DumpWarnings()

void BOPAlgo_Options::DumpWarnings ( Standard_OStream & theOS) const

Dumps the warning statuses into the given stream.

◆ FuzzyValue()

Standard_Real BOPAlgo_Options::FuzzyValue ( ) const
inline

Returns the additional tolerance.

◆ GetParallelMode()

static Standard_Boolean BOPAlgo_Options::GetParallelMode ( )
static

Gets the global parallel mode.

◆ GetReport()

const Handle< Message_Report > & BOPAlgo_Options::GetReport ( ) const
inline

Returns report collecting all errors and warnings.

◆ HasError()

Standard_Boolean BOPAlgo_Options::HasError ( const Handle< Standard_Type > & theType) const
inline

Returns true if algorithm has generated error of specified type.

◆ HasErrors()

Standard_Boolean BOPAlgo_Options::HasErrors ( ) const
inline

Returns true if algorithm has failed.

◆ HasWarning()

Standard_Boolean BOPAlgo_Options::HasWarning ( const Handle< Standard_Type > & theType) const
inline

Returns true if algorithm has generated warning of specified type.

◆ HasWarnings()

Standard_Boolean BOPAlgo_Options::HasWarnings ( ) const
inline

Returns true if algorithm has generated some warning alerts.

◆ RunParallel()

Standard_Boolean BOPAlgo_Options::RunParallel ( ) const
inline

Returns the flag of parallel processing.

◆ SetFuzzyValue()

void BOPAlgo_Options::SetFuzzyValue ( const Standard_Real theFuzz)

Sets the additional tolerance.

◆ SetParallelMode()

static void BOPAlgo_Options::SetParallelMode ( const Standard_Boolean theNewMode)
static

Sets the global parallel mode.

◆ SetRunParallel()

void BOPAlgo_Options::SetRunParallel ( const Standard_Boolean theFlag)
inline

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.

◆ SetUseOBB()

void BOPAlgo_Options::SetUseOBB ( const Standard_Boolean theUseOBB)
inline

Enables/Disables the usage of OBB.

◆ UseOBB()

Standard_Boolean BOPAlgo_Options::UseOBB ( ) const
inline

Returns the flag defining usage of OBB.

◆ UserBreak()

Standard_Boolean BOPAlgo_Options::UserBreak ( const Message_ProgressScope & thePS)
protected

Adds error to the report if the break signal was caught. Returns true in this case, false otherwise.

Field Documentation

◆ myAllocator

Handle< NCollection_BaseAllocator > BOPAlgo_Options::myAllocator
protected

Enables/Disables the usage of OBB.

◆ myFuzzyValue

Standard_Real BOPAlgo_Options::myFuzzyValue
protected

Enables/Disables the usage of OBB.

◆ myReport

Handle< Message_Report > BOPAlgo_Options::myReport
protected

Enables/Disables the usage of OBB.

◆ myRunParallel

Standard_Boolean BOPAlgo_Options::myRunParallel
protected

Enables/Disables the usage of OBB.

◆ myUseOBB

Standard_Boolean BOPAlgo_Options::myUseOBB
protected

Enables/Disables the usage of OBB.


The documentation for this class was generated from the following file: