Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
BOPAlgo_Builder Class Reference

The class is a General Fuse algorithm - base algorithm for the algorithms in the Boolean Component. Its main purpose is to build the split parts of the argument shapes from which the result of the operations is combined. The result of the General Fuse algorithm itself is a compound containing all split parts of the arguments. More...

#include <BOPAlgo_Builder.hxx>

Inheritance diagram for BOPAlgo_Builder:
Inheritance graph
[legend]

Data Structures

class  NbShapes
 Auxiliary structure to get information about number of shapes of each type participated in operation. More...
 

Public Member Functions

 BOPAlgo_Builder ()
 Empty constructor.
 
 ~BOPAlgo_Builder () override
 
 BOPAlgo_Builder (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 
void Clear () override
 Clears the content of the algorithm.
 
BOPAlgo_PPaveFiller PPaveFiller ()
 Returns the PaveFiller, algorithm for sub-shapes intersection.
 
BOPDS_PDS PDS ()
 Returns the Data Structure, holder of intersection information.
 
occ::handle< IntTools_ContextContext () const
 Returns the Context, tool for cashing heavy algorithms.
 
Arguments

Adds the argument to the operation.

virtual void AddArgument (const TopoDS_Shape &theShape)
 Sets the list of arguments for the operation.
 
virtual void SetArguments (const NCollection_List< TopoDS_Shape > &theLS)
 Sets the list of arguments for the operation.
 
const NCollection_List< TopoDS_Shape > & Arguments () const
 Returns the list of arguments.
 
Options

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. This flag is taken into account if internal PaveFiller is used only. In the case of calling PerformWithFiller the corresponding flag of that PaveFiller is in force.

void SetNonDestructive (const bool theFlag)
 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.
 
bool 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.
 
void SetGlue (const BOPAlgo_GlueEnum theGlue)
 Sets the glue option for the algorithm.
 
BOPAlgo_GlueEnum Glue () const
 Returns the glue option of the algorithm.
 
void SetCheckInverted (const bool theCheck)
 Enables/Disables the check of the input solids for inverted status.
 
bool CheckInverted () const
 Returns the flag defining whether the check for input solids on inverted status should be performed or not.
 
Performing the operation

Performs the operation. The intersection will be performed also.

void Perform (const Message_ProgressRange &theRange=Message_ProgressRange()) override
 Performs the operation with the prepared filler. The intersection will not be performed in this case.
 
virtual void PerformWithFiller (const BOPAlgo_PaveFiller &theFiller, const Message_ProgressRange &theRange=Message_ProgressRange())
 Performs the operation with the prepared filler. The intersection will not be performed in this case.
 
BOPs on open solids

Builds the result shape according to the given states for the objects and tools. These states can be unambiguously converted into the Boolean operation type. Thus, it performs the Boolean operation on the given groups of shapes.

The result is built basing on the result of Builder operation (GF or any other). The only condition for the Builder is that the splits of faces should be created and classified relatively solids.

The method uses classification approach for choosing the faces which will participate in building the result shape:

  • All faces from each group having the given state for the opposite group will be taken into result.

Such approach shows better results (in comparison with BOPAlgo_BuilderSolid approach) when working with open solids. However, the result may not be always correct on such data (at least, not as expected) as the correct classification of the faces relatively open solids is not always possible and may vary depending on the chosen classification point on the face.

History is not created for the solids in this method.

To avoid pollution of the report of Builder algorithm, there is a possibility to pass the different report to collect the alerts of the method only. But, if the new report is not given, the Builder report will be used. So, even if Builder passed without any errors, but some error has been stored into its report in this method, for the following calls the Builder report must be cleared.

The method may set the following errors:

  • BOPAlgo_AlertBuilderFailed - Building operation has not been performed yet or failed;
  • BOPAlgo_AlertBOPNotSet - invalid BOP type is given (COMMON/FUSE/CUT/CUT21 are supported);
  • BOPAlgo_AlertTooFewArguments - arguments are not given;
  • BOPAlgo_AlertUnknownShape - the shape is unknown for the operation.

Parameters:

Parameters
theObjects- The group of Objects for BOP;
theObjState- State for objects faces to pass into result;
theTools- The group of Tools for BOP;
theToolsState- State for tools faces to pass into result;
theReport- The alternative report to avoid pollution of the main one.
virtual void BuildBOP (const NCollection_List< TopoDS_Shape > &theObjects, const TopAbs_State theObjState, const NCollection_List< TopoDS_Shape > &theTools, const TopAbs_State theToolsState, const Message_ProgressRange &theRange, occ::handle< Message_Report > theReport=nullptr)
 Builds the result of Boolean operation of given type basing on the result of Builder operation (GF or any other).
 
void BuildBOP (const NCollection_List< TopoDS_Shape > &theObjects, const NCollection_List< TopoDS_Shape > &theTools, const BOPAlgo_Operation theOperation, const Message_ProgressRange &theRange, occ::handle< Message_Report > theReport=nullptr)
 Builds the result of Boolean operation of given type basing on the result of Builder operation (GF or any other).
 
Images/Origins

Returns the map of images.

const NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHasher > & Images () const
 Returns the map of origins.
 
const NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHasher > & Origins () const
 Returns the map of origins.
 
const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & ShapesSD () const
 Returns the map of Same Domain (SD) shapes - coinciding shapes from different arguments.
 
- Public Member Functions inherited from BOPAlgo_BuilderShape
const TopoDS_ShapeShape () const
 
const NCollection_List< TopoDS_Shape > & Modified (const TopoDS_Shape &theS)
 Returns the list of shapes Generated from the shape theS.
 
const NCollection_List< TopoDS_Shape > & Generated (const TopoDS_Shape &theS)
 Returns the list of shapes Generated from the shape theS.
 
bool IsDeleted (const TopoDS_Shape &theS)
 Returns true if the shape theS has been deleted. In this case the shape will have no Modified elements, but can have Generated elements.
 
bool HasModified () const
 Returns true if any of the input shapes has been modified during operation.
 
bool HasGenerated () const
 Returns true if any of the input shapes has generated shapes during operation.
 
bool HasDeleted () const
 Returns true if any of the input shapes has been deleted during operation.
 
occ::handle< BRepTools_HistoryHistory ()
 History Tool.
 
void SetToFillHistory (const bool theHistFlag)
 Returns flag of history availability.
 
bool HasHistory () const
 Returns flag of history availability.
 
- 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.
 
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 Member Functions

History methods

Prepare information for history support.

void PrepareHistory (const Message_ProgressRange &theRange)
 Prepare history information for the input shapes taking into account possible operation-specific modifications. For instance, in the CellsBuilder operation, additionally to splitting input shapes the splits of the shapes (or the shapes themselves) may be unified during removal of internal boundaries. In this case each split should be linked to the unified shape.
 
virtual const NCollection_List< TopoDS_Shape > * LocModified (const TopoDS_Shape &theS)
 Prepare history information for the input shapes taking into account possible operation-specific modifications. For instance, in the CellsBuilder operation, additionally to splitting input shapes the splits of the shapes (or the shapes themselves) may be unified during removal of internal boundaries. In this case each split should be linked to the unified shape.
 
virtual const NCollection_List< TopoDS_Shape > & LocGenerated (const TopoDS_Shape &theS)
 Returns the list of shapes generated from the shape theS. Similarly to LocModified must be redefined for specific operations, obtaining Generated elements differently.
 
Methods for building the result

Performs the building of the result. The method calls the PerformInternal1() method surrounded by a try-catch block.

virtual void PerformInternal (const BOPAlgo_PaveFiller &thePF, const Message_ProgressRange &theRange)
 Performs the building of the result. To build the result of any other operation it will be necessary to override this method.
 
virtual void PerformInternal1 (const BOPAlgo_PaveFiller &thePF, const Message_ProgressRange &theRange)
 Performs the building of the result. To build the result of any other operation it will be necessary to override this method.
 
virtual void BuildResult (const TopAbs_ShapeEnum theType)
 Builds the result of operation. The method is called for each of the arguments type and adds into the result the splits of the arguments of that type.
 
Checking input arguments

Checks the input data.

void CheckData () override
 Checks if the intersection algorithm has Errors/Warnings.
 
void CheckFiller ()
 Checks if the intersection algorithm has Errors/Warnings.
 
virtual void Prepare ()
 Prepares the result shape by making it empty compound.
 
Fill Images of VERTICES

Fills the images of vertices.

void FillImagesVertices (const Message_ProgressRange &theRange)
 
Fill Images of EDGES

Fills the images of edges.

void FillImagesEdges (const Message_ProgressRange &theRange)
 
Fill Images of CONTAINERS

Fills the images of containers (WIRES/SHELLS/COMPSOLID).

void FillImagesContainers (const TopAbs_ShapeEnum theType, const Message_ProgressRange &theRange)
 Builds the image of the given container using the splits of its sub-shapes.
 
void FillImagesContainer (const TopoDS_Shape &theS, const TopAbs_ShapeEnum theType)
 Builds the image of the given container using the splits of its sub-shapes.
 
Fill Images of FACES

Fills the images of faces. The method consists of three steps:

  1. Build the splits of faces;
  2. Find SD faces;
  3. Add internal vertices (if any) to faces.
void FillImagesFaces (const Message_ProgressRange &theRange)
 Builds the splits of faces using the information from the intersection stage stored in Data Structure.
 
virtual void BuildSplitFaces (const Message_ProgressRange &theRange)
 Builds the splits of faces using the information from the intersection stage stored in Data Structure.
 
void FillSameDomainFaces (const Message_ProgressRange &theRange)
 Looks for the same domain faces among the splits of the faces. Updates the map of images with SD faces.
 
void FillInternalVertices (const Message_ProgressRange &theRange)
 Classifies the alone vertices on faces relatively its splits and adds them as INTERNAL into the splits.
 
Fill Images of SOLIDS

Fills the images of solids. The method consists of four steps:

  1. Build the draft solid - just rebuild the solid using the splits of faces;
  2. Find faces from other arguments located inside the solids;
  3. Build splits of solid using the inside faces;
  4. Fill internal shapes for the splits (Wires and vertices).
void FillImagesSolids (const Message_ProgressRange &theRange)
 Builds the draft solid by rebuilding the shells of the solid with the splits of faces.
 
void BuildDraftSolid (const TopoDS_Shape &theSolid, TopoDS_Shape &theDraftSolid, NCollection_List< TopoDS_Shape > &theLIF)
 Builds the draft solid by rebuilding the shells of the solid with the splits of faces.
 
virtual void FillIn3DParts (NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > &theDraftSolids, const Message_ProgressRange &theRange)
 Finds faces located inside each solid.
 
void BuildSplitSolids (NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > &theDraftSolids, const Message_ProgressRange &theRange)
 Builds the splits of the solids using their draft versions and faces located inside.
 
void FillInternalShapes (const Message_ProgressRange &theRange)
 Classifies the vertices and edges from the arguments relatively splits of solids and makes them INTERNAL for solids.
 
Fill Images of COMPOUNDS

Fills the images of compounds.

void FillImagesCompounds (const Message_ProgressRange &theRange)
 Builds the image of the given compound.
 
void FillImagesCompound (const TopoDS_Shape &theS, NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHasher > &theMF)
 Builds the image of the given compound.
 
Post treatment

Post treatment of the result of the operation. The method checks validity of the sub-shapes of the result and updates the tolerances to make them valid.

virtual void PostTreat (const Message_ProgressRange &theRange)
 
- Protected Member Functions inherited from BOPAlgo_BuilderShape
 BOPAlgo_BuilderShape ()
 Constructor with allocator.
 
 BOPAlgo_BuilderShape (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 Constructor with allocator.
 
void Clear () override
 Clears all warnings and errors, and any data cached by the algorithm. User defined options are not cleared.
 
- Protected Member Functions inherited from BOPAlgo_Algo
 BOPAlgo_Algo ()
 Default constructor.
 
 ~BOPAlgo_Algo () override
 
 BOPAlgo_Algo (const occ::handle< NCollection_BaseAllocator > &theAllocator)
 
virtual void CheckResult ()
 Checks the obtained result.
 
void analyzeProgress (const double theWhole, BOPAlgo_PISteps &theSteps) const
 Fills the values for constant operations - the operations having constant relative running time.
 
- 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.
 

Protected Attributes

Fields
NCollection_List< TopoDS_ShapemyArguments
 Arguments of the operation.
 
NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHashermyMapFence
 Fence map providing the uniqueness of the shapes in the list of arguments.
 
BOPAlgo_PPaveFiller myPaveFiller
 Pave Filler - algorithm for sub-shapes intersection.
 
BOPDS_PDS myDS
 Data Structure - holder of intersection information.
 
occ::handle< IntTools_ContextmyContext
 Context - tool for cashing heavy algorithms such as Projectors and Classifiers.
 
int myEntryPoint
 EntryPoint - controls the deletion of the PaveFiller, which could live longer than the Builder.
 
NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHashermyImages
 Images - map of Images of the sub-shapes of arguments.
 
NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHashermyShapesSD
 ShapesSD - map of SD Shapes.
 
NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHashermyOrigins
 Origins - map of Origins, back map of Images.
 
NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHashermyInParts
 InParts - map of own and acquired IN faces of the arguments solids.
 
bool myNonDestructive
 Safe processing option allows avoiding modification of the input shapes.
 
BOPAlgo_GlueEnum myGlue
 Gluing option allows speeding up the intersection of the input shapes.
 
bool myCheckInverted
 Check inverted option allows disabling the check of input solids on inverted status.
 
- Protected Attributes inherited from BOPAlgo_BuilderShape
TopoDS_Shape myShape
 Result of the operation.
 
NCollection_List< TopoDS_ShapemyHistShapes
 Storer for the history shapes.
 
NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHashermyMapShape
 cached map of all arguments shapes
 
bool myFillHistory
 Controls the history filling.
 
occ::handle< BRepTools_HistorymyHistory
 History tool.
 
- 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.
 

Analyze progress of the operation

List of operations to be supported by the Progress Indicator

enum  BOPAlgo_PIOperation {
  PIOperation_TreatVertices = 0 , PIOperation_TreatEdges , PIOperation_TreatWires , PIOperation_TreatFaces ,
  PIOperation_TreatShells , PIOperation_TreatSolids , PIOperation_TreatCompsolids , PIOperation_TreatCompounds ,
  PIOperation_FillHistory , PIOperation_PostTreat , PIOperation_Last
}
 Compute number of shapes of certain type participating in operation. More...
 
NbShapes getNbShapes () const
 Compute number of shapes of certain type participating in operation.
 
void fillPIConstants (const double theWhole, BOPAlgo_PISteps &theSteps) const override
 Filling steps for constant operations.
 
void fillPISteps (BOPAlgo_PISteps &theSteps) const override
 Filling steps for all other operations.
 

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.
 

Detailed Description

The class is a General Fuse algorithm - base algorithm for the algorithms in the Boolean Component. Its main purpose is to build the split parts of the argument shapes from which the result of the operations is combined. The result of the General Fuse algorithm itself is a compound containing all split parts of the arguments.

Additionally to the options of the base classes, the algorithm has the following options:

The algorithm returns the following warnings:

The algorithm returns the following Error statuses:

Member Enumeration Documentation

◆ BOPAlgo_PIOperation

Compute number of shapes of certain type participating in operation.

Enumerator
PIOperation_TreatVertices 
PIOperation_TreatEdges 
PIOperation_TreatWires 
PIOperation_TreatFaces 
PIOperation_TreatShells 
PIOperation_TreatSolids 
PIOperation_TreatCompsolids 
PIOperation_TreatCompounds 
PIOperation_FillHistory 
PIOperation_PostTreat 
PIOperation_Last 

Constructor & Destructor Documentation

◆ BOPAlgo_Builder() [1/2]

BOPAlgo_Builder::BOPAlgo_Builder ( )

Empty constructor.

◆ ~BOPAlgo_Builder()

BOPAlgo_Builder::~BOPAlgo_Builder ( )
override

◆ BOPAlgo_Builder() [2/2]

BOPAlgo_Builder::BOPAlgo_Builder ( const occ::handle< NCollection_BaseAllocator > & theAllocator)

Member Function Documentation

◆ AddArgument()

virtual void BOPAlgo_Builder::AddArgument ( const TopoDS_Shape & theShape)
virtual

Sets the list of arguments for the operation.

◆ Arguments()

const NCollection_List< TopoDS_Shape > & BOPAlgo_Builder::Arguments ( ) const
inline

Returns the list of arguments.

◆ BuildBOP() [1/2]

void BOPAlgo_Builder::BuildBOP ( const NCollection_List< TopoDS_Shape > & theObjects,
const NCollection_List< TopoDS_Shape > & theTools,
const BOPAlgo_Operation theOperation,
const Message_ProgressRange & theRange,
occ::handle< Message_Report > theReport = nullptr )
inline

Builds the result of Boolean operation of given type basing on the result of Builder operation (GF or any other).

The method converts the given type of operation into the states for the objects and tools required for their face to pass into result and performs the call to the same method, but with states instead of operation type.

The conversion looks as follows:

  • COMMON is built from the faces of objects located IN any of the tools and vice versa.
  • FUSE is built from the faces OUT of all given shapes;
  • CUT is built from the faces of the objects OUT of the tools and faces of the tools located IN solids of the objects.
Parameters
theObjects- The group of Objects for BOP;
theTools- The group of Tools for BOP;
theOperation- The BOP type;
theRange- The parameter to progressIndicator
theReport- The alternative report to avoid pollution of the global one.

◆ BuildBOP() [2/2]

virtual void BOPAlgo_Builder::BuildBOP ( const NCollection_List< TopoDS_Shape > & theObjects,
const TopAbs_State theObjState,
const NCollection_List< TopoDS_Shape > & theTools,
const TopAbs_State theToolsState,
const Message_ProgressRange & theRange,
occ::handle< Message_Report > theReport = nullptr )
virtual

Builds the result of Boolean operation of given type basing on the result of Builder operation (GF or any other).

The method converts the given type of operation into the states for the objects and tools required for their face to pass into result and performs the call to the same method, but with states instead of operation type.

The conversion looks as follows:

  • COMMON is built from the faces of objects located IN any of the tools and vice versa.
  • FUSE is built from the faces OUT of all given shapes;
  • CUT is built from the faces of the objects OUT of the tools and faces of the tools located IN solids of the objects.
Parameters
theObjects- The group of Objects for BOP;
theTools- The group of Tools for BOP;
theOperation- The BOP type;
theRange- The parameter to progressIndicator
theReport- The alternative report to avoid pollution of the global one.

◆ BuildDraftSolid()

void BOPAlgo_Builder::BuildDraftSolid ( const TopoDS_Shape & theSolid,
TopoDS_Shape & theDraftSolid,
NCollection_List< TopoDS_Shape > & theLIF )
protected

Builds the draft solid by rebuilding the shells of the solid with the splits of faces.

◆ BuildResult()

virtual void BOPAlgo_Builder::BuildResult ( const TopAbs_ShapeEnum theType)
protectedvirtual

Builds the result of operation. The method is called for each of the arguments type and adds into the result the splits of the arguments of that type.

Reimplemented in BOPAlgo_BOP, and BOPAlgo_Splitter.

◆ BuildSplitFaces()

virtual void BOPAlgo_Builder::BuildSplitFaces ( const Message_ProgressRange & theRange)
protectedvirtual

Builds the splits of faces using the information from the intersection stage stored in Data Structure.

◆ BuildSplitSolids()

void BOPAlgo_Builder::BuildSplitSolids ( NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & theDraftSolids,
const Message_ProgressRange & theRange )
protected

Builds the splits of the solids using their draft versions and faces located inside.

◆ CheckData()

void BOPAlgo_Builder::CheckData ( )
overrideprotectedvirtual

Checks if the intersection algorithm has Errors/Warnings.

Reimplemented from BOPAlgo_Algo.

Reimplemented in BOPAlgo_MakerVolume, BOPAlgo_Section, and BOPAlgo_Splitter.

◆ CheckFiller()

void BOPAlgo_Builder::CheckFiller ( )
protected

Checks if the intersection algorithm has Errors/Warnings.

◆ CheckInverted()

bool BOPAlgo_Builder::CheckInverted ( ) const
inline

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

◆ Clear()

void BOPAlgo_Builder::Clear ( )
overridevirtual

Clears the content of the algorithm.

Reimplemented from BOPAlgo_Options.

Reimplemented in BOPAlgo_CellsBuilder, BOPAlgo_MakerVolume, BOPAlgo_ToolsProvider, and BRepFeat_Builder.

◆ Context()

occ::handle< IntTools_Context > BOPAlgo_Builder::Context ( ) const
inline

Returns the Context, tool for cashing heavy algorithms.

◆ FillImagesCompound()

void BOPAlgo_Builder::FillImagesCompound ( const TopoDS_Shape & theS,
NCollection_Map< TopoDS_Shape, TopTools_ShapeMapHasher > & theMF )
protected

Builds the image of the given compound.

◆ FillImagesCompounds()

void BOPAlgo_Builder::FillImagesCompounds ( const Message_ProgressRange & theRange)
protected

Builds the image of the given compound.

◆ FillImagesContainer()

void BOPAlgo_Builder::FillImagesContainer ( const TopoDS_Shape & theS,
const TopAbs_ShapeEnum theType )
protected

Builds the image of the given container using the splits of its sub-shapes.

◆ FillImagesContainers()

void BOPAlgo_Builder::FillImagesContainers ( const TopAbs_ShapeEnum theType,
const Message_ProgressRange & theRange )
protected

Builds the image of the given container using the splits of its sub-shapes.

◆ FillImagesEdges()

void BOPAlgo_Builder::FillImagesEdges ( const Message_ProgressRange & theRange)
protected

◆ FillImagesFaces()

void BOPAlgo_Builder::FillImagesFaces ( const Message_ProgressRange & theRange)
protected

Builds the splits of faces using the information from the intersection stage stored in Data Structure.

◆ FillImagesSolids()

void BOPAlgo_Builder::FillImagesSolids ( const Message_ProgressRange & theRange)
protected

Builds the draft solid by rebuilding the shells of the solid with the splits of faces.

◆ FillImagesVertices()

void BOPAlgo_Builder::FillImagesVertices ( const Message_ProgressRange & theRange)
protected

◆ FillIn3DParts()

virtual void BOPAlgo_Builder::FillIn3DParts ( NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & theDraftSolids,
const Message_ProgressRange & theRange )
protectedvirtual

Finds faces located inside each solid.

Reimplemented in BRepFeat_Builder.

◆ FillInternalShapes()

void BOPAlgo_Builder::FillInternalShapes ( const Message_ProgressRange & theRange)
protected

Classifies the vertices and edges from the arguments relatively splits of solids and makes them INTERNAL for solids.

◆ FillInternalVertices()

void BOPAlgo_Builder::FillInternalVertices ( const Message_ProgressRange & theRange)
protected

Classifies the alone vertices on faces relatively its splits and adds them as INTERNAL into the splits.

◆ fillPIConstants()

void BOPAlgo_Builder::fillPIConstants ( const double theWhole,
BOPAlgo_PISteps & theSteps ) const
overrideprotectedvirtual

Filling steps for constant operations.

Reimplemented from BOPAlgo_Algo.

Reimplemented in BOPAlgo_Section.

◆ fillPISteps()

void BOPAlgo_Builder::fillPISteps ( BOPAlgo_PISteps & theSteps) const
overrideprotectedvirtual

Filling steps for all other operations.

Reimplemented from BOPAlgo_Algo.

Reimplemented in BOPAlgo_MakerVolume, and BOPAlgo_Section.

◆ FillSameDomainFaces()

void BOPAlgo_Builder::FillSameDomainFaces ( const Message_ProgressRange & theRange)
protected

Looks for the same domain faces among the splits of the faces. Updates the map of images with SD faces.

◆ getNbShapes()

NbShapes BOPAlgo_Builder::getNbShapes ( ) const
protected

Compute number of shapes of certain type participating in operation.

◆ Glue()

BOPAlgo_GlueEnum BOPAlgo_Builder::Glue ( ) const
inline

Returns the glue option of the algorithm.

◆ Images()

const NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHasher > & BOPAlgo_Builder::Images ( ) const
inline

Returns the map of origins.

◆ LocGenerated()

virtual const NCollection_List< TopoDS_Shape > & BOPAlgo_Builder::LocGenerated ( const TopoDS_Shape & theS)
protectedvirtual

Returns the list of shapes generated from the shape theS. Similarly to LocModified must be redefined for specific operations, obtaining Generated elements differently.

◆ LocModified()

virtual const NCollection_List< TopoDS_Shape > * BOPAlgo_Builder::LocModified ( const TopoDS_Shape & theS)
protectedvirtual

Prepare history information for the input shapes taking into account possible operation-specific modifications. For instance, in the CellsBuilder operation, additionally to splitting input shapes the splits of the shapes (or the shapes themselves) may be unified during removal of internal boundaries. In this case each split should be linked to the unified shape.

To have correct history information, the method should be redefined in each operation where such additional modification is possible. The input shape <theS> should be the one from arguments, and the returning list should contain all final elements to which the input shape has evolved, including those not contained in the result shape.

The method returns pointer to the list of modified elements. NULL pointer means that the shape has not been modified at all.

The General Fuse operation does not perform any other modification than splitting the input shapes basing on their intersection information. This information is contained in myImages map. Thus, here the method returns only splits (if any) contained in this map.

Reimplemented in BOPAlgo_CellsBuilder.

◆ NonDestructive()

bool BOPAlgo_Builder::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.

◆ Origins()

const NCollection_DataMap< TopoDS_Shape, NCollection_List< TopoDS_Shape >, TopTools_ShapeMapHasher > & BOPAlgo_Builder::Origins ( ) const
inline

Returns the map of origins.

◆ PDS()

BOPDS_PDS BOPAlgo_Builder::PDS ( )
inline

Returns the Data Structure, holder of intersection information.

◆ Perform()

void BOPAlgo_Builder::Perform ( const Message_ProgressRange & theRange = Message_ProgressRange())
overridevirtual

Performs the operation with the prepared filler. The intersection will not be performed in this case.

Implements BOPAlgo_Algo.

Reimplemented in BOPAlgo_MakerVolume, and BOPAlgo_Splitter.

◆ PerformInternal()

virtual void BOPAlgo_Builder::PerformInternal ( const BOPAlgo_PaveFiller & thePF,
const Message_ProgressRange & theRange )
protectedvirtual

Performs the building of the result. To build the result of any other operation it will be necessary to override this method.

◆ PerformInternal1()

virtual void BOPAlgo_Builder::PerformInternal1 ( const BOPAlgo_PaveFiller & thePF,
const Message_ProgressRange & theRange )
protectedvirtual

Performs the building of the result. To build the result of any other operation it will be necessary to override this method.

Reimplemented in BOPAlgo_BOP, BOPAlgo_CellsBuilder, BOPAlgo_Section, and BOPAlgo_MakerVolume.

◆ PerformWithFiller()

virtual void BOPAlgo_Builder::PerformWithFiller ( const BOPAlgo_PaveFiller & theFiller,
const Message_ProgressRange & theRange = Message_ProgressRange() )
virtual

Performs the operation with the prepared filler. The intersection will not be performed in this case.

◆ PostTreat()

virtual void BOPAlgo_Builder::PostTreat ( const Message_ProgressRange & theRange)
protectedvirtual

◆ PPaveFiller()

BOPAlgo_PPaveFiller BOPAlgo_Builder::PPaveFiller ( )
inline

Returns the PaveFiller, algorithm for sub-shapes intersection.

◆ Prepare()

virtual void BOPAlgo_Builder::Prepare ( )
protectedvirtual

Prepares the result shape by making it empty compound.

Reimplemented in BRepFeat_Builder.

◆ PrepareHistory()

void BOPAlgo_Builder::PrepareHistory ( const Message_ProgressRange & theRange)
protected

Prepare history information for the input shapes taking into account possible operation-specific modifications. For instance, in the CellsBuilder operation, additionally to splitting input shapes the splits of the shapes (or the shapes themselves) may be unified during removal of internal boundaries. In this case each split should be linked to the unified shape.

To have correct history information, the method should be redefined in each operation where such additional modification is possible. The input shape <theS> should be the one from arguments, and the returning list should contain all final elements to which the input shape has evolved, including those not contained in the result shape.

The method returns pointer to the list of modified elements. NULL pointer means that the shape has not been modified at all.

The General Fuse operation does not perform any other modification than splitting the input shapes basing on their intersection information. This information is contained in myImages map. Thus, here the method returns only splits (if any) contained in this map.

◆ SetArguments()

virtual void BOPAlgo_Builder::SetArguments ( const NCollection_List< TopoDS_Shape > & theLS)
virtual

Sets the list of arguments for the operation.

◆ SetCheckInverted()

void BOPAlgo_Builder::SetCheckInverted ( const bool theCheck)
inline

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

◆ SetGlue()

void BOPAlgo_Builder::SetGlue ( const BOPAlgo_GlueEnum theGlue)
inline

Sets the glue option for the algorithm.

◆ SetNonDestructive()

void BOPAlgo_Builder::SetNonDestructive ( const bool theFlag)
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.

◆ ShapesSD()

const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & BOPAlgo_Builder::ShapesSD ( ) const
inline

Returns the map of Same Domain (SD) shapes - coinciding shapes from different arguments.

Field Documentation

◆ myArguments

NCollection_List<TopoDS_Shape> BOPAlgo_Builder::myArguments
protected

Arguments of the operation.

◆ myCheckInverted

bool BOPAlgo_Builder::myCheckInverted
protected

Check inverted option allows disabling the check of input solids on inverted status.

◆ myContext

occ::handle<IntTools_Context> BOPAlgo_Builder::myContext
protected

Context - tool for cashing heavy algorithms such as Projectors and Classifiers.

◆ myDS

BOPDS_PDS BOPAlgo_Builder::myDS
protected

Data Structure - holder of intersection information.

◆ myEntryPoint

int BOPAlgo_Builder::myEntryPoint
protected

EntryPoint - controls the deletion of the PaveFiller, which could live longer than the Builder.

◆ myGlue

BOPAlgo_GlueEnum BOPAlgo_Builder::myGlue
protected

Gluing option allows speeding up the intersection of the input shapes.

◆ myImages

Images - map of Images of the sub-shapes of arguments.

◆ myInParts

InParts - map of own and acquired IN faces of the arguments solids.

◆ myMapFence

NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher> BOPAlgo_Builder::myMapFence
protected

Fence map providing the uniqueness of the shapes in the list of arguments.

◆ myNonDestructive

bool BOPAlgo_Builder::myNonDestructive
protected

Safe processing option allows avoiding modification of the input shapes.

◆ myOrigins

Origins - map of Origins, back map of Images.

◆ myPaveFiller

BOPAlgo_PPaveFiller BOPAlgo_Builder::myPaveFiller
protected

Pave Filler - algorithm for sub-shapes intersection.

◆ myShapesSD

NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> BOPAlgo_Builder::myShapesSD
protected

ShapesSD - map of SD Shapes.


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