Open CASCADE Technology  7.5.0
BRepAlgoAPI_BuilderAlgo Class Reference

The class contains API level of the General Fuse algorithm.
More...

#include <BRepAlgoAPI_BuilderAlgo.hxx>

Inheritance diagram for BRepAlgoAPI_BuilderAlgo:
Inheritance graph
[legend]

Public Member Functions

Constructors
 BRepAlgoAPI_BuilderAlgo ()
 Empty constructor. More...
 
virtual ~BRepAlgoAPI_BuilderAlgo ()
 Empty constructor. More...
 
 BRepAlgoAPI_BuilderAlgo (const BOPAlgo_PaveFiller &thePF)
 Constructor with prepared Filler object. More...
 
Setting/Getting data for the algorithm
void SetArguments (const TopTools_ListOfShape &theLS)
 Sets the arguments. More...
 
const TopTools_ListOfShapeArguments () const
 Gets the arguments. More...
 
Setting options
void SetNonDestructive (const Standard_Boolean theFlag)
 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. More...
 
Standard_Boolean NonDestructive () const
 Returns 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. More...
 
void SetGlue (const BOPAlgo_GlueEnum theGlue)
 Sets the glue option for the algorithm, which allows increasing performance of the intersection of the input shapes. More...
 
BOPAlgo_GlueEnum Glue () const
 Returns the glue option of the algorithm. More...
 
void SetCheckInverted (const Standard_Boolean theCheck)
 Enables/Disables the check of the input solids for inverted status. More...
 
Standard_Boolean CheckInverted () const
 Returns the flag defining whether the check for input solids on inverted status should be performed or not. More...
 
Performing the operation
virtual void Build () override
 Performs the algorithm. More...
 
Result simplification
void SimplifyResult (const Standard_Boolean theUnifyEdges=Standard_True, const Standard_Boolean theUnifyFaces=Standard_True, const Standard_Real theAngularTol=Precision::Angular())
 Simplification of the result shape is performed by the means of ShapeUpgrade_UnifySameDomain algorithm. The result of the operation will be overwritten with the simplified result. More...
 
History support
virtual const TopTools_ListOfShapeModified (const TopoDS_Shape &theS) override
 Returns the shapes modified from the shape <theS>. If any, the list will contain only those splits of the given shape, contained in the result. More...
 
virtual const TopTools_ListOfShapeGenerated (const TopoDS_Shape &theS) override
 Returns the list of shapes generated from the shape <theS>. In frames of Boolean Operations algorithms only Edges and Faces could have Generated elements, as only they produce new elements during intersection: More...
 
virtual Standard_Boolean IsDeleted (const TopoDS_Shape &aS) override
 Checks if the shape <theS> has been completely removed from the result, i.e. the result does not contain the shape itself and any of its splits. Returns TRUE if the shape has been deleted. More...
 
virtual Standard_Boolean HasModified () const
 Returns true if any of the input shapes has been modified during operation. More...
 
virtual Standard_Boolean HasGenerated () const
 Returns true if any of the input shapes has generated shapes during operation. More...
 
virtual Standard_Boolean HasDeleted () const
 Returns true if any of the input shapes has been deleted during operation. Normally, General Fuse operation should not have Deleted elements, but all derived operation can have. More...
 
Enabling/Disabling the history collection.
void SetToFillHistory (const Standard_Boolean theHistFlag)
 Allows disabling the history collection. More...
 
Standard_Boolean HasHistory () const
 Returns flag of history availability. More...
 
Getting the section edges
const TopTools_ListOfShapeSectionEdges ()
 Returns a list of section edges. The edges represent the result of intersection between arguments of operation. More...
 
Getting tools performing the job
const BOPAlgo_PPaveFillerDSFiller () const
 Returns the Intersection tool. More...
 
const BOPAlgo_PBuilderBuilder () const
 Returns the Building tool. More...
 
Handle< BRepTools_HistoryHistory () const
 History tool. 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
 operator TopoDS_Shape ()
 
- 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

Setting options to the Intersection tool
virtual void SetAttributes ()
 Sets options (available in child classes) for the intersection tool. Here it does nothing. More...
 
Protected methods for shapes intersection and building result
void IntersectShapes (const TopTools_ListOfShape &theArgs)
 Intersects the given shapes with the intersection tool. More...
 
void BuildResult ()
 Builds the resulting shape. More...
 
Clearing the contents of the algorithm
virtual void Clear () override
 Clears the algorithm from previous runs. More...
 
- Protected Member Functions inherited from BRepAlgoAPI_Algo
 BRepAlgoAPI_Algo ()
 Empty constructor. More...
 
virtual ~BRepAlgoAPI_Algo ()
 Destructor. More...
 
 BRepAlgoAPI_Algo (const Handle< NCollection_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 Handle< NCollection_BaseAllocator > &theAllocator)
 Constructor with allocator. More...
 
virtual ~BOPAlgo_Options ()
 Destructor. More...
 
const Handle< NCollection_BaseAllocator > & Allocator () const
 Returns allocator. 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 SetProgressIndicator (const Message_ProgressScope &theProgress)
 Set the Progress Indicator object. 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 SetUseOBB (const Standard_Boolean theUseOBB)
 Enables/Disables the usage of OBB. More...
 
Standard_Boolean UseOBB () const
 Returns the flag defining usage of OBB. More...
 

Protected Attributes

Fields
TopTools_ListOfShape myArguments
 Arguments of the operation. More...
 
Standard_Boolean myNonDestructive
 Non-destructive mode management. More...
 
BOPAlgo_GlueEnum myGlue
 Gluing mode management. More...
 
Standard_Boolean myCheckInverted
 Check for inverted solids management. More...
 
Standard_Boolean myFillHistory
 Controls the history collection. More...
 
Standard_Boolean myIsIntersectionNeeded
 Flag to control whether the intersection of arguments should be performed or not. More...
 
BOPAlgo_PPaveFiller myDSFiller
 Intersection tool performs intersection of the argument shapes. More...
 
BOPAlgo_PBuilder myBuilder
 Building tool performs construction of the result basing on the results of intersection. More...
 
Handle< BRepTools_HistorymyHistory
 General History tool, containing all History of shapes modifications during the operation (including result simplification) More...
 
Handle< BRepTools_HistorymySimplifierHistory
 History of result shape simplification. More...
 
- Protected Attributes inherited from BRepBuilderAPI_MakeShape
TopoDS_Shape myShape
 
TopTools_ListOfShape myGenerated
 
- Protected Attributes inherited from BOPAlgo_Options
Handle< NCollection_BaseAllocatormyAllocator
 Enables/Disables the usage of OBB. More...
 
Handle< Message_ReportmyReport
 Enables/Disables the usage of OBB. More...
 
Standard_Boolean myRunParallel
 Enables/Disables the usage of OBB. More...
 
Standard_Real myFuzzyValue
 Enables/Disables the usage of OBB. More...
 
const Message_ProgressScopemyProgressScope
 Enables/Disables the usage of OBB. More...
 
Standard_Boolean myUseOBB
 Enables/Disables the usage of OBB. 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 contains API level of the General Fuse algorithm.

Additionally to the options defined in the base class, the algorithm has the following options:

It returns the following Error statuses:

Warnings statuses from underlying DS Filler and Builder algorithms are collected in the report.

The class provides possibility to simplify the resulting shape by unification of the tangential edges and faces. It is performed by the method SimplifyResult. See description of this method for more details.

Constructor & Destructor Documentation

◆ BRepAlgoAPI_BuilderAlgo() [1/2]

BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo ( )

Empty constructor.

◆ ~BRepAlgoAPI_BuilderAlgo()

virtual BRepAlgoAPI_BuilderAlgo::~BRepAlgoAPI_BuilderAlgo ( )
virtual

Empty constructor.

◆ BRepAlgoAPI_BuilderAlgo() [2/2]

BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo ( const BOPAlgo_PaveFiller thePF)

