Open CASCADE Technology  7.2.0
Public Member Functions | Protected Member Functions | Protected Attributes

BRepAlgoAPI_Check Class Reference

The class Check provides a diagnostic tool for checking single shape or couple of shapes. Single shape is checking on topological validity, small edges and self-interference. For couple of shapes added check on validity for boolean operation of given type. More...

#include <BRepAlgoAPI_Check.hxx>

Inheritance diagram for BRepAlgoAPI_Check:
Inheritance graph
[legend]

Public Member Functions

 BRepAlgoAPI_Check ()
 Empty constructor. More...
 
virtual ~BRepAlgoAPI_Check ()
 
 BRepAlgoAPI_Check (const TopoDS_Shape &theS, const Standard_Boolean bTestSE=Standard_True, const Standard_Boolean bTestSI=Standard_True)
 Constructor for checking single shape. It calls methods Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI) and Perform(). Params: theS - the shape that should be checked; bTestSE - flag that specifies whether check on small edges should be performed; by default it is set to TRUE; bTestSI - flag that specifies whether check on self-interference should be performed; by default it is set to TRUE;. More...
 
 BRepAlgoAPI_Check (const TopoDS_Shape &theS1, const TopoDS_Shape &theS2, const BOPAlgo_Operation theOp=BOPAlgo_UNKNOWN, const Standard_Boolean bTestSE=Standard_True, const Standard_Boolean bTestSI=Standard_True)
 Constructor for couple of shapes. It calls methods Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform(). Params: theS1, theS2 - the initial shapes. theOp - the type of Boolean Operation; if it is not defined (set to UNKNOWN) for each shape performed check as for single shape. bTestSE - flag that specifies whether check on small edges should be performed; by default it is set to TRUE; bTestSI - flag that specifies whether check on self-interference should be performed; by default it is set to TRUE;. More...
 
void SetData (const TopoDS_Shape &theS, const Standard_Boolean bTestSE=Standard_True, const Standard_Boolean bTestSI=Standard_True)
 Sets data for check by Init method. The method provides alternative way for checking single shape. More...
 
void SetData (const TopoDS_Shape &theS1, const TopoDS_Shape &theS2, const BOPAlgo_Operation theOp=BOPAlgo_UNKNOWN, const Standard_Boolean bTestSE=Standard_True, const Standard_Boolean bTestSI=Standard_True)
 Sets data for check by Init method. The method provides alternative way for checking couple of shapes. More...
 
void Perform ()
 Performs the check. More...
 
Standard_Boolean IsValid ()
 Shows whether shape(s) valid or not. More...
 
const BOPAlgo_ListOfCheckResultResult ()
 Returns faulty shapes. More...
 
void SetFuzzyValue (const Standard_Real theFuzz)
 Sets the additional tolerance. More...
 
Standard_Real FuzzyValue () const
 Returns the additional tolerance. More...
 
- Public Member Functions inherited from BRepAlgoAPI_Algo
virtual const TopoDS_ShapeShape () override
 Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built. More...
 
- Public Member Functions inherited from BRepBuilderAPI_MakeShape
virtual void Build ()
 This is called by Shape(). It does nothing but may be redefined. More...
 
 operator TopoDS_Shape ()
 
virtual const TopTools_ListOfShapeGenerated (const TopoDS_Shape &S)
 Returns the list of shapes generated from the shape <S>. More...
 
virtual const TopTools_ListOfShapeModified (const TopoDS_Shape &S)
 Returns the list of shapes modified from the shape <S>. More...
 
virtual Standard_Boolean IsDeleted (const TopoDS_Shape &S)
 Returns true if the shape S has been deleted. More...
 
- Public Member Functions inherited from BRepBuilderAPI_Command
virtual ~BRepBuilderAPI_Command ()
 
virtual Standard_Boolean IsDone () const
 
void Check () const
 Raises NotDone if done is false. More...
 

Protected Member Functions

void Init (const TopoDS_Shape &theS1, const TopoDS_Shape &theS2, const BOPAlgo_Operation theOp, const Standard_Boolean bTestSE, const Standard_Boolean bTestSI)
 Initialyzes data. More...
 
- Protected Member Functions inherited from BRepAlgoAPI_Algo
 BRepAlgoAPI_Algo ()
 Empty constructor. More...
 
