0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation::MakeEmptyVertex"

Implementation of method "IsDeleted(...)" for MakeRevol and MakePrism algorithms.

Problem (exception) occurs during history building and was caused by an attempt to obtain generated shape for subshape, which was really "deleted" by algorithm - this input subshape and its possible generated shape was not used in result.
This commit is contained in:
ifv
2018-12-10 15:48:55 +03:00
committed by bugmaster
parent 39235bedc6
commit 80eeb3cef1
15 changed files with 541 additions and 294 deletions

View File

@@ -240,16 +240,49 @@ TopoDS_Shape BRepPrimAPI_MakeRevol::LastShape()
const TopTools_ListOfShape& BRepPrimAPI_MakeRevol::Generated (const TopoDS_Shape& S)
{
myGenerated.Clear();
if (!myRevol.IsUsed(S))
{
return myGenerated;
}
TopoDS_Shape aGS = myRevol.Shape(S);
if (!aGS.IsNull())
{
if (BRepTools_History::IsSupportedType(aGS))
{
if (aGS.ShapeType() == TopAbs_EDGE)
{
Standard_Boolean isDeg = BRep_Tool::Degenerated(TopoDS::Edge(aGS));
if (isDeg)
{
TopTools_ListIteratorOfListOfShape anIt(myDegenerated);
for (; anIt.More(); anIt.Next())
{
if (aGS.IsSame(anIt.Value()))
{
myGenerated.Append(aGS);
if (!myHist.IsNull())
{
TopTools_ListIteratorOfListOfShape anIt1(myHist->Modified(aGS));
for (; anIt1.More(); anIt1.Next())
{
myGenerated.Append(anIt1.Value());
}
return myGenerated;
}
}
}
return myGenerated;
}
}
//
if (myHist.IsNull())
{
myGenerated.Append(aGS);
return myGenerated;
}
//
if (myHist->Modified(aGS).IsEmpty())
{
myGenerated.Append(aGS);
@@ -261,18 +294,19 @@ const TopTools_ListOfShape& BRepPrimAPI_MakeRevol::Generated (const TopoDS_Shape
{
myGenerated.Append(anIt.Value());
}
if (aGS.ShapeType() == TopAbs_EDGE)
{
if (BRep_Tool::Degenerated(TopoDS::Edge(aGS)))
{
//Append initial common deg. edge
myGenerated.Append(aGS);
}
}
}
}
return myGenerated;
}
//=======================================================================
//function : IsDeleted
//purpose :
//=======================================================================
Standard_Boolean BRepPrimAPI_MakeRevol::IsDeleted(const TopoDS_Shape& S)
{
return !myRevol.IsUsed(S);
}
//=======================================================================
//function : FirstShape