Constructor with prepared Filler object.

Member Function Documentation

◆ Arguments()

const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Arguments ( ) const
inline

Gets the arguments.

◆ Build()

virtual void BRepAlgoAPI_BuilderAlgo::Build ( )
overridevirtual

Performs the algorithm.

Reimplemented from BRepBuilderAPI_MakeShape.

Reimplemented in BRepAlgoAPI_Section, BRepAlgoAPI_BooleanOperation, and BRepAlgoAPI_Splitter.

◆ Builder()

const BOPAlgo_PBuilder& BRepAlgoAPI_BuilderAlgo::Builder ( ) const
inline

Returns the Building tool.

◆ BuildResult()

void BRepAlgoAPI_BuilderAlgo::BuildResult ( )
protected

Builds the resulting shape.

◆ CheckInverted()

Standard_Boolean BRepAlgoAPI_BuilderAlgo::CheckInverted ( ) const
inline

Returns the flag defining whether the check for input solids on inverted status should be performed or not.

◆ Clear()

virtual void BRepAlgoAPI_BuilderAlgo::Clear ( )
overrideprotectedvirtual

Clears the algorithm from previous runs.

Reimplemented from BOPAlgo_Options.

◆ DSFiller()

const BOPAlgo_PPaveFiller& BRepAlgoAPI_BuilderAlgo::DSFiller ( ) const
inline

Returns the Intersection tool.

◆ Generated()

virtual const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Generated ( const TopoDS_Shape theS)
overridevirtual

Returns the list of shapes generated from the shape <theS>. In frames of Boolean Operations algorithms only Edges and Faces could have Generated elements, as only they produce new elements during intersection:

  • Edges can generate new vertices;
  • Faces can generate new edges and vertices.

Reimplemented from BRepBuilderAPI_MakeShape.

◆ Glue()

BOPAlgo_GlueEnum BRepAlgoAPI_BuilderAlgo::Glue ( ) const
inline

Returns the glue option of the algorithm.

◆ HasDeleted()

virtual Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasDeleted ( ) const
virtual

Returns true if any of the input shapes has been deleted during operation. Normally, General Fuse operation should not have Deleted elements, but all derived operation can have.

◆ HasGenerated()

virtual Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasGenerated ( ) const
virtual

Returns true if any of the input shapes has generated shapes during operation.

◆ HasHistory()

Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasHistory ( ) const
inline

Returns flag of history availability.

◆ HasModified()

virtual Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasModified ( ) const
virtual

Returns true if any of the input shapes has been modified during operation.

◆ History()

Handle< BRepTools_History > BRepAlgoAPI_BuilderAlgo::History ( ) const
inline

History tool.

◆ IntersectShapes()

void BRepAlgoAPI_BuilderAlgo::IntersectShapes ( const TopTools_ListOfShape theArgs)
protected

Intersects the given shapes with the intersection tool.

◆ IsDeleted()

virtual Standard_Boolean BRepAlgoAPI_BuilderAlgo::IsDeleted ( const TopoDS_Shape aS)
overridevirtual

Checks if the shape <theS> has been completely removed from the result, i.e. the result does not contain the shape itself and any of its splits. Returns TRUE if the shape has been deleted.

Reimplemented from BRepBuilderAPI_MakeShape.

◆ Modified()

virtual const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Modified ( const TopoDS_Shape theS)
overridevirtual

Returns the shapes modified from the shape <theS>. If any, the list will contain only those splits of the given shape, contained in the result.

Reimplemented from BRepBuilderAPI_MakeShape.

◆ NonDestructive()

Standard_Boolean BRepAlgoAPI_BuilderAlgo::NonDestructive ( ) const
inline

Returns 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.

◆ SectionEdges()

const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::SectionEdges ( )

Returns a list of section edges. The edges represent the result of intersection between arguments of operation.

◆ SetArguments()

void BRepAlgoAPI_BuilderAlgo::SetArguments ( const TopTools_ListOfShape theLS)
inline

Sets the arguments.

◆ SetAttributes()

virtual void BRepAlgoAPI_BuilderAlgo::SetAttributes ( )
inlineprotectedvirtual

Sets options (available in child classes) for the intersection tool. Here it does nothing.

Reimplemented in BRepAlgoAPI_Section.

◆ SetCheckInverted()

void BRepAlgoAPI_BuilderAlgo::SetCheckInverted ( const Standard_Boolean  theCheck)
inline

Enables/Disables the check of the input solids for inverted status.

◆ SetGlue()

void BRepAlgoAPI_BuilderAlgo::SetGlue ( const BOPAlgo_GlueEnum  theGlue)
inline

Sets the glue option for the algorithm, which allows increasing performance of the intersection of the input shapes.

◆ SetNonDestructive()

void BRepAlgoAPI_BuilderAlgo::SetNonDestructive ( const Standard_Boolean  theFlag)
inline

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.

◆ SetToFillHistory()

void BRepAlgoAPI_BuilderAlgo::SetToFillHistory ( const Standard_Boolean  theHistFlag)
inline

Allows disabling the history collection.

◆ SimplifyResult()

void BRepAlgoAPI_BuilderAlgo::SimplifyResult ( const Standard_Boolean  theUnifyEdges = Standard_True,
const Standard_Boolean  theUnifyFaces = Standard_True,
const Standard_Real  theAngularTol = Precision::Angular() 
)

Simplification of the result shape is performed by the means of ShapeUpgrade_UnifySameDomain algorithm. The result of the operation will be overwritten with the simplified result.

The simplification is performed without creation of the Internal shapes, i.e. shapes connections will never be broken.

Simplification is performed on the whole result shape. Thus, if the input shapes contained connected tangent edges or faces unmodified during the operation they will also be unified.

After simplification, the History of result simplification is merged into the main history of operation. So, it is taken into account when asking for Modified, Generated and Deleted shapes.

Some options of the main operation are passed into the Unifier:

  • Fuzzy tolerance of the operation is given to the Unifier as the linear tolerance.
  • Non destructive mode here controls the safe input mode in Unifier.
Parameters
theUnifyEdgesControls the edges unification. TRUE by default.
theUnifyFacesControls the faces unification. TRUE by default.
theAngularTolAngular criteria for tangency of edges and faces. Precision::Angular() by default.

Field Documentation

◆ myArguments

TopTools_ListOfShape BRepAlgoAPI_BuilderAlgo::myArguments
protected

Arguments of the operation.

◆ myBuilder

BOPAlgo_PBuilder BRepAlgoAPI_BuilderAlgo::myBuilder
protected

Building tool performs construction of the result basing on the results of intersection.

◆ myCheckInverted

Standard_Boolean BRepAlgoAPI_BuilderAlgo::myCheckInverted
protected

Check for inverted solids management.

◆ myDSFiller

BOPAlgo_PPaveFiller BRepAlgoAPI_BuilderAlgo::myDSFiller
protected

Intersection tool performs intersection of the argument shapes.

◆ myFillHistory

Standard_Boolean BRepAlgoAPI_BuilderAlgo::myFillHistory
protected

Controls the history collection.

◆ myGlue

BOPAlgo_GlueEnum BRepAlgoAPI_BuilderAlgo::myGlue
protected

Gluing mode management.

◆ myHistory

Handle< BRepTools_History > BRepAlgoAPI_BuilderAlgo::myHistory
protected

General History tool, containing all History of shapes modifications during the operation (including result simplification)

◆ myIsIntersectionNeeded

Standard_Boolean BRepAlgoAPI_BuilderAlgo::myIsIntersectionNeeded
protected

Flag to control whether the intersection of arguments should be performed or not.

◆ myNonDestructive

Standard_Boolean BRepAlgoAPI_BuilderAlgo::myNonDestructive
protected

Non-destructive mode management.

◆ mySimplifierHistory

Handle< BRepTools_History > BRepAlgoAPI_BuilderAlgo::mySimplifierHistory
protected

History of result shape simplification.


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