virtual ~BRepAlgoAPI_Algo ()
 Destructor. More...
 
 BRepAlgoAPI_Algo (const BOPCol_BaseAllocator &theAllocator)
 Empty constructor. More...
 
- Protected Member Functions inherited from BRepBuilderAPI_MakeShape
 BRepBuilderAPI_MakeShape ()
 
- Protected Member Functions inherited from BRepBuilderAPI_Command
 BRepBuilderAPI_Command ()
 Set done to False. More...
 
void Done ()
 Set done to true. More...
 
void NotDone ()
 Set done to false. More...
 
- Protected Member Functions inherited from BOPAlgo_Options
void UserBreak () const
 Breaks the execution if the break signal is indicated by myProgressIndicator. More...
 
 BOPAlgo_Options ()
 Empty constructor. More...
 
 BOPAlgo_Options (const BOPCol_BaseAllocator &theAllocator)
 Constructor with allocator. More...
 
virtual ~BOPAlgo_Options ()
 Destructor. More...
 
const BOPCol_BaseAllocatorAllocator () const
 Returns allocator. More...
 
virtual void Clear ()
 Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared. More...
 
void AddError (const Handle< Message_Alert > &theAlert)
 Adds the alert as error (fail) More...
 
void AddWarning (const Handle< Message_Alert > &theAlert)
 Adds the alert as warning. More...
 
Standard_Boolean HasErrors () const
 Returns true if algorithm has failed. More...
 
Standard_Boolean HasError (const Handle< Standard_Type > &theType) const
 Returns true if algorithm has generated error of specified type. More...
 
Standard_Boolean HasWarnings () const
 Returns true if algorithm has generated some warning alerts. More...
 
Standard_Boolean HasWarning (const Handle< Standard_Type > &theType) const
 Returns true if algorithm has generated warning of specified type. More...
 
const Handle< Message_Report > & GetReport () const
 Returns report collecting all errors and warnings. More...
 
void DumpErrors (Standard_OStream &theOS) const
 Dumps the error status into the given stream. More...
 
void DumpWarnings (Standard_OStream &theOS) const
 Dumps the warning statuses into the given stream. More...
 
void ClearWarnings ()
 Clears the warnings of the algorithm. More...
 
void SetFuzzyValue (const Standard_Real theFuzz)
 Sets the additional tolerance. More...
 
Standard_Real FuzzyValue () const
 Returns the additional tolerance. More...
 
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. More...
 
Standard_Boolean RunParallel () const
 Returns the flag of parallel processing. More...
 
void SetProgressIndicator (const Handle< Message_ProgressIndicator > &theObj)
 Set the Progress Indicator object. More...
 

Protected Attributes

TopoDS_Shape myS1
 
TopoDS_Shape myS2
 
BOPAlgo_PArgumentAnalyzer myAnalyzer
 
BOPAlgo_ListOfCheckResult myResult
 
Standard_Real myFuzzyValue
 
- Protected Attributes inherited from BRepBuilderAPI_MakeShape
TopoDS_Shape myShape
 
TopTools_ListOfShape myGenerated
 
- Protected Attributes inherited from BOPAlgo_Options
BOPCol_BaseAllocator myAllocator
 Set the Progress Indicator object. More...
 
Handle< Message_ReportmyReport
 Set the Progress Indicator object. More...
 
Standard_Boolean myRunParallel
 Set the Progress Indicator object. More...
 
Standard_Real myFuzzyValue
 Set the Progress Indicator object. More...
 
Handle< Message_ProgressIndicatormyProgressIndicator
 Set the Progress Indicator object. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from BOPAlgo_Options
static Standard_Boolean GetParallelMode ()
 Gets the global parallel mode. More...
 
static void SetParallelMode (const Standard_Boolean theNewMode)
 Sets the global parallel mode. More...
 

Detailed Description

The class Check provides a diagnostic tool for checking single shape or couple of shapes. Single shape is checking on topological validity, small edges and self-interference. For couple of shapes added check on validity for boolean operation of given type.

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

  1. Constructors BRepAlgoAPI_Check aCh(theS); Standard_Boolean bV=aCh.IsValid();
  2. Methods SetData and Perform BRepAlgoAPI_Check aCh; aCh.SetData(theS1, theS2, BOPAlgo_FUSE, Standard_False); aCh.Perform(); Standard_Boolean bV=aCh.IsValid();

