mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028283: The command bopcheck crashes on the given shape
BOPAlgo_CheckerSI crashed due to building of pcurve for an edge not lying on surface. The fix avoids building of pcurves in this algorithm. The new flag has been added in BOPAlgo_PaveFiller class (method SetAvoidBuildPCurve). It tells whether to avoid building pcurves. It is worth to set if the result is not used to create splits of faces, as in example with BOPAlgo_CheckerSI.
This commit is contained in:
@@ -48,6 +48,7 @@ BOPAlgo_CheckerSI::BOPAlgo_CheckerSI()
|
||||
{
|
||||
myLevelOfCheck=BOPDS_DS::NbInterfTypes()-1;
|
||||
myNonDestructive=Standard_True;
|
||||
SetAvoidBuildPCurve(Standard_True);
|
||||
}
|
||||
//=======================================================================
|
||||
//function : ~
|
||||
|
@@ -39,11 +39,12 @@ BOPAlgo_PaveFiller::BOPAlgo_PaveFiller()
|
||||
:
|
||||
BOPAlgo_Algo()
|
||||
{
|
||||
myDS=NULL;
|
||||
myIterator=NULL;
|
||||
myNonDestructive=Standard_False;
|
||||
myIsPrimary=Standard_True;
|
||||
myGlue=BOPAlgo_GlueOff;
|
||||
myDS = NULL;
|
||||
myIterator = NULL;
|
||||
myNonDestructive = Standard_False;
|
||||
myIsPrimary = Standard_True;
|
||||
myAvoidBuildPCurve = Standard_False;
|
||||
myGlue = BOPAlgo_GlueOff;
|
||||
}
|
||||
//=======================================================================
|
||||
//function :
|
||||
@@ -54,11 +55,12 @@ BOPAlgo_PaveFiller::BOPAlgo_PaveFiller
|
||||
:
|
||||
BOPAlgo_Algo(theAllocator)
|
||||
{
|
||||
myDS=NULL;
|
||||
myIterator=NULL;
|
||||
myNonDestructive=Standard_False;
|
||||
myIsPrimary=Standard_True;
|
||||
myGlue=BOPAlgo_GlueOff;
|
||||
myDS = NULL;
|
||||
myIterator = NULL;
|
||||
myNonDestructive = Standard_False;
|
||||
myIsPrimary = Standard_True;
|
||||
myAvoidBuildPCurve = Standard_False;
|
||||
myGlue = BOPAlgo_GlueOff;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : ~
|
||||
|
@@ -108,7 +108,17 @@ public:
|
||||
//! Returns the glue option of the algorithm
|
||||
Standard_EXPORT BOPAlgo_GlueEnum Glue() const;
|
||||
|
||||
//! Sets the flag to avoid building of p-curves of edges on faces
|
||||
void SetAvoidBuildPCurve(const Standard_Boolean theValue)
|
||||
{
|
||||
myAvoidBuildPCurve = theValue;
|
||||
}
|
||||
|
||||
//! Returns the flag to avoid building of p-curves of edges on faces
|
||||
Standard_Boolean IsAvoidBuildPCurve() const
|
||||
{
|
||||
return myAvoidBuildPCurve;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -405,6 +415,7 @@ protected:
|
||||
BOPAlgo_SectionAttribute mySectionAttribute;
|
||||
Standard_Boolean myNonDestructive;
|
||||
Standard_Boolean myIsPrimary;
|
||||
Standard_Boolean myAvoidBuildPCurve;
|
||||
BOPAlgo_GlueEnum myGlue;
|
||||
|
||||
|
||||
|
@@ -525,6 +525,9 @@ Standard_Integer BOPAlgo_PaveFiller::SplitEdge(const Standard_Integer nE,
|
||||
//=======================================================================
|
||||
void BOPAlgo_PaveFiller::MakePCurves()
|
||||
{
|
||||
if (myAvoidBuildPCurve ||
|
||||
(!mySectionAttribute.PCurveOnS1() && !mySectionAttribute.PCurveOnS2()))
|
||||
return;
|
||||
Standard_Boolean bHasPC;
|
||||
Standard_Integer i, nF1, nF2, aNbC, k, nE, aNbFF, aNbFI, nEx;
|
||||
Standard_Integer j, aNbPBIn, aNbPBOn;
|
||||
|
Reference in New Issue
Block a user