1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028880: Modeling Algorithms - add missing BRepFeat_SplitShape::Right() getter

- Added Right() method to BRepFeat_SplitShape;
- Added an option in command buc60854, which allows to select Left() or Right() method;
- Modified method BUC60854 in QABugs_14.cxx;
- Added new option to the help of command buc60854;
- Modified test case buc60854. Now its state is "OK";
- Added check Right() in buc60854 test case.
This commit is contained in:
antonavt
2020-03-02 12:16:14 +03:00
committed by bugmaster
parent 62afcbbb4a
commit 68064d7bc3
4 changed files with 64 additions and 12 deletions

View File

@@ -27,6 +27,7 @@
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopExp_Explorer.hxx>
//=======================================================================
//function : Build
@@ -38,6 +39,7 @@ void BRepFeat_SplitShape::Build ()
if (mySShape.IsDone()) {
Done();
myShape = mySShape.ResultingShape();
myRight.Clear();
}
}
@@ -64,6 +66,33 @@ const TopTools_ListOfShape& BRepFeat_SplitShape::Left() const
return mySShape.Left();
}
//=======================================================================
//function : Right
//purpose :
//=======================================================================
const TopTools_ListOfShape& BRepFeat_SplitShape::Right() const
{
if (myRight.IsEmpty())
{
TopTools_MapOfShape aMapOfLeft;
TopTools_ListIteratorOfListOfShape anIterator;
for (anIterator.Initialize(mySShape.Left()); anIterator.More(); anIterator.Next())
{
aMapOfLeft.Add(anIterator.Value());
}
TopExp_Explorer anExplorer;
for (anExplorer.Init(myShape, TopAbs_FACE); anExplorer.More(); anExplorer.Next())
{
const TopoDS_Shape& aFace = anExplorer.Current();
if (!aMapOfLeft.Contains(aFace))
myRight.Append(aFace);
}
}
return myRight;
}
//=======================================================================
//function : isDeleted
//purpose :

View File

@@ -105,6 +105,9 @@ public:
//! Raises NotDone if IsDone returns <Standard_False>.
Standard_EXPORT const TopTools_ListOfShape& Left() const;
//! Returns the faces of the "right" part on the shape.
Standard_EXPORT const TopTools_ListOfShape& Right() const;
//! Builds the cut and the resulting faces and edges as well.
Standard_EXPORT void Build() Standard_OVERRIDE;
@@ -130,6 +133,8 @@ private:
LocOpe_Spliter mySShape;
Handle(LocOpe_WiresOnShape) myWOnShape;
mutable TopTools_ListOfShape myRight;
};