Constructor & Destructor Documentation

◆ BRepAlgoAPI_Check() [1/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( )

Empty constructor.

◆ ~BRepAlgoAPI_Check()

virtual BRepAlgoAPI_Check::~BRepAlgoAPI_Check ( )
virtual

◆ BRepAlgoAPI_Check() [2/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( const TopoDS_Shape theS,
const Standard_Boolean  bTestSE = Standard_True,
const Standard_Boolean  bTestSI = Standard_True 
)

Constructor for checking single shape. It calls methods Init(theS, TopoDS_Shape(), BOPAlgo_UNKNOWN, bTestSE, bTestSI) and Perform(). Params: theS - the shape that should be checked; bTestSE - flag that specifies whether check on small edges should be performed; by default it is set to TRUE; bTestSI - flag that specifies whether check on self-interference should be performed; by default it is set to TRUE;.

◆ BRepAlgoAPI_Check() [3/3]

BRepAlgoAPI_Check::BRepAlgoAPI_Check ( const TopoDS_Shape theS1,
const TopoDS_Shape theS2,
const BOPAlgo_Operation  theOp = BOPAlgo_UNKNOWN,
const Standard_Boolean  bTestSE = Standard_True,
const Standard_Boolean  bTestSI = Standard_True 
)

Constructor for couple of shapes. It calls methods Init(theS1, theS2, theOp, bTestSE, bTestSI) and Perform(). Params: theS1, theS2 - the initial shapes. theOp - the type of Boolean Operation; if it is not defined (set to UNKNOWN) for each shape performed check as for single shape. bTestSE - flag that specifies whether check on small edges should be performed; by default it is set to TRUE; bTestSI - flag that specifies whether check on self-interference should be performed; by default it is set to TRUE;.

Member Function Documentation

◆ FuzzyValue()

Standard_Real BRepAlgoAPI_Check::FuzzyValue ( ) const

Returns the additional tolerance.

◆ Init()

void BRepAlgoAPI_Check::Init ( const TopoDS_Shape theS1,
const TopoDS_Shape theS2,
const BOPAlgo_Operation  theOp,
const Standard_Boolean  bTestSE,
const Standard_Boolean  bTestSI 
)
protected

Initialyzes data.

◆ IsValid()

Standard_Boolean BRepAlgoAPI_Check::IsValid ( )

Shows whether shape(s) valid or not.

◆ Perform()

void BRepAlgoAPI_Check::Perform ( )

Performs the check.

◆ Result()

const BOPAlgo_ListOfCheckResult& BRepAlgoAPI_Check::Result ( )

Returns faulty shapes.

◆ SetData() [1/2]

void BRepAlgoAPI_Check::SetData ( const TopoDS_Shape theS,
const Standard_Boolean  bTestSE = Standard_True,
const Standard_Boolean  bTestSI = Standard_True 
)

Sets data for check by Init method. The method provides alternative way for checking single shape.

◆ SetData() [2/2]

void BRepAlgoAPI_Check::SetData ( const TopoDS_Shape theS1,
const TopoDS_Shape theS2,
const BOPAlgo_Operation  theOp = BOPAlgo_UNKNOWN,
const Standard_Boolean  bTestSE = Standard_True,
const Standard_Boolean  bTestSI = Standard_True 
)

Sets data for check by Init method. The method provides alternative way for checking couple of shapes.

◆ SetFuzzyValue()

void BRepAlgoAPI_Check::SetFuzzyValue ( const Standard_Real  theFuzz)

Sets the additional tolerance.

Field Documentation

◆ myAnalyzer

BOPAlgo_PArgumentAnalyzer BRepAlgoAPI_Check::myAnalyzer
protected

◆ myFuzzyValue

Standard_Real BRepAlgoAPI_Check::myFuzzyValue
protected

◆ myResult

BOPAlgo_ListOfCheckResult BRepAlgoAPI_Check::myResult
protected

◆ myS1

TopoDS_Shape BRepAlgoAPI_Check::myS1
protected

◆ myS2

TopoDS_Shape BRepAlgoAPI_Check::myS2
protected

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