Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
BRepAlgoAPI_Check Class Reference

The class Check provides a diagnostic tool for checking the validity of the single shape or couple of shapes. The shapes are checked on: More...

#include <BRepAlgoAPI_Check.hxx>

Inheritance diagram for BRepAlgoAPI_Check:
Inheritance graph
[legend]

Public Member Functions

Constructors

Empty constructor.

 BRepAlgoAPI_Check ()
 Constructor for checking single shape.
 
 ~BRepAlgoAPI_Check () override
 Constructor for checking single shape.
 
 BRepAlgoAPI_Check (const TopoDS_Shape &theS, const bool bTestSE=true, const bool bTestSI=true, const Message_ProgressRange &theRange=Message_ProgressRange())
 Constructor for checking single shape.
 
 BRepAlgoAPI_Check (const TopoDS_Shape &theS1, const TopoDS_Shape &theS2, const BOPAlgo_Operation theOp=BOPAlgo_UNKNOWN, const bool bTestSE=true, const bool bTestSI=true, const Message_ProgressRange &theRange=Message_ProgressRange())
 Constructor for checking the couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.
 
Initializing the algorithm

Initializes the algorithm with single shape.

Parameters
[in]theS- the shape to check;
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;
void SetData (const TopoDS_Shape &theS, const bool bTestSE=true, const bool bTestSI=true)
 Initializes the algorithm with couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.
 
void SetData (const TopoDS_Shape &theS1, const TopoDS_Shape &theS2, const BOPAlgo_Operation theOp=BOPAlgo_UNKNOWN, const bool bTestSE=true, const bool bTestSI=true)
 Initializes the algorithm with couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.
 
Performing the operation

Performs the check.

void Perform (const Message_ProgressRange &theRange=Message_ProgressRange())
 
Getting the results.

Shows whether shape(s) valid or not.

bool IsValid ()
 Returns faulty shapes.
 
const NCollection_List< BOPAlgo_CheckResult > & Result ()
 Returns faulty shapes.
 
- Public Member Functions inherited from BOPAlgo_Options
 BOPAlgo_Options ()
 Empty constructor.
 
 BOPAlgo_Options (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Constructor with allocator.
 
virtual ~BOPAlgo_Options ()
 Destructor.
 
const occ::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.
 
void AddError (const occ::handle< Message_Alert > &theAlert)
 Adds the alert as error (fail)
 
void AddWarning (const occ::handle< Message_Alert > &theAlert)
 Adds the alert as warning.
 
bool HasErrors () const
 Returns true if algorithm has failed.
 
bool HasError (const occ::handle< Standard_Type > &theType) const
 Returns true if algorithm has generated error of specified type.
 
bool HasWarnings () const
 Returns true if algorithm has generated some warning alerts.
 
bool HasWarning (const occ::handle< Standard_Type > &theType) const
 Returns true if algorithm has generated warning of specified type.
 
const occ::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.
 
void SetFuzzyValue (const double theFuzz)
 Sets the additional tolerance.
 
double FuzzyValue () const
 Returns the additional tolerance.
 
void SetUseOBB (const bool theUseOBB)
 Enables/Disables the usage of OBB.
 
bool UseOBB () const
 Returns the flag defining usage of OBB.
 
void SetRunParallel (const bool 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.
 
bool RunParallel () const
 Returns the flag of parallel processing.
 

Protected Attributes

Fields
TopoDS_Shape myS1
 The first shape.
 
TopoDS_Shape myS2
 The second shape.
 
bool myTestSE
 Flag defining whether to look for small edges in the given shapes or not.
 
bool myTestSI
 Flag defining whether to check the input edges on self-interference or not.
 
BOPAlgo_Operation myOperation
 Type of Boolean operation for which the validity of input shapes should be checked.
 
NCollection_List< BOPAlgo_CheckResultmyFaultyShapes
 Found faulty shapes.
 
- Protected Attributes inherited from BOPAlgo_Options
occ::handle< NCollection_BaseAllocatormyAllocator
 Enables/Disables the usage of OBB.
 
occ::handle< Message_ReportmyReport
 Enables/Disables the usage of OBB.
 
bool myRunParallel
 Enables/Disables the usage of OBB.
 
double myFuzzyValue
 Enables/Disables the usage of OBB.
 
bool myUseOBB
 Enables/Disables the usage of OBB.
 

Additional Inherited Members

- Static Public Member Functions inherited from BOPAlgo_Options
static bool GetParallelMode ()
 Gets the global parallel mode.
 
static void SetParallelMode (const bool theNewMode)
 Sets the global parallel mode.
 
- Protected Member Functions inherited from BOPAlgo_Options
bool UserBreak (const Message_ProgressScope &thePS)
 Adds error to the report if the break signal was caught. Returns true in this case, false otherwise.
 

Detailed Description

The class Check provides a diagnostic tool for checking the validity of the single shape or couple of shapes. The shapes are checked on:

The class provides two ways of checking shape(-s)

  1. Constructors BRepAlgoAPI_Check aCh(theS); bool isValid = aCh.IsValid();
  2. Methods SetData and Perform BRepAlgoAPI_Check aCh; aCh.SetData(theS1, theS2, BOPAlgo_FUSE, false); aCh.Perform(); bool isValid = aCh.IsValid();

Constructor & Destructor Documentation

◆ BRepAlgoAPI_Check() [1/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( )

Constructor for checking single shape.

Parameters
[in]theS- the shape to check;
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;
[in]theRange- parameter to use progress indicator

◆ ~BRepAlgoAPI_Check()

BRepAlgoAPI_Check::~BRepAlgoAPI_Check ( )
override

Constructor for checking single shape.

Parameters
[in]theS- the shape to check;
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;
[in]theRange- parameter to use progress indicator

◆ BRepAlgoAPI_Check() [2/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( const TopoDS_Shape & theS,
const bool bTestSE = true,
const bool bTestSI = true,
const Message_ProgressRange & theRange = Message_ProgressRange() )

Constructor for checking single shape.

Parameters
[in]theS- the shape to check;
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;
[in]theRange- parameter to use progress indicator

◆ BRepAlgoAPI_Check() [3/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( const TopoDS_Shape & theS1,
const TopoDS_Shape & theS2,
const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN,
const bool bTestSE = true,
const bool bTestSI = true,
const Message_ProgressRange & theRange = Message_ProgressRange() )

Constructor for checking the couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.

Parameters
[in]theS1- the first shape to check;
[in]theS2- the second shape to check;
[in]theOp- the type of Boolean Operation for which the validity of given shapes should be checked.
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;
[in]theRange- parameter to use progress indicator

Member Function Documentation

◆ IsValid()

bool BRepAlgoAPI_Check::IsValid ( )
inline

Returns faulty shapes.

◆ Perform()

void BRepAlgoAPI_Check::Perform ( const Message_ProgressRange & theRange = Message_ProgressRange())

◆ Result()

const NCollection_List< BOPAlgo_CheckResult > & BRepAlgoAPI_Check::Result ( )
inline

Returns faulty shapes.

◆ SetData() [1/2]

void BRepAlgoAPI_Check::SetData ( const TopoDS_Shape & theS,
const bool bTestSE = true,
const bool bTestSI = true )
inline

Initializes the algorithm with couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.

Parameters
[in]theS1- the first shape to check;
[in]theS2- the second shape to check;
[in]theOp- the type of Boolean Operation for which the validity of given shapes should be checked.
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;

◆ SetData() [2/2]

void BRepAlgoAPI_Check::SetData ( const TopoDS_Shape & theS1,
const TopoDS_Shape & theS2,
const BOPAlgo_Operation theOp = BOPAlgo_UNKNOWN,
const bool bTestSE = true,
const bool bTestSI = true )
inline

Initializes the algorithm with couple of shapes. Additionally to the validity checks of each given shape, the types of the given shapes will be checked on validity for Boolean operation of given type.

Parameters
[in]theS1- the first shape to check;
[in]theS2- the second shape to check;
[in]theOp- the type of Boolean Operation for which the validity of given shapes should be checked.
[in]bTestSE- flag which specifies whether to check the shape on small edges or not; by default it is set to TRUE;
[in]bTestSI- flag which specifies whether to check the shape on self-interference or not; by default it is set to TRUE;

Field Documentation

◆ myFaultyShapes

NCollection_List<BOPAlgo_CheckResult> BRepAlgoAPI_Check::myFaultyShapes
protected

Found faulty shapes.

◆ myOperation

BOPAlgo_Operation BRepAlgoAPI_Check::myOperation
protected

Type of Boolean operation for which the validity of input shapes should be checked.

◆ myS1

TopoDS_Shape BRepAlgoAPI_Check::myS1
protected

The first shape.

◆ myS2

TopoDS_Shape BRepAlgoAPI_Check::myS2
protected

The second shape.

◆ myTestSE

bool BRepAlgoAPI_Check::myTestSE
protected

Flag defining whether to look for small edges in the given shapes or not.

◆ myTestSI

bool BRepAlgoAPI_Check::myTestSI
protected

Flag defining whether to check the input edges on self-interference or not.


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