mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified: 1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*); 2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*); 3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*); 4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*). Cosmetic changes: 1. Documentation of the *BOPAlgo_Builder* class. 2. Making simple methods of the *BOPAlgo_Builder* class inline. 3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead. 3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*. Test cases for the issue. Adjustment of the test case to their current behavior. Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.
This commit is contained in:
@@ -55,7 +55,6 @@ public:
|
||||
using BOPAlgo_Options::ClearWarnings;
|
||||
using BOPAlgo_Options::GetReport;
|
||||
using BOPAlgo_Options::SetProgressIndicator;
|
||||
using BOPAlgo_Options::SetCheckInverted;
|
||||
|
||||
protected:
|
||||
|
||||
|
@@ -29,7 +29,8 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo()
|
||||
myDSFiller(NULL),
|
||||
myBuilder(NULL),
|
||||
myNonDestructive(Standard_False),
|
||||
myGlue(BOPAlgo_GlueOff)
|
||||
myGlue(BOPAlgo_GlueOff),
|
||||
myCheckInverted(Standard_True)
|
||||
{}
|
||||
//=======================================================================
|
||||
// function:
|
||||
@@ -42,7 +43,8 @@ BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo
|
||||
myEntryType(0),
|
||||
myBuilder(NULL),
|
||||
myNonDestructive(Standard_False),
|
||||
myGlue(BOPAlgo_GlueOff)
|
||||
myGlue(BOPAlgo_GlueOff),
|
||||
myCheckInverted(Standard_True)
|
||||
{
|
||||
BOPAlgo_PaveFiller* pPF=(BOPAlgo_PaveFiller*)&aPF;
|
||||
myDSFiller=pPF;
|
||||
|
@@ -31,9 +31,19 @@ class BOPAlgo_PaveFiller;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
|
||||
//! The class contains API level of the General Fuse algorithm.<br>
|
||||
//!
|
||||
//! Additionally to the options defined in the base class, the algorithm has
|
||||
//! the following options:<br>
|
||||
//! - *Safe processing mode* - allows to avoid modification of the input
|
||||
//! shapes during the operation (by default it is off);
|
||||
//! - *Gluing options* - allows to speed up the calculation of the intersections
|
||||
//! on the special cases, in which some sub-shapes are coinciding.
|
||||
//! - *Disabling the check for inverted solids* - Disables/Enables the check of the input solids
|
||||
//! for inverted status (holes in the space). The default value is TRUE,
|
||||
//! i.e. the check is performed. Setting this flag to FALSE for inverted solids,
|
||||
//! most likely will lead to incorrect results.
|
||||
//!
|
||||
//! It returns the following Error statuses:<br>
|
||||
//! - 0 - in case of success;<br>
|
||||
//! - *BOPAlgo_AlertTooFewArguments* - in case there are no enough arguments to perform the operation;<br>
|
||||
@@ -72,6 +82,19 @@ Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
|
||||
//! Returns the glue option of the algorithm
|
||||
Standard_EXPORT BOPAlgo_GlueEnum Glue() const;
|
||||
|
||||
//! Enables/Disables the check of the input solids for inverted status
|
||||
void SetCheckInverted(const Standard_Boolean theCheck)
|
||||
{
|
||||
myCheckInverted = theCheck;
|
||||
}
|
||||
|
||||
//! Returns the flag defining whether the check for input solids on inverted status
|
||||
//! should be performed or not.
|
||||
Standard_Boolean CheckInverted() const
|
||||
{
|
||||
return myCheckInverted;
|
||||
}
|
||||
|
||||
//! Sets the arguments
|
||||
Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
|
||||
|
||||
@@ -130,20 +153,10 @@ protected:
|
||||
Standard_Boolean myNonDestructive;
|
||||
TopTools_ListOfShape myArguments;
|
||||
BOPAlgo_GlueEnum myGlue;
|
||||
|
||||
Standard_Boolean myCheckInverted;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile
|
||||
|
Reference in New Issue
Block a user