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

0029580: Regression: invalid result of BOP Fuse

Boolean Operation - avoid creation of INTERNAL solid from unclassified faces in Solid Builder algorithm.
Instead warn the user that some of the faces have been unclassified and not used for solids creation.

Adjustment of the test cases.
Test cases for the issue.
This commit is contained in:
emv
2018-03-15 17:02:46 +03:00
committed by bugmaster
parent 3c9f082bb9
commit 7f3408c8c8
17 changed files with 249 additions and 87 deletions

View File

@@ -103,22 +103,6 @@ BOPAlgo_BuilderSolid::~BOPAlgo_BuilderSolid()
{
}
//=======================================================================
//function : SetSolid
//purpose :
//=======================================================================
void BOPAlgo_BuilderSolid::SetSolid(const TopoDS_Solid& aS)
{
mySolid=aS;
}
//=======================================================================
//function : Solid
//purpose :
//=======================================================================
const TopoDS_Solid& BOPAlgo_BuilderSolid::Solid()const
{
return mySolid;
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
@@ -674,8 +658,10 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes()
}
}
// Make solid from the unused faces (if any)
// Find all unclassified faces and warn the user about them.
// Do not put such faces into result as they will form not closed solid.
TopTools_IndexedMapOfShape aMFUnUsed;
for (i = 1; i <= aNbF; ++i)
{
const TopoDS_Shape& aF = aMFs(i);
@@ -685,24 +671,21 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes()
if (aMFUnUsed.Extent())
{
TopoDS_Solid aSolid;
aBB.MakeSolid(aSolid);
//
TopTools_ListOfShape aLSI;
MakeInternalShells(aMFUnUsed, aLSI);
//
aItLS.Initialize(aLSI);
for (; aItLS.More(); aItLS.Next())
{
const TopoDS_Shape& aSI = aItLS.Value();
aBB.Add (aSolid, aSI);
Bnd_Box aBox;
BRepBndLib::Add(aSolid, aBox);
myBoxes.Bind(aSolid, aBox);
TopoDS_Shape aWShape;
if (aLSI.Extent() == 1)
aWShape = aLSI.First();
else
{
aBB.MakeCompound(TopoDS::Compound(aWShape));
aItLS.Initialize(aLSI);
for (; aItLS.More(); aItLS.Next())
aBB.Add(aWShape, aItLS.Value());
}
myAreas.Append(aSolid);
}
AddWarning(new BOPAlgo_AlertSolidBuilderUnusedFaces(aWShape)); }
}
//=======================================================================
//function : MakeInternalShells