1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027878: Development of the Gluing operations based on the new Boolean component

The Gluing operation is an additional option for the algorithms in the Boolean Component
such as General Fuse, Boolean operations, Section operation, Maker Volume and Cells Builder algorithms.

The Gluing options have been designed to speed up the computation of the interference among arguments of the operations on special cases,
in which the arguments may be overlapping but do not have real intersections between their sub-shapes.

This option cannot be used on the shapes having real intersections, like intersection vertex between edges,
or intersection vertex between edge and a face or intersection line between faces.

The Gluing option is an enumeration implemented in BOPAlgo_GlueEnum.hxx. There are following items in the enum:
* BOPAlgo_GlueOff - default value for the algorithms, Gluing is switched off;
* BOPAlgo_GlueShift - Glue option for shapes with partial coincidence;
* BOPAlgo_GlueFull - Glue option for shapes with full coincidence.

For setting the Gluing options for the algorithm it is just necessary to call the SetGlue(BOPAlgo_GlueEnum) method with appropriate Glue value.

For using this option in DRAW the command bglue has been implemented:
* 0 - default value, Gluing is off;
* 1 - for partial coincidence;
* 2 - for full coincidence

Elimination of the warnings.
This commit is contained in:
emv
2016-12-08 16:49:29 +03:00
committed by apn
parent b4327ba8df
commit 483ce1bd89
33 changed files with 628 additions and 115 deletions

View File

@@ -308,6 +308,7 @@ void BRepAlgoAPI_BooleanOperation::Build()
myDSFiller->SetProgressIndicator(myProgressIndicator);
myDSFiller->SetFuzzyValue(myFuzzyValue);
myDSFiller->SetNonDestructive(myNonDestructive);
myDSFiller->SetGlue(myGlue);
//
SetAttributes();
//

View File

@@ -29,7 +29,8 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo()
myDSFiller(NULL),
myBuilder(NULL),
myFuzzyValue(0.),
myNonDestructive(Standard_False)
myNonDestructive(Standard_False),
myGlue(BOPAlgo_GlueOff)
{}
//=======================================================================
// function:
@@ -42,7 +43,8 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo
myEntryType(0),
myBuilder(NULL),
myFuzzyValue(0.),
myNonDestructive(Standard_False)
myNonDestructive(Standard_False),
myGlue(BOPAlgo_GlueOff)
{
BOPAlgo_PaveFiller* pPF=(BOPAlgo_PaveFiller*)&aPF;
myDSFiller=pPF;
@@ -88,6 +90,22 @@ Standard_Boolean BRepAlgoAPI_BuilderAlgo::NonDestructive() const
return myNonDestructive;
}
//=======================================================================
//function : SetGlue
//purpose :
//=======================================================================
void BRepAlgoAPI_BuilderAlgo::SetGlue(const BOPAlgo_GlueEnum theGlue)
{
myGlue=theGlue;
}
//=======================================================================
//function : Glue
//purpose :
//=======================================================================
BOPAlgo_GlueEnum BRepAlgoAPI_BuilderAlgo::Glue() const
{
return myGlue;
}
//=======================================================================
//function : Clear
//purpose :
//=======================================================================
@@ -144,6 +162,7 @@ void BRepAlgoAPI_BuilderAlgo::Build()
myDSFiller->SetProgressIndicator(myProgressIndicator);
myDSFiller->SetFuzzyValue(myFuzzyValue);
myDSFiller->SetNonDestructive(myNonDestructive);
myDSFiller->SetGlue(myGlue);
//
myDSFiller->Perform();
iErr=myDSFiller->ErrorStatus();

View File

@@ -22,6 +22,7 @@
#include <Standard_Integer.hxx>
#include <BOPAlgo_PPaveFiller.hxx>
#include <BOPAlgo_PBuilder.hxx>
#include <BOPAlgo_GlueEnum.hxx>
#include <Standard_Real.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepAlgoAPI_Algo.hxx>
@@ -62,6 +63,12 @@ Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
//! a copy of a sub-shape is created in the result if it is needed to be updated.
Standard_EXPORT Standard_Boolean NonDestructive() const;
//! Sets the glue option for the algorithm
Standard_EXPORT void SetGlue(const BOPAlgo_GlueEnum theGlue);
//! Returns the glue option of the algorithm
Standard_EXPORT BOPAlgo_GlueEnum Glue() const;
//! Sets the arguments
Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
@@ -113,6 +120,7 @@ protected:
Standard_Real myFuzzyValue;
Standard_Boolean myNonDestructive;
TopTools_ListOfShape myArguments;
BOPAlgo_GlueEnum myGlue;